inventory_hostname is a 'magic' variable and always present, its not part
of fact gathering but inventory definition.

to see if a variable exists for a host you can do:

    'varname' in hostvars[<host's inventory name>]
​

-- 
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/CADn%2BHszrdFkWwzbpa8V8mobuGHJ6nT0eN4F9Kumaw-0Rsv4ENA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to