hostvars requires a string that is a host name: hostvars['<hostname>']
, if the 'windows' is a hostname you can do
hostvars['windows']['varname'] .. if it is a group , you cannot do
this, you need to use a specific hostname.

But if you just want any host in the group you can do :

Also note that if you don't quote something it will be interpreted as
a variable that contains the name, not the variable name you want
(list indecies are an exception as they are just numbers).

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 post to this group, send email to
To view this discussion on the web visit
For more options, visit

Reply via email to