I found inventory_file for the inventory variable.
About the groups, I tried without any success the following variables:
 hostvars[inventory_hostname] 
group_names
group

but i have the liste of al hosts, I want them separetly 

Le jeudi 22 décembre 2016 14:37:13 UTC+1, fanvalt a écrit :
>
> Hello,
>
> I do run a playbook by setting a limit: ansible-playbook -i pilote.ini 
> --limit DV70
>
> My inventory file contains the following:
>
> [DV70:chlidren]
> DV70_DEV
> DV70_REC
> ..
> [DV70_DEV]
> ansible_host=server1 ansible_user=usertest PARAM=WEB
> ansible_host=server2 ansible_user=usertest PARAM=DATABASE
>
> Is there a way in the playbook to gather in a variale the limit value , I 
> would like to have a variable limit: DV70_DEV when I run the playbook on 
> that host, hostvars would list all hosts.
> In the same order, is there a way to have a variable with the name of the 
> .ini file passed has a parameter with the -i option ? 
>
> Thanks for helping
>

-- 
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/056dc188-0eed-42de-8da5-4efd8805f633%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to