openshift-ansible: Failures with ansible 2.2.1.0
We’re seeing yaml rendering issues with our code and 2.2.1.0. Need to sort out if we need to fix something or if ansible will be fixing things.
Upstream references https://github.com/ansible/ansible/issues/20290 https://github.com/ansible/ansible/issues/20253
TASK [openshift_master : set_fact] *********************************************
task path: /home/rdu/sdodson/git/Openshift/openshift-ansible/roles/openshift_master/tasks/main.yml:146
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 126, in run
res = self._execute()
File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 443, in _execute
self._task.post_validate(templar=templar)
File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 248, in post_validate
super(Task, self).post_validate(templar)
File "/usr/lib/python2.7/site-packages/ansible/playbook/base.py", line 373, in post_validate
value = templar.template(getattr(self, name))
File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 427, in template
disable_lookups=disable_lookups,
File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 383, in template
disable_lookups=disable_lookups,
File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 583, in do_template
res = j2_concat(rf)
File "<template>", line 9, in root
File "/home/rdu/sdodson/git/Openshift/openshift-ansible/filter_plugins/openshift_master.py", line 488, in translate_idps
return yaml.safe_dump([idp.to_dict() for idp in idp_list], default_flow_style=False)
File "/usr/lib64/python2.7/site-packages/yaml/__init__.py", line 218, in safe_dump
return dump_all([data], stream, Dumper=SafeDumper, **kwds)
File "/usr/lib64/python2.7/site-packages/yaml/__init__.py", line 190, in dump_all
dumper.represent(data)
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 28, in represent
node = self.represent_data(data)
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 57, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 215, in represent_list
return self.represent_sequence(u'tag:yaml.org,2002:seq', data)
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 101, in represent_sequence
node_item = self.represent_data(item)
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 57, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 223, in represent_dict
return self.represent_mapping(u'tag:yaml.org,2002:map', data)
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 123, in represent_mapping
node_value = self.represent_data(item_value)
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 67, in represent_data
node = self.yaml_representers[None](self, data)
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 247, in represent_undefined
raise RepresenterError("cannot represent an object: %s" % data)
RepresenterError: cannot represent an object: htpasswd_auth
fatal: [ose3-master.example.com]: FAILED! => {
"failed": true,
"msg": "Unexpected failure during module execution.",
"stdout": ""
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 51 (25 by maintainers)
Commits related to this issue
- Temp ansible version change to 2.2.0.0 due to bug: https://github.com/openshift/openshift-ansible/issues/3111 — committed to BorisB2015/azure-quickstart-templates by deleted user 7 years ago
- openshift: Use ansible 2.2.1.0-2 from the paas sig repo This build contains a fix for ansible that lets the installation of openshift (via openshift-ansible) pass. See: https://github.com/openshift/... — committed to obnoxxx/vagrant-heketi by obnoxxx 7 years ago
Well, personally, I think we should ship an Openshift-ansible container which has all the bits.
same problem with ansible 2.2.2.0
Looking forward to it. When it’s available, we can close this.
Ansible 2.2.2.0 has been released, it should be available in F25 and EPEL shortly. OCP channels will be updated after we’ve validated this version.
@Delmonte3161 That’s the same problem. You can get ansible-2.2.1.0-2.el7 from the Centos PaaS SIG repo at http://mirror.centos.org/centos/7/paas/x86_64/openshift-origin/
@jberkus @maxamillion the current situation is far from ideal by any means.
To give a bit more context:
I’m wondering if it would make sense to deliver OpenShift and openshift-ansible through a separate repo (or ideally repos, where each version is a separate repo) similar to how we are shipping in RHEL and CentOS. I think there are quite a few different reasons for why, but in this particular case, it would have allowed us to ship the patched Ansible version without affecting non-OpenShift users.
Just downgrade Ansible to from 2.2.1 to 2.2.0 using the YUM command below. (no other commands required)
# yum downgrade ansibleWe’ve also got ansible-2.2.0.0 in the centos paas sig common repo http://mirror.centos.org/centos/7/paas/x86_64/openshift-origin/common/ansible-2.2.0.0-1.el7.noarch.rpm If you choose to downgrade to 2.2.0.0 it should be noted that version is vulnerable to CVE-2016-9587, see https://bugzilla.redhat.com/show_bug.cgi?id=1404378
I can confirm that downgrading ansible-2.2.1.0-1.el7.noarch.rpm from epel-release-7-9 to ansible-2.2.0.0-4.el7.noarch.rpm from epel-release-7-8 is a workaround for a successful openshift-ansible v1.4 installation. Regards, Armin.