run-buildset-registry: Fix python version check

The "Start the buildset registry" task, which uses the
docker_container Ansible module, was failing with:

    "No module named 'requests'"

This is because the earlier package install task was installing
the packages into the wrong python version because the
ansible_python_interpreter value was 'auto' and thus never
included the 'python3' value.

Change-Id: I887fdf8d000c8b916fdab281c531b7c98bdd5ae2
This commit is contained in:
David Shrewsbury 2019-10-31 12:07:03 -04:00
parent d7b86832b2
commit ce67cef122

View File

@ -6,7 +6,7 @@
- openssl
- python-passlib
state: present
when: "'python3' not in ansible_python_interpreter"
when: ansible_python_version is version('3', '<')
- name: Install packages
become: yes
package:
@ -15,7 +15,7 @@
- openssl
- python3-passlib
state: present
when: "'python3' in ansible_python_interpreter"
when: ansible_python_version is version('3', '>=')
- name: Ensure registry volume directories exists
file:
state: directory