Hi guys,
I want to start and say that I’m really new to Ansible. Lately I’ve started working with inventories to manage my hosts on different platforms (on-prem, cloud etc.). I’ve explored group_vars and host_vars and all of that works fine in a very very simple setup, where I define one or two groups and include these hosts. But I want more :).
The thing I’m struggling with (and maybe I’m not aware of the limitations yet, or it’s just my lack of knowledge at this point) is that I’d like to set up an inventory in AAP based on the following inventory file. Basically I want to be able to distinguish ‘hana’ systems and ‘netweaver’ systems, in different cloud regions and either nonprod or prod.
---
all:
azure:
children:
weu:
children:
hana:
children:
nonprod:
hosts:
s10000001.customer.com:
s10000002.customer.com:
prod:
hosts:
s11000001.customer.com:
netweaver:
children:
nonprod:
hosts:
s20000001.customer.com:
s20000002.customer.com:
frc:
children:
hana:
children:
nonprod:
hosts:
s30000001.customer.com:
s30000002.customer.com:
If I run this file through the inventory sync on AAP it doesn’t show any hosts or groups as a result. Clearly I’m doing something wrong and I probably can’t grasp the full concept yet, but I’m hoping you guys can help me find a solution to make this work.
Thanks,
Niels