Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: Testing !!! Testing !!!!!
- hosts: ios
- connection: local
- gather_facts: true
- vars:
- provider:
- host: "{{inventory_hostname}}"
- username: "{{ansible_user}}"
- password: "{{ansible_ssh_pass}}"
- tasks:
- - name: check
- ios_command:
- provider: "{{provider}}"
- commands:
- - 'dir bootflash: | inc nxos.7.0.3.I7.2.bin'
- register: nxos
- - debug: var=nxos.stdout
- - name: fetch
- ios_command:
- provider: "{{provider}}"
- commands:
- - 'dir bootflash: '
- when: nxos.stdout == 0
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement