Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ansible@control lesson9]$ cat jw.yaml
- ---
- - name: Check disks
- hosts: all
- tasks:
- - shell: lsblk
- register: block_listing
- - debug:
- msg: echo "You have a second disk"
- #when: '"sdb" in ansible_facts.devices'
- #when: ansible_facts.devices.sdb is defined or ansible_facts.devices.vdb is defined
- when: '"sdb" in block_listing.stdout'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement