On Saturday, 20 January 2018 08.26.56 CET Surjeet Singh wrote:
> ---
> - name: collect device facts and display OS version
> hosts: "{{ inventory | default('all') }}"
> gather_facts: no
> connection: local
>
>
> tasks:
> - name: run the show commands
> ios_command:
> commands:
> - show version
> host: "{{ inventory_hostname }}"
> username: cisco
> password: cisco
> register: version
>
> - debug: var=version.stdout[0].Version
I have never used ios_command, but my guess is that version.stdout[0] is a
string not dictionary with the key Version in it.
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/3193442.HCZvX6jUOS%40x1.
For more options, visit https://groups.google.com/d/optout.