Hi all,

I have an inventory file with hosts in different groups within. I would 
like to run a playbook on a certain group, but only where the host members 
of that group that have a certain OS (say, " ansible_distribution='Fedora' 
".) I was told to look at the "group_by" module, and so in my top-level 
site.yml file I put in the following:

# Set up OS-specific groups
- group_by: key=os-{{ansible_distribution}}

So then I tried to do the following:

$ ansible-playbook -i inventory-file -u root -k site.yml --tags=mailserver 
--limit=os-Fedora

but when I do so, I get:

ERROR: provided hosts list is empty

So am I doing this incorrectly, or for some reason, is the "os-Fedora" 
group empty? (i.e. the logic is not matching any hosts)

Also, is there a way to print the members of the group_by variable out so I 
can see what's being included?

Thanks,
Will



-- 
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/a2dc6643-eb29-4d4d-aa27-ff8cfb065125%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to