I cannot make an ec2 group (via dynamic inventory script) as a child of a managed group defined in hosts.
For example:
1. ec2 dynamic script returns a group of "tag_worker_1"
2. hosts file consists of:
[workercommon]
[tag_worker_1:children]
workercommon
3. group_vars has a file workercommon.yml which includes variables.
-
The play's pattern references tag_worker_1 (the ec2 group). However the variables from the "workercommon" group are not available.
However, if I invert the parent child relationship to:
[workercommon:children]
tag_worker_1
groups_vars for workercommon will be available. This won't work for me because I need to compose workercommon with other groups that will not include tag_worker_1.
Can dynamic inventory groups be children of managed groups (and get access to the managed groups group_vars)?
Thank you!