===================================================
Here is my static inventory of dynamic groups
[tag_ENV_prod]
[tag_ROLES_bastion]
[prod-bastion:children]
tag_ROLES_bastion:&tag_ENV_prod
[prod-servers:children]
tag_ENV_prod:!tag_ROLES_bastion
===================================================
Calling the groups via an adhoc ansible command does NOT work.
$ ansible 'prod-bastion' -i ec2.py --list-hosts
[WARNING]: provided hosts list is empty, only localhost is available
hosts (0):
$ ansible 'prod-servers' -i ec2.py --list-hosts
[WARNING]: provided hosts list is empty, only localhost is available
hosts (0):
===================================================
This however works
$ ansible 'tag_ROLES_bastion:&tag_ENV_prod' -i ec2.py --list-hosts
hosts (1):
192.168.1.4
$ ansible '\!tag_ROLES_bastion:tag_ENV_prod' -i ec2.py --list-hosts
hosts (8):
192.168.1.12
192.168.1.30
--
*The information contained in this transmission (including any attachments)
is confidential and may be privileged. It is intended only for the use of
the individual or entity named above. If you are not the intended
recipient, dissemination, distribution, or copy of this communication is
strictly prohibited. If you have received this communication in error,
please erase all copies of this message and its attachments and notify me
immediately.*
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2a557ea8-0640-49cb-baa8-3d16089f886b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.