commit 1dba8cf97f84e8b57000b30f24e0d485d2b0f2fb Author: Andrew Bonney Date: Fri Oct 2 08:27:05 2020 +0100 Fix python interpreter bug for designate source installs on train When performing post install tasks, the openstacksdk is imported using a python2 interpreter in a Ubuntu Bionic utility container (as a result of a fallback to ansible_python['executable']). This fails as the utility container has been set up using python3. This patch corrects the python interpreter to match the variable already used in service_setup.yml. This is a partial backport of https://review.opendev.org/#/c/745696/ Depends-On: https://review.opendev.org/756057 Change-Id: I3a4a1823a9c9a05164e8a1654a5c39d6c935bbb9 diff --git a/tasks/designate_post_install.yml b/tasks/designate_post_install.yml index cff0544..92fd760 100644 --- a/tasks/designate_post_install.yml +++ b/tasks/designate_post_install.yml @@ -16,8 +16,7 @@ - name: Get project id for managed resources delegate_to: "{{ designate_service_setup_host }}" vars: - ansible_python_interpreter: >- - {{ (designate_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }} + ansible_python_interpreter: "{{ designate_service_setup_host_python_interpreter }}" os_project_facts: cloud: default name: "{{ designate_managed_resource_project_name }}"