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