Hi,
I have been searching all over the internet and there isn’t any good documentation that explains how to build my inventory properly. The official documentation is bad and there aren’t any example on inet that I could find.
Can you please help me? I need to build inventory file that contains 6 groups total and each group will have around 100 hosts in it…
this is what I currently have.
all:
hosts:
POC-ENV:
hosts:
ansible_host: /home/ansible/MACCABI/hosts/POC-ENV_list.yml
Nexus:
hosts:
ansible_host: /home/ansible/MACCABI/hosts/nexus_list.yml
Switches:
hosts:
ansible_host: /home/ansible/MACCABI/hosts/switch_list.yml
Avaya:
hosts:
ansible_host: /home/ansible/MACCABI/avaya_list.yml
Branch-Switches:
hosts:
ansible_host: /home/ansible/MACCABI/branch-switch_list.yml
Branch-Routers:
hosts:
ansible_host: /home/ansible/MACCABI/branch-router_list.yml
As you can see there are 6 groups: POC-ENV, Nexus, Switches, Avaya, Branch-Switches, Branch-Routers and I am trying to list all the hosts in a file and direct the inventory to read it from there since I have so many.
What am I doing wrong? can you fix my code?
Thanks for the helpers.