Hello,
Hopefully I'm not overlooking this but is there a way to lookup if a value
is in a dictionary - if it is perform a task using the "when" keyword? For
example I want to have a certain task only run if the {{ ansible_fqdn }} is
in the dictionary.
licensed_hosts:
- test001.example.com
- test002.example.com
tasks:
- debug: msg="This should only run on test002.example.com"
when: <somehow lookup {{ ansible_fqdn }} in licensed_hosts>
Thanks!
--
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/52fcc7f2-a1fa-49a0-9466-57818ebe5243%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.