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: I6ff22dd4438df02b4a485ae75e8ea895c0f8f57e
This commit is contained in:
Jesse Pretorius 2018-11-30 16:29:12 +00:00
parent f77f921771
commit 5accd3d078
2 changed files with 2 additions and 2 deletions

View File

@ -18,6 +18,7 @@ debug: False
# for the service setup. The host must already have
# clouds.yaml properly configured.
sahara_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
sahara_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((sahara_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'

View File

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