Skip to content

Instantly share code, notes, and snippets.

@davidbirdsong
Created June 8, 2013 00:37
Show Gist options
  • Select an option

  • Save davidbirdsong/5733337 to your computer and use it in GitHub Desktop.

Select an option

Save davidbirdsong/5733337 to your computer and use it in GitHub Desktop.
pseudo continue
---
- hosts: 10.100.1.43
tasks:
- name: mount filter1
debug: msg=${item.mount}
when: item.mount.endswith('da3')
with_items: $ansible_mounts
[david@ops-1 staging{master}]$ ansible-playbook -vv foo.yml
PLAY [10.100.1.43] ************************************************************
GATHERING FACTS ***************************************************************
<10.100.1.43> REMOTE_MODULE setup
ok: [10.100.1.43]
TASK: [mount filter1] *********************************************************
skipping: [10.100.1.43] => (item={u'size_total': 5283381248, u'mount': u'/', u'size_available': 3640750080, u'fstype': u'ext4', u'device': u'/dev/xvde1', u'options': u'rw,relatime'})
skipping: [10.100.1.43] => (item={u'size_total': 157592621056, u'mount': u'/media/ephemeral0', u'size_available': 141867134976, u'fstype': u'ext3', u'device': u'/dev/xvde2', u'options': u'rw'})
ok: [10.100.1.43] => (item={u'size_total': 1056858112, u'mount': u'/export/hda3', u'size_available': 865292288, u'fstype': u'ext4', u'device': u'/dev/loop0', u'options': u'rw'}) => {"item": {"device": "/dev/loop0", "fstype": "ext4", "mount": "/export/hda3", "options": "rw", "size_available": 865292288, "size_total": 1056858112}, "msg": "/export/hda3"}
PLAY RECAP ********************************************************************
10.100.1.43 : ok=2 changed=0 unreachable=0 failed=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment