diff --git a/hosts.yaml b/hosts.yaml new file mode 100644 index 0000000000000000000000000000000000000000..376c4abb20b48ded0efa4866a3a65d3422dcbcf7 --- /dev/null +++ b/hosts.yaml @@ -0,0 +1,7 @@ +[routers] +router1 int_ip=10.10.20.100 + +[routers:vars] +ansible_become=yes +ansible_become_method=enable +ansible_network_os=cisco.ios.ios \ No newline at end of file diff --git a/test.yaml b/test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c6faf250519e5791fcbddd768baa0d7353bcf2b8 --- /dev/null +++ b/test.yaml @@ -0,0 +1,15 @@ +--- +- name: Test + hosts: routers + gather_facts: no + connection: network_cli + tasks: + - name: Show int info + cisco.ios.ios_command: + commands: show ip route vrf Mgmt-intf + register: interfaces_info + + - name: Print output + copy: + content: "{{interfaces_info.stdout[0]}}" + dest: ~/onlab/{{inventory_hostname}}.txt \ No newline at end of file