Stevens-MacBook-Pro:ansible stevenwiliams$ cat getver1.yml
- name: show version and other user level commands
hosts: IOL_Routers
gather_facts: false
connection: local
tasks:
- name: run multiple commands on remote nodes
ios_command:
commands:
-
show version
-
show ip int br
register: print_output
Stevens-MacBook-Pro:ansible stevenwiliams$ ansible-playbook getver1.yml -u cisco -k
SSH password:
PLAY [show version and other user level commands] **********************************************************************************************
TASK [run multiple commands on remote nodes] ***************************************************************************************************
[WARNING]: Platform darwin on host R02 is using the discovered Python interpreter at /usr/bin/python, but future installation of another
Python interpreter could change this. See https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html for more
information.
ok: [R02]
[WARNING]: Platform darwin on host R01 is using the discovered Python interpreter at /usr/bin/python, but future installation of another
Python interpreter could change this. See https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html for more
information.
ok: [R01]
[WARNING]: Platform darwin on host R03 is using the discovered Python interpreter at /usr/bin/python, but future installation of another
Python interpreter could change this. See https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html for more
information.
ok: [R03]
[WARNING]: Platform darwin on host R04 is using the discovered Python interpreter at /usr/bin/python, but future installation of another
Python interpreter could change this. See https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html for more
information.
ok: [R04]
PLAY RECAP *************************************************************************************************************************************
R01 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
R02 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
R03 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
R04 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Stevens-MacBook-Pro:ansible stevenwiliams$