playbook, inventory, and group_names

37 views
Skip to first unread message

Mauricio Tavares

unread,
Mar 29, 2019, 1:57:39 PM3/29/19
to ansible...@googlegroups.com
So let's say I have an inventory like this:

[cars]
honda
volvo
saab

[motos]
aprilla
moto-guzzi

and in my playbook I am referring to motorcycles only

- hosts: motos

From what I understand, group_names returns the groups defined in the
inventory. How can I get a list of the host groups I am using in the
playbook?

Kai Stian Olstad

unread,
Mar 29, 2019, 2:16:39 PM3/29/19
to ansible...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages