Guest User

Untitled

a guest
Dec 7th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. ---
  2. - hosts: CSR
  3. gather_facts: true
  4. connection: local
  5.  
  6. tasks:
  7. - name: show run
  8. ios_command:
  9. commands:
  10. - show run
  11. host: "{{ ansible_host }}"
  12. username: vagrant
  13. password: vagrant
  14. register: config
  15.  
  16. - name: save output to /etc/ansible/backups
  17. copy:
  18. content: "{{ config.stdout[0] }}"
  19. dest: "/tmp/backups/show_run_{{ inventory_hostname }}.txt"
Add Comment
Please, Sign In to add comment