Hi,
Currently i’m using static inventory in ansible and have folder structure like Inventories/inv1, Inventories/inv2, etc…
Inventories/inv1
[atlanta]
xyz.com
[europe]
abc.com
I need to have group variables for production in a way like Inventories/group_vars/production which is specific to Prod.
#Inventories/group_vars/production
# Inventories/inv1
[atlanta]
xyz.com
[europe]
abc.com
I need to have group variables for production in a way like
Inventories/group_vars/production which is specific to Prod.
#Inventories/group_vars/production
---
url: 'jnp://mqendpoint.company.com:1099'
env: 'Production'
How can I glue these two files into a third inventory file
Inventories/production.
What I tried is
#Inventories/production
[production:children]
atlanta
europe
I am getting error as child group is not defined:atlanta, europe
Because eacht ini file is parsed as if it was a unique inventory.
Just add
Now you are pointing your inventory to the production file which only
holds an empty group 'smtp'.
Can you help me how to refer the group inside Inventories/Inventory1 ?