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 ansible-proje...@googlegroups.com
> <mailto:ansible-project+unsub...@googlegroups.com>.
> > <mailto:ansible-project+unsub...@googlegroups.com <javascript:>>.
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/bM6kACUiE2Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mfoAi5rZCeAgZp-oZwy0k-S%3DFEwmwtFC1-YmMKEyA6aw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
| Alejandro Comisario CTO | NUBELIU E-mail: alej...@nubeliu.comCell: +54 9 11 3770 1857 _ www.nubeliu.com ![]() |