Guest User

Untitled

a guest
Nov 8th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. ---
  2. - hosts: test-sw-01
  3. connection: ssh
  4.  
  5. tasks:
  6. - name: show run
  7. ios_command:
  8. commands: show run
  9. host: test-sw-01
  10. username: cisco
  11. password: cisco
  12. register: config
  13.  
  14. - name: save output to /home/user/cisco_backups
  15. copy:
  16. content: "{{ config.stdout[0] }}"
  17. dest: "/home/user/cisco_backups/{{ inventory_hostname }}.txt.$(date +%F_%R)"
Add Comment
Please, Sign In to add comment