10-22-2020 11:00 PM
Only output from the first command is written to the file.
How do I make it write output from all of the commands to the file?
--- - name: run show commands hosts: nexus1 gather_facts: False tasks: - name: run show commands on nexus nxos_command: commands: - show hostname - show ip route - show interface - show ip interface vrf all - show hsrp register: output - name: Copy to server copy: content: "{{ output.stdout[0] }}" dest: "/home/CiscoOutPut/{{ inventory_hostname }}.txt"
07-22-2021 03:40 AM - edited 07-22-2021 03:41 AM
Thanks for share this information this information help me about Anible Cisco output creating empty.
01-02-2024 09:47 PM
Thanks for the information, I will try to figure it out for more. Keep sharing such informative post keep suggesting such post.
04-03-2024 05:27 AM
04-03-2024 07:41 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide