What about:

- vars:
  monitor_group: "glance"
- hosts: "{{ monitor_group }}"
  roles:
    - { role: icinga2-check-commands, tags: ['monitor-cloud'] }


I'm not saying that this'll work as I am trying to figure out variables myself. 
But you could give it a try.





Am 13.11.2015 um 16:53 schrieb Alejandro Comisario:
> Hi all ! is there any way of achieving the following ?
> ( i've tried this ones and i get "*no hosts matched*" )
> 
> monitor_group = "glance"
> 
> - hosts: "{{ monitor_group }}"
>   roles:
>     - { role: icinga2-check-commands, tags: ['monitor-cloud'] }
> 
> OR
> 
> monitor_group = glance
> 
> - hosts: "{{ monitor_group }}"
>   roles:
>     - { role: icinga2-check-commands, tags: ['monitor-cloud'] }
> 
> -- 
> 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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/c6f7988a-e2b9-49b9-89db-8290f4e1b303%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/c6f7988a-e2b9-49b9-89db-8290f4e1b303%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/564608A4.2020708%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to