Variables to hosts - nsg/ansible-inventory GitHub Wiki
You can also assign host variables in the inventory, this is the same like myhost.example.com foo=1
in the ini inventory.
root:
- name: myhost.example.com
foo: 1
In this example I use the name
option, this is needed if you have anything except a simple list of hosts. The following two examples are identical.
root:
- name: myhost
root:
- myhost