Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. ---
  2. - hosts: localhost
  3. gather_facts: false
  4. connection: local
  5.  
  6. tasks:
  7. - name: run show version on ios device
  8. ios_command:
  9. commands:
  10. - show version
  11. host: rf3.cor.las.ss34.net
  12. username: cisco
  13. password: cisco
  14.  
  15. register: show_output
  16.  
  17. - name: show output
  18. debug:
  19. var: show_output
  20.  
  21. - name: display to a file in new folder
  22. copy: content = "{{show_output}}" dst= "/home/hellow/test1/rf3.cor.las.txt"
  23.  
  24. TASK [display to a file] *******************************************************
  25. fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "src (or content) and dest are required"}
  26. to retry, use: --limit @/home/tmalhotra/Ansible_learning/test2-playbook.retry
  27.  
  28. PLAY RECAP *********************************************************************
  29. localhost : ok=2 changed=0 unreachable=0 failed=1
  30.  
  31. [tmalhotra@lasssnpr01net01 Ansible_learning]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement