Skip to content

Instantly share code, notes, and snippets.

@davidbirdsong
Created June 6, 2013 23:14
Show Gist options
  • Save davidbirdsong/5725778 to your computer and use it in GitHub Desktop.
Save davidbirdsong/5725778 to your computer and use it in GitHub Desktop.
conditional inside of loop
---
- hosts: all
sudo: yes
tasks:
- name: mount filter
debug: msg="{{ item['mount'] + ' is awesome!'}}"
when: {{ item['mount'].endswith('da3') }}
with_items: $ansible_mounts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment