I am practising writing ansible playbook using Network automation docker 
container in GNS3. After running below playbook, only the output of first 
command is saved (show version) and i don't see the 2nd command's output in 
file. This happens for any command i run.

Am i doing something wrong or should i export the .txt file to a windows PC 
to view the complete output?  

(formatting below is not in proper order while pasting here but playbook 
has the correct format)

---
- name: Backup few config from Cisco router
hosts: R1
gather_facts: false
connection: local

tasks:
- name: run multiple commands on remote nodes
ios_command:
commands:
- show ip arp
- show version

register: print_output

- debug: var=print_output.stdout_lines

- name: save output to a file
copy: content="{{ print_output.stdout[0] }}" dest="./output/R1.txt"


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d2d66c76-603a-4fb4-8439-31f4844ffbedn%40googlegroups.com.

Reply via email to