Can someone show me where my mistakes are with the below playbook? When i try to run this playbook it tells me it fails at
- name: run multiple commands on remote nodes
^ here
`
Can someone show me where my mistakes are with the below playbook? When i try to run this playbook it tells me it fails at
`
“hosts” should come before “name”. I think.
Same issue
hosts/name order does not matter, indentation does seem to be off, -
debug should start at same level as the previous task
I think the 3 lines under "- name" need to be indented level with the 'n'.
Richard
Oh, whoops - I was looking at the wrong '- name'
Richard
Tried it without the register and still no go!
so from emai (not a good source) the indentations were off in many
places, this is a 'fixed' version of your play:
- name: get version
hosts: all
gather_facts: false
connection: local
tasks:
- name: run multiple commands on remote nodes
ios_command:
commands:
- show version
- show ip int brief
register: print_output
- debug: var=print_output.stdout_lines