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.
My verbiage is pretty poor when it comes to YAML - thanks for clarifying!
Since ansible_fqdn is automatically gathered I was referring to looking to see if that variable / fact was in a list. Your example worked perfectly! I’ll make sure to try to look into the Jinja2 expressions a bit further in the future.