incomplete.io

ansible inventory

Ansible collects groups of known hosts in its inventory -- a .INI-style text file. You can either add your hosts to the default, or create a separate inventory file and tell the Ansible command line utilities to make use of it.

For our example, we'll create a file called ansible-hosts and define our Cloudshell group and hosts there:

[odroid_headless]
    192.168.1.11
    192.168.1.12
    192.168.1.13

Now we have our inventory, which contains a group called odroid_headless, which contains three hosts. We could have just as easily used DNS names here, but IP addresses are fine too.

Go Back

Twitter: @IncompleteIO