My problem is that i cant use a variable for the "- host: " part to realize 
what servers to run on.

On Friday, November 13, 2015 at 1:12:41 PM UTC-3, Uwe Sauter wrote:
>
> I'm not sure I understand which variable troubles you. Is it 
> "monitor_group" or "monitor-cloud" or "monitor_cloud"? Is there a 
> typo (underscore / dash)? 
>
>
>
> Am 13.11.2015 um 17:09 schrieb Alejandro Comisario: 
> > Thank for the response, sorry that i didnt clarify this. 
> > The monitor_cloud variable is in the [all:vars] section of the 
> inventory. 
> > 
> > On Friday, November 13, 2015 at 12:58:44 PM UTC-3, Uwe Sauter wrote: 
> > 
> >     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] 
> >     <javascript:> 
> >     > <mailto:[email protected] <javascript:> 
> <javascript:>>. 
> >     > To post to this group, send email to [email protected] 
> <javascript:> <mailto:[email protected] 
> >     <javascript:>>. 
> >     > 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>
>  
>
> >     > 
> >     <
> https://groups.google.com/d/msgid/ansible-project/c6f7988a-e2b9-49b9-89db-8290f4e1b303%40googlegroups.com?utm_medium=email&utm_source=footer
>  
> >     <
> 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 <
> 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/b280f2ef-89a5-493c-b12f-867c374602d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to