Professional Documents
Culture Documents
Error-Keys Only Vars, Children, Hosts
Error-Keys Only Vars, Children, Hosts
Inventory -
yaml format :-
In yaml indentation matter a lot.
1. Everything starts with all.
2. end with ‘:’
3.
all:
children:
ungrouped:
hosts:
192.168.0.[1:3]:
servera.lab.example.com:
group1:
hosts:
db1.example.com:
db2.example.com:
ny:
hosts:
x.example.com:
y.example.com:
london:
hosts:
c.example.com:
d.example.com:
california:
children:
hosts:
group1:
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match 'all'
hosts (0):
[Trinity@localhost project]$ cat ivn/inventory
all:
n:
hosts:
192.168.0.[1:3]:
servera.lab.example.com:
ERROR- ALL SHOULD HAVE CHILDREN AND UNGROUPED IN IT
[Trinity@localhost project]$ cat ivn/inventory
all:
hosts:
192.168.0.[1:3]:
servera.lab.example.com:
group1:
hosts:
db1.example.com:
db2.example.com:
ny:
hosts:
x.example.com:
y.example.com:
london:
hosts:
c.example.com:
d.example.com:
[WARNING]: Skipping unexpected key (ny) in group (all), only "vars", "children" and "hosts" are
valid
[WARNING]: Skipping unexpected key (london) in group (all), only "vars", "children" and "hosts"
are valid
hosts (4):
192.168.0.1
192.168.0.2
192.168.0.3
servera.lab.example.com