I need to write an inventory definition, in INI and YAML format, based on the following:
- "Carribean" group
- "Barbados" and "Jamaica" subgroups, inside the "Carribean" group
- 3 hosts (host1, host2, host3) inside the "Barbados" subgroup
- 1 hosts (host4) inside the "Jamaica" subgroup
What does the syntax look like for each format?
Hi there
Good question. My answer as follows:
For the YAML formatted inventory:
---
Barbados:
hosts:
host1
host2
host3
Jamaica:
hosts:
host4
Carribean:
children:
Barbados:
Jamaica:
For the INI formatted inventory:
[Barbados]
host1
host2
host3
[Jamaica]
host4
[Carribean:children]
Barbados
Jamaica
I use the INI format for day to day tasks as that is what I am more familiar with!
Thanks
Ad_astra, thanks for getting things kicked off with your respsonse!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.