DescriptionYurii Prokulevych
2017-08-17 11:26:49 UTC
Description of problem:
-----------------------
Null values are not handled correctly, which leads to just key being dumped to the inventory file.
E.g:
/usr/bin/tripleo-ansible-inventory --static-inventory oc-hosts
ansible -i oc-hosts Controllers -m ping -vv
Using /etc/ansible/ansible.cfg as config file
ERROR! Attempted to read "oc-hosts" as YAML: Syntax Error while loading YAML.
The error appears to have been in '/home/stack/oc-hosts': line 1, column 16, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
[aodh_evaluator:vars]
^ here
Attempted to read "oc-hosts" as ini file: oc-hosts:366: Expected key=value, got: cacert
Offending line:
===============
[undercloud:vars]
...
auth_url = http://192.168.24.1:5000/
ansible_connection = local
--->cacert
undercloud_swift_url = http://192.168.24.1:8080/v1/AUTH_f83abc228845445dbc8cea361ee276ff
plan = overcloud
And when passing output through 'python -m json.tool':
======================================================
/usr/bin/tripleo-ansible-inventory --list | python -m json.tool
...
"undercloud": {
"hosts": [
"localhost"
],
"vars": {
"ansible_connection": "local",
"auth_url": "http://192.168.24.1:5000/",
"cacert": null,
"undercloud_swift_url": "http://192.168.24.1:8080/v1/AUTH_f83abc228845445dbc8cea361ee276ff",
"username": "admin"
}
...
Version-Release number of selected component (if applicable):
-------------------------------------------------------------
openstack-tripleo-validations-7.2.1-0.20170807182119.1f60b6f.el7ost.noarch
How reproducible:
-----------------
So far 100%
(In reply to Gaël Chamoulaud from comment #2)
> FYI, This issue was fixed in the openstack/tripleo-validations 7.3.0
> upstream release [1].
>
> [1] - https://review.openstack.org/#/c/495965/
And this change was included into openstack-tripleo-validations-7.3.1-0.20170831052729.67faa39.el7ost build.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2017:3462