ansible_mounts is a list of dictionaries, each of which has a 'mount'
so you are really comparing to a complex structure, you can try
something like this (though with set_fact to create the list you
need):
vars:
newdevices:
- /dev/xvdc
- /dev/sda1
tasks:
- debug: msg="mounted {{item.device}}"
with_items: ansible_mounts
when: item.device in newdevices
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8%3DPupsXvPFND4_0LDC9ENc_Gi8Voah__LngFoMUcZQ_nQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.