From 6170d71caab31ef883a0878b5fd6830c01a00847 Mon Sep 17 00:00:00 2001 From: Kourosh Vivan Date: Tue, 25 Feb 2020 11:15:34 +0100 Subject: [PATCH] Fix python path when deploy host is not localhost When we don't use localhost as deploy host, we need to use manila_service_setup_host_python_interpreter variable. This variable give the correct python path (in a venv for example when we use a utility container as a setup host) Change-Id: I34070aad44cfcbb59773196b0f74c10225bc9124 --- defaults/main.yml | 1 + tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 408d1cb..3218c92 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -22,6 +22,7 @@ manila_pip_package_state: "latest" # for the service setup. The host must already have # clouds.yaml properly configured. manila_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" +manila_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((manila_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}" # Set installation method. manila_install_method: "source" diff --git a/tasks/main.yml b/tasks/main.yml index 546dd38..7c3d77e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -143,7 +143,7 @@ _service_adminuri_insecure: "{{ keystone_service_adminuri_insecure }}" _service_in_ldap: "{{ manila_service_in_ldap }}" _service_setup_host: "{{ manila_service_setup_host }}" - _service_setup_host_python_interpreter: "{{ (manila_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}" + _service_setup_host_python_interpreter: "{{ manila_service_setup_host_python_interpreter }}" _service_project_name: "{{ manila_service_project_name }}" _service_region: "{{ manila_service_region }}" _service_endpoints: "{{ manila_service_endpoints }}"