Hi,

I'm pulling my hair out on this, but it's probably something simple. I'm 
trying to create a dynamic group that has all our OpenVZ Guests in it.

So, in my 'site.yml' I have:
- name: Setup Groups
  hosts: all 
  tasks: 
    - name: Create Groups based on OS 
      group_by: key=dist_{{ ansible_distribution }} 
    - name: Create VZ Guest Group 
      group_by: key={{ ansible_virtualization_type 
}}-{{ansible_virtualization_role 
}}


My problem is, it seems to be putting *every* host in this group:
TASK: [Create VZ Guest Group] 
************************************************* 
changed: [hostx.umaryland.edu] => {"changed": true, "groups": {
"openvz-guest": ["hostx", "hosty", "hostz"]}}


'hostz' is *definitely* not a OpenVZ guest- in fact, if you run the 'setup' 
module against hostz, 'ansible_virtualization_type' and 
'ansible_virtualization_role' aren't even returned in the output.

For what it's worth, I'm running ansible 1.4.3 from the EPEL repository.

What am I missing? I'm referencing:

https://github.com/ansible/ansible-examples/blob/master/language_features/group_by.yml

and

http://docs.ansible.com/group_by_module.html


Thanks,
Matt

-- 
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/91714ffc-1f4d-45dc-951e-f9c4ff4228c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to