Fix python path when deploy host is not localhost

When we don't use localhost as deploy host, we need to use
octavia_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)

Depends-On: https://review.opendev.org/687000
Change-Id: I65c023db3cb8080e57442f35e599a372519d97d7
Closes-Bug: 1835744
(cherry picked from commit 2e78130c544f5659abeeab2bbd193d0bbc800053)
This commit is contained in:
Kourosh Vivan 2019-07-09 12:28:24 +02:00 committed by Jonathan Rosser
parent e0583fd473
commit 9504628368
4 changed files with 4 additions and 8 deletions

View File

@ -21,8 +21,7 @@
- name: Setup the amphora image
delegate_to: "{{ octavia_service_setup_host }}"
vars:
ansible_python_interpreter: >-
{{ (octavia_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}
ansible_python_interpreter: "{{ octavia_service_setup_host_python_interpreter }}"
block:
- name: Create image download directory
file:

View File

@ -21,8 +21,7 @@
- name: Setup the octavia flavor
delegate_to: "{{ octavia_service_setup_host }}"
vars:
ansible_python_interpreter: >-
{{ (octavia_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}
ansible_python_interpreter: "{{ octavia_service_setup_host_python_interpreter }}"
block:
- name: Create Octavia Flavor
run_once: true

View File

@ -21,8 +21,7 @@
- name: Setup the network
delegate_to: "{{ octavia_service_setup_host }}"
vars:
ansible_python_interpreter: >-
{{ (octavia_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}
ansible_python_interpreter: "{{ octavia_service_setup_host_python_interpreter }}"
block:
- name: Create mgmt network
run_once: true

View File

@ -21,8 +21,7 @@
- name: Setup the security groups
delegate_to: "{{ octavia_service_setup_host }}"
vars:
ansible_python_interpreter: >-
{{ (octavia_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}
ansible_python_interpreter: "{{ octavia_service_setup_host_python_interpreter }}"
block:
- name: Setup the service project quota
os_quota: