Description of problem: Version-Release number of the following components: rpm -q openshift-ansible rpm -q ansible ansible --version openshift-ansible-3.6.173.0.5-3.git.0.522a92a.el7.noarch ansible-2.3.1.0-3.el7.noarch ansible 2.3.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.5 (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)] How reproducible: All the time Steps to Reproduce: 1. Create ansible file using the example in the hosts example file, with openshift_master_named_certificates 2. run ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml 3. Actual results: Using /etc/ansible/ansible.cfg as config file ERROR! Attempted to read "/etc/ansible/hosts" as YAML: Syntax Error while loading YAML. The error appears to have been in '/etc/ansible/hosts': line 1, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: [OSEv3:children] ^ here Attempted to read "/etc/ansible/hosts" as ini file: /etc/ansible/hosts:59: Expected key=value, got: openshift_hosted_routers: Expected results: Installation proceeded
I think the example inventory just needs to have the value enclosed on []
you have to change openshift_hosted_routers setting value into json format, just like openshift_hosted_routers='[object_list]'. In ose.example, the value is being shown as yaml format just for easy human reading.
I've opened https://github.com/openshift/openshift-ansible/pull/5268 which changes the example format to ini to make it clear. We could include both formats for easy reading as well.
(In reply to Johnny Liu from comment #4) > you have to change openshift_hosted_routers setting value into json format, > just like openshift_hosted_routers='[object_list]'. In ose.example, the > value is being shown as yaml format just for easy human reading. That i have done, that is what is working, the example inventory is not working for me. hence this bug report.
Seem like /usr/share/doc/openshift-ansible-docs-3.6.173.0.49/docs/example-inventories/hosts.ose.example is not updated. The fix is landed into openshift-ansible master branch, but due to this fix is targeted for 3.6, so the fix should be backported to 3.6.
release-3.6: https://github.com/openshift/openshift-ansible/pull/11345
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/RHBA-2019:0614