Finding out what groups a host is a member of in a template?

24 views
Skip to first unread message

Kevin Burton

unread,
Nov 4, 2014, 10:16:40 PM11/4/14
to ansible...@googlegroups.com
For the life of me I can't seem to find this in the docs but I'm sure it's possible.

I have a template and I want to expand a string to all the groups that host is a member of.

I'm using them as tags in our monitoring system.


Matt Martz

unread,
Nov 4, 2014, 10:35:20 PM11/4/14
to ansible...@googlegroups.com
The group_names variable will hold that info. It is a list of all groups that the current host is a member of.
--
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/f7be07e4-7be2-469f-94d3-3e8065e8b220%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