Variable to list current host's group membership

24 views
Skip to first unread message

Trond Hindenes

unread,
Sep 9, 2015, 4:20:39 PM9/9/15
to Ansible Project
Hi Ansible people, 
I'm labbing some dynamic playbooks stuff, and would like to access a list of the current host's group membership dynamically. I guess I can scan everyone of them and try and match with inventory_hostname but was hoping for a better solution.

Brian Coca

unread,
Sep 9, 2015, 4:33:31 PM9/9/15
to Ansible Project
you want "group_names"



--
Brian Coca

Trond Hindenes

unread,
Sep 9, 2015, 4:35:33 PM9/9/15
to Ansible Project
ah, of course. Thanks!
Reply all
Reply to author
Forward
0 new messages