Bug 1486808 - openshift_master_named_certificates ERROR! Attempted to read "/etc/ansible/hosts" as YAML: Syntax Error while loading YAML.
Summary: openshift_master_named_certificates ERROR! Attempted to read "/etc/ansible/ho...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.6.z
Assignee: Russell Teague
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-30 14:59 UTC by Kim Borup
Modified: 2019-04-09 09:27 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-09 09:27:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0614 0 None None None 2019-04-09 09:27:07 UTC

Description Kim Borup 2017-08-30 14:59:52 UTC
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

Comment 3 Scott Dodson 2017-08-30 15:13:06 UTC
I think the example inventory just needs to have the value enclosed on []

Comment 4 Johnny Liu 2017-08-30 15:19:41 UTC
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.

Comment 5 Andrew Butcher 2017-08-30 17:26:21 UTC
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.

Comment 6 Kim Borup 2017-08-31 07:10:19 UTC
(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.

Comment 8 Johnny Liu 2017-10-12 03:24:48 UTC
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.

Comment 10 Russell Teague 2019-03-12 20:38:25 UTC
release-3.6: https://github.com/openshift/openshift-ansible/pull/11345

Comment 15 errata-xmlrpc 2019-04-09 09:27:06 UTC
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


Note You need to log in before you can comment on or make changes to this bug.