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: Id8c2dfe7f3f82e0945d1b4b0027911a692cf1e8b
Jesse Pretorius 4 months ago
parent
commit
455c2b4433
2 changed files with 2 additions and 2 deletions
  1. 1
    0
      defaults/main.yml
  2. 1
    2
      tasks/congress_service_setup.yml

+ 1
- 0
defaults/main.yml View File

@@ -21,6 +21,7 @@ debug: False
21 21
 # for the service setup. The host must already have
22 22
 # clouds.yaml properly configured.
23 23
 congress_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
24
+congress_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((congress_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
24 25
 
25 26
 ## Set the package install state for distribution packages
26 27
 congress_pip_package_state: "latest"

+ 1
- 2
tasks/congress_service_setup.yml View File

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

Loading…
Cancel
Save