Enable overriding the service setup host python interpreter

In order to enable the service setup host python interpreter to
be changed easily, we make it a variable. This will be useful
when someone sets the service setup host to be the utility
container, because we'll be able to set this var by default.

Change-Id: I3e0034739c75ca72bad4b33819e774e5c85977ac
This commit is contained in:
Jesse Pretorius 2018-11-30 14:46:23 +00:00
parent 6090bf7de4
commit 6bb1821b1d
2 changed files with 2 additions and 2 deletions

View File

@ -22,6 +22,7 @@ cinder_pip_package_state: "latest"
# for the service setup. The host must already have
# clouds.yaml properly configured.
cinder_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
cinder_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((cinder_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
# Set installation method.
cinder_install_method: "source"

View File

@ -21,8 +21,7 @@
- name: Setup the service
delegate_to: "{{ cinder_service_setup_host }}"
vars:
ansible_python_interpreter: >-
{{ (cinder_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}
ansible_python_interpreter: "{{ cinder_service_setup_host_python_interpreter }}"
block:
- name: Add services to the keystone service catalog
os_keystone_service: