inventory_hostname is the variable. 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/6d0f21ac-f7a3-45c9-a7be-0ac981090745%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
