Skip to content

Instantly share code, notes, and snippets.

@privateip
Last active August 24, 2016 19:30
Show Gist options
  • Save privateip/11b042e569585ee9248a to your computer and use it in GitHub Desktop.
Save privateip/11b042e569585ee9248a to your computer and use it in GitHub Desktop.
Super simple show version task
---
- hosts: ios_routers
gather_facts: false
connection: local
tasks:
- name: run show version on ios device
ios_command:
commands:
- show version
host: "{{ inventory_hostname }}"
username: cisco
password: cisco
@gundalow
Copy link

There is an extra space infront of host:, username: and password:, it should read:

---
- hosts: ios_routers
  gather_facts: false
  connection: local

  tasks:
   - name: run show version on ios device
     ios_command:
       commands:
         - show version
       host: "{{ inventory_hostname }}"
       username: cisco
       password: cisco

@privateip
Copy link
Author

Thanks... fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment