Inventory Group Name as a Variable?

32 views
Skip to first unread message

Chris Short

unread,
May 18, 2016, 9:17:37 AM5/18/16
to Ansible Project
I would like to use our inventory group names as a variable in a template file. Has anyone had any success doing this?

Matt Martz

unread,
May 18, 2016, 9:26:58 AM5/18/16
to ansible...@googlegroups.com
Look at the group_names variable.  It contains a list of all groups the host is in.


On Wednesday, May 18, 2016, 'Chris Short' via Ansible Project <ansible...@googlegroups.com> wrote:
I would like to use our inventory group names as a variable in a template file. Has anyone had any success doing this?

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/51ab946f-cfab-4fb8-b463-81d31b93526d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Reply all
Reply to author
Forward
0 new messages