diff --git a/defaults/main.yml b/defaults/main.yml index 8d4d78c..383d545 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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' diff --git a/tasks/sahara_service_setup.yml b/tasks/sahara_service_setup.yml index 5b4ed5d..101f9d2 100644 --- a/tasks/sahara_service_setup.yml +++ b/tasks/sahara_service_setup.yml @@ -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: