This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019-04-29 18:06:44,681 p=11359 u=rothakur | ansible 2.9.0.dev0 | |
config file = /home/rothakur/dev-workspace/ansible.cfg | |
configured module search path = [u'/home/rothakur/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] | |
ansible python module location = /home/rothakur/dev-workspace/ansible/lib/ansible | |
executable location = /home/rothakur/dev-workspace/ansible/bin/ansible | |
python version = 2.7.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)] | |
2019-04-29 18:06:44,681 p=11359 u=rothakur | Using /home/rothakur/dev-workspace/ansible.cfg as config file | |
2019-04-29 18:06:44,681 p=11359 u=rothakur | setting up inventory plugins | |
2019-04-29 18:06:44,705 p=11359 u=rothakur | host_list declined parsing /home/rothakur/dev-workspace/inventory as it did not pass it's verify_file() method | |
2019-04-29 18:06:44,705 p=11359 u=rothakur | script declined parsing /home/rothakur/dev-workspace/inventory as it did not pass it's verify_file() method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ok: [192.168.56.101] => { | |
"before": [ | |
{ | |
"address_families": [ | |
{ | |
"afi": "ipv4", | |
"routes": [ | |
{ | |
"blackhole_config": { | |
"type": "blackhole" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
++++++++++++++++++++++++++++++++++ | |
Directory structure | |
/home/rothakur/ansible-collections/collections/ansible_collections | |
|__ansible | |
| |__netcommon | |
|__ansible-base | |
|__vyos | |
|__vyos | |
|__plugins | |
|__tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+++++++++++++++++++++++++ Playbook +++++++++++++++++++++++++++++++++++++ | |
- hosts: vyos | |
gather_facts: false | |
connection: network_cli | |
collections: | |
- vyos.vyos | |
tasks: | |
- name: ospf_global | |
vyos.vyos.vyos_ospf_global: &id001 | |
config: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The full traceback is: | |
Traceback (most recent call last): | |
File "/home/rothakur/.ansible/tmp/ansible-local-64828czkbooqz/ansible-tmp-1589874600.4459674-121109569081204/AnsiballZ_iosxr_facts.py", line 102, in <module> | |
_ansiballz_main() | |
File "/home/rothakur/.ansible/tmp/ansible-local-64828czkbooqz/ansible-tmp-1589874600.4459674-121109569081204/AnsiballZ_iosxr_facts.py", line 94, in _ansiballz_main | |
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) | |
File "/home/rothakur/.ansible/tmp/ansible-local-64828czkbooqz/ansible-tmp-1589874600.4459674-121109569081204/AnsiballZ_iosxr_facts.py", line 40, in invoke_module | |
runpy.run_module(mod_name='ansible_collections.cisco.iosxr.plugins.modules.iosxr_facts', init_globals=None, run_name='__main__', alter_sys=True) | |
File "/usr/lib64/python3.8/runpy.py", line 206, in run_module | |
return _run_module_code(code, init_globals, run_name, mod_spec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sample Input config : | |
so for a config like | |
router ospf 2 | |
router-id 2.2.2.2 | |
summary-in enable | |
external-out enable | |
bfd minimum-interval 55 | |
bfd fast-detect strict-mode | |
bfd multiplier 4 | |
cost 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before Device Config: | |
===================== | |
vyos@vyos:~$ show configuration commands | grep ospf | |
set protocols ospf area 2 area-type 'normal' | |
set protocols ospf area 2 authentication 'plaintext-password' | |
set protocols ospf area 2 shortcut 'enable' | |
set protocols ospf area 4 area-type stub default-cost '20' | |
set protocols ospf area 4 network '192.0.2.0/24' | |
set protocols ospf area 4 range 192.0.3.0/24 cost '10' | |
set protocols ospf area 4 range 192.0.4.0/24 cost '12' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before Device Config: | |
===================== | |
vyos@vyos:~$ show configuration commands | grep ospf | |
set protocols ospf area 2 area-type 'normal' | |
set protocols ospf area 2 authentication 'plaintext-password' | |
set protocols ospf area 2 shortcut 'enable' | |
set protocols ospf area 3 area-type 'nssa' | |
set protocols ospf area 4 area-type stub default-cost '20' | |
set protocols ospf area 4 network '192.0.2.0/24' | |
set protocols ospf area 4 range 192.0.3.0/24 cost '10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before Device Config: | |
===================== | |
vyos@vyos:~$ show configuration commands | grep ospf | |
set protocols ospf area 2 area-type 'normal' | |
set protocols ospf area 2 authentication 'plaintext-password' | |
set protocols ospf area 2 shortcut 'enable' | |
set protocols ospf area 4 area-type stub default-cost '20' | |
set protocols ospf area 4 network '192.0.2.0/24' | |
set protocols ospf area 4 network '192.0.12.0/24' | |
set protocols ospf area 4 network '192.0.22.0/24' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Render the provided configuration. | |
vyos.vyos.vyos_ospfv2: | |
config: | |
log_adjacency_changes: 'detail' | |
max_metric: | |
router_lsa: | |
administrative: true | |
on_shutdown: 10 | |
on_startup: 10 | |
default_information: |
OlderNewer