Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: test-sw-01
- connection: ssh
- tasks:
- - name: show run
- ios_command:
- commands: show run
- host: test-sw-01
- username: cisco
- password: cisco
- register: config
- - name: save output to /home/user/cisco_backups
- copy:
- content: "{{ config.stdout[0] }}"
- dest: "/home/user/cisco_backups/{{ inventory_hostname }}.txt.$(date +%F_%R)"
Add Comment
Please, Sign In to add comment