-
name: Network Getting Started First Playbook
connection: network_cli
gather_facts: false
hosts: lab
tasks: -
name: run multiple commands on remote nodes
ios_command:
commands: -
show run
register: output -
name: save output
copy:
content: “{{ output.stdout[0] }}”
dest: “/etc/ansible/backup/{{ inventory_hostname }}.txt”
Have you had the chance to save a set of multiple commands on file, just save the first one from the list, does anyone have the same scenario?