Browse Source

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: Ib5245e5f13c8de41a6ca020be53781195903498d
Jesse Pretorius 4 months ago
parent
commit
844c493891
2 changed files with 2 additions and 2 deletions
  1. 1
    0
      defaults/main.yml
  2. 1
    2
      tasks/magnum_service_setup.yml

+ 1
- 0
defaults/main.yml View File

@@ -23,6 +23,7 @@ magnum_ceilometer_enabled: False
23 23
 # for the service setup. The host must already have
24 24
 # clouds.yaml properly configured.
25 25
 magnum_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
26
+magnum_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((magnum_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
26 27
 
27 28
 # Set the package install state for distribution and pip packages
28 29
 # Options are 'present' and 'latest'

+ 1
- 2
tasks/magnum_service_setup.yml View File

@@ -21,8 +21,7 @@
21 21
 - name: Setup the service
22 22
   delegate_to: "{{ magnum_service_setup_host }}"
23 23
   vars:
24
-    ansible_python_interpreter: >-
25
-      {{ (magnum_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}
24
+    ansible_python_interpreter: "{{ magnum_service_setup_host_python_interpreter }}"
26 25
   block:
27 26
     - name: Add service to the keystone service catalog
28 27
       os_keystone_service:

Loading…
Cancel
Save