Hi All
I have this ansible code where i need output of all these commands in one
file, however, all i am getting is either output of first command or second
command if i change the following to 0,1,2 however ansible is not
appending/writing all outputs into a single file.
Appreciate if there is a method which members could suggest to make it work.
"{{ print_output.stdout[1] }}
- name: Name servers
ios_command:
authorize: yes
provider: "{{ cli }}"
commands:
- show ip name-servers
- show ip int brief
- show logging | in host
register: print_output
- name: save output to a file
copy: content="{{ print_output.stdout[1] }}"
dest="/opt/ansible/dev/Dheeraj/verf/adnan/NTP/{{ inventory_hostname }}.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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/60f51826-3f20-4421-97ed-1e79724c8473n%40googlegroups.com.