Hi List/James,
If you discover any errors related to this beta release, or if you see
regressions from playbooks which work on 1.9.x and prior, please open a
Github issue and be sure to mention which version you're testing.
Before opening an issue, just a probe here.
It seems that ansible 2.0 does not support multiple inventory files in
the same directory, like it did before.
I think it should work, since it is:
1- handy
2- mentioned in the docs:
"Not only is this inventory configurable, but you can also
use multiple inventory files at the same time (explained below)"
(note that, unless I missed it, it is not "explained below").
This being said, here is a small test setup:
$ grep elastic1 inventories/devel/*
inventories/devel/generated:elastic1 from_generated="yes"
inventories/devel/hosts:elastic1 from_hosts="yes"
So here we have two inventory files (named `generated` and `hosts`). In
each file, we define a variable for the host `elastic1` (respectively
`from_generated` and `from_hosts`) and set is to the string "yes".
With 1.9.4, all is fine:
$ ansible --version
ansible 1.9.4
configured module search path = None
$ ansible elastic1 -i inventories/devel/ -m debug -a
'msg="{{from_generated}} {{from_hosts}}"'
elastic1 | success >> {
"msg": "yes yes"
}
Now ansible 2.0b3:
$ ansible --version
ansible 2.0.0 (detached HEAD 07b588f6c0) last updated 2015/11/16
20:52:36 (GMT +200)
$ ansible elastic1 -i inventories/devel/ -m debug -a
'msg="{{from_generated}} {{from_hosts}}"'
elastic1 | FAILED! => {
"failed": true,
"msg": "ERROR! 'from_hosts' is undefined"
}
$ ansible elastic1 -i inventories/devel/ -m debug -a
'msg="{{from_generated}}"'
elastic1 | SUCCESS => {
"changed": false,
"msg": "yes"
}
If I rename `generated` to `zippy`:
$ mv inventories/devel/generated inventories/devel/zippy
$ ansible elastic1 -i inventories/devel/ -m debug -a
'msg="{{from_generated}}"'
elastic1 | FAILED! => {
"failed": true,
"msg": "ERROR! 'from_generated' is undefined"
}
$ ansible elastic1 -i inventories/devel/ -m debug -a 'msg="{{from_hosts}}"'
elastic1 | SUCCESS => {
"changed": false,
"msg": "yes"
}
So it seems Ansible now read inventory from the first file found (sorted
alpha) and stops here.
Is this the intended behavior or should an issue be opened ?
Thanks,
M