Description of problem: When deploying containers, the `site-docker.yml.sample` does not have the pre-tasks that `site.yml.sample` does which ensures Python2 is installed and available, this causes the playbook to fail as it can't find a Python executable. How reproducible: 100% of the time Steps to Reproduce: 1. On a Python3 system (e.g. Ubuntu Bionic) use site-docker.yml.sample to deploy 2. 3. Actual results: Failure happens with messaging like: > failed: [node1 -> node4] (item=node4) => {"changed": false, "item": "node4", "module_stderr": "/bin/sh: 1: /usr/bin/python: not found\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 127} Expected results: playbook installs missing dependencies if any Additional info: Adding the same pre-tasks that exist in site.yml.sample allows the playbook to continue: git diff diff --git a/site-docker.yml.sample b/site-docker.yml.sample index 82099535..bf23397a 100644 --- a/site-docker.yml.sample +++ b/site-docker.yml.sample @@ -23,6 +23,32 @@ delegate_facts_host: True pre_tasks: + # If we can't get python2 installed before any module is used we will fail + # so just try what we can to get it installed + - name: check for python2 + stat: + path: /usr/bin/python + ignore_errors: yes + register: systempython2 + + - name: install python2 for debian based systems + raw: sudo apt-get -y install python-simplejson + ignore_errors: yes + when: + - systempython2.stat is undefined or systempython2.stat.exists == false + + - name: install python2 for fedora + raw: sudo dnf -y install python creates=/usr/bin/python + ignore_errors: yes + when: + - systempython2.stat is undefined or systempython2.stat.exists == false + + - name: install python2 for opensuse + raw: sudo zypper -n install python-base creates=/usr/bin/python2.7 + ignore_errors: yes + when: + - systempython2.stat is undefined or systempython2.stat.exists == false + - name: gather facts setup: when:
Updating the QA Contact to a Hemant. Hemant will be rerouting them to the appropriate QE Associate. Regards, Giri
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-2020:0312