Description of problem: When trying to run Openshift Ansible playbook with htpasswd auth type ansible run is failing with following error An exception occurred during task execution. To see the full traceback, use -vvv. The error was: RepresenterError: cannot represent an object: htpasswd_auth fatal: [ec2-54-186-113-214.us-west-2.compute.amazonaws.com]: FAILED! => { "failed": true } MSG: Unexpected failure during module execution. Version-Release number of selected component (if applicable): Latest Openshift Ansible How reproducible: openshift_auth_type=htpasswd openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}] Steps to Reproduce: 1. Run the second openshift ansible playbook with attached inv file 2. ansible-playbook -i host.deploy openshift-ansible/playbooks/byo/config.yml 3. See the error Actual results: Ansible run errors out Expected results: Run should complete without error. Additional info:
This only happens with Ansible 2.2.1.0 or 2.1.4.0 which aren't included in the OSE repos. The workaround for now is to downgrade to 2.2.0.0.
https://github.com/openshift/openshift-ansible/issues/3111
Need to backport https://github.com/openshift/openshift-ansible/pull/3156 to 3.4, 3.3, 3.2
Fix requires ansible-2.2.1.0-2.el7 available in OCP repos.
(In reply to Scott Dodson from comment #5) > Fix requires ansible-2.2.1.0-2.el7 available in OCP repos. Has been testing with ansible-2.2.1.0-1 and ansible-2.2.1.0-2, both of them get listed meaaage: [root@ansible ~]# ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml Using /etc/ansible/ansible.cfg as config file FATAL: Current Ansible version (2.2.1.0) is not supported. There are known issues with Ansible version 2.2.1.0 which are impacting OpenShift-Ansible. Please use Ansible version 2.2.0.0 or a version greater than 2.2.1.0. See this issue for more details: https://github.com/openshift/openshift-ansible/issues/3111 Seems OCP 3.5 repo just have ansible-2.2.0.0-1 so far.
@Scott, Could you confirm comment 6 is expected behavior? If yes, QE would move this bug to verified status.
https://github.com/openshift/openshift-ansible/pull/3255 fixes that so that 2.2.1.0-2 is marked as OK. That version should be in today's puddles.
Verified with version atomic-openshift-utils-3.5.4-1.git.0.034b615,the ansible-2.2.1.0-2.el7.noarch can be found in OCP 3.5 repo. Installation with htpasswd auth succeed. [root@ansible ~]# ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/byo/config ... TASK [openshift_master : Install httpd-tools if needed] ************************ ... TASK [openshift_master : Ensure htpasswd directory exists] ********************* ... TASK [openshift_master : Create the htpasswd file if needed] ******************* ... TASK [openshift_master : Ensure htpasswd file exists] ************************** ...