OcNOS-SP : Ansible Guide : Configuring LDP : Running the Playbook
Running the Playbook
The following is the configuration on the OcNOS device before executing the Ansible Playbook:
OcNOS#show running-config ldp
!
!
OcNOS#
 
Execute the Ansible Playbook. Below are the logs that display:
(ansible) osboxes@osboxes:~/playbooks$ ansible-playbook ldp-playbook.yml
 
PLAY [ocnos] ******************************************************************************************************
 
TASK [configure LDP config on OcNOS] ******************************************************************************
changed: [sw2]
 
PLAY RECAP ********************************************************************************************************
sw2 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
 
Next, check the configurations on the OcNOS device, which should show the LDP configurations.
OcNOS#show running-config ldp
!
router ldp
targeted-peer ipv4 1.1.1.1
exit-targeted-peer-mode
targeted-peer ipv4 3.3.3.3
exit-targeted-peer-mode
advertise-labels for only_lo to any
!
!
interface eth2
enable-ldp ipv4
!
interface eth1
enable-ldp ipv4
!
OcNOS#
Last modified date: 06/08/2023