I am sure that i am just glossing over this in the documentation, but here goes anyway:
i am tryingto identify how i can use a hosts group name
host_group_1:
host1:
host2:
in such a way that i can call it in a task and use the actual name of the group as a variable.
if i run a playbook against host1 from above and have a task that does a lineinfile on /etc/somefile:
line1
line2
line3
lineX
the line that i am inserting would be "host_group_1" that i would do an insertbefore "lineX"
i am trying to avoid for every host group, having some variable with the same name as the host group. seems silly, redundant and avoidable. I am guessing that i am just not searching for the right thing in the documentation. any pointers?