11-17-2021 01:00 AM
I am trying to configure the ospf on the router in CML lab through ansible. Snippet of my playbook and host_var is attached:
this is the result that i am getting
TASK [Configuring OSPF on Routers] *******************************************************************************************************************
changed: [10.10.20.200] => (item={'address': '192.168.0.0', 'mask': '0.0.0.255', 'area': 0})
changed: [10.10.20.201] => (item={'address': '192.168.0.0', 'mask': '0.0.0.255', 'area': 0})
changed: [10.10.20.201] => (item={'address': '192.168.0.0', 'mask': '0.0.0.255', 'area': 0})
changed: [10.10.20.200] => (item={'address': '192.168.1.0', 'mask': '0.0.0.255', 'area': 0})
PLAY RECAP *******************************************************************************************************************************************
10.10.20.200 : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
10.10.20.201 : ok=4 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
But when i am running the sh run command on the router , i can see that the network is not advertised
!
router ospf 1
area 0 capability default-exclusion
area 0 authentication
!
What is the error here? I am not able to figure out.
11-18-2021 05:57 PM
Might be the syntax, I am not positive on it though.
In the playbook your variables have varying spaces. The documentation I looked up for ansible/jinja2 variable all have them be of the form: double curly braces with a single space in the closing and a single space in the opening side.
{{var }} or {{ var}} or {{var}} should be {{ var }}
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide