Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: localhost
- gather_facts: false
- connection: local
- tasks:
- - name: run show version on ios device
- ios_command:
- commands:
- - show version
- host: rf3.cor.las.ss34.net
- username: cisco
- password: cisco
- register: show_output
- - name: show output
- debug:
- var: show_output
- - name: display to a file in new folder
- copy: content = "{{show_output}}" dst= "/home/hellow/test1/rf3.cor.las.txt"
- TASK [display to a file] *******************************************************
- fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "src (or content) and dest are required"}
- to retry, use: --limit @/home/tmalhotra/Ansible_learning/test2-playbook.retry
- PLAY RECAP *********************************************************************
- localhost : ok=2 changed=0 unreachable=0 failed=1
- [tmalhotra@lasssnpr01net01 Ansible_learning]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement