diff --git a/defaults/main.yml b/defaults/main.yml index ff34ea0..c067cb0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -21,6 +21,8 @@ gnocchi_identity_only: False # for the service setup. The host must already have # clouds.yaml properly configured. gnocchi_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" +gnocchi_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((gnocchi_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}" + #: Enable for debug logging level debug: false diff --git a/tasks/gnocchi_service_setup.yml b/tasks/gnocchi_service_setup.yml index e9f7187..3bb53b8 100644 --- a/tasks/gnocchi_service_setup.yml +++ b/tasks/gnocchi_service_setup.yml @@ -21,8 +21,7 @@ - name: Setup the service delegate_to: "{{ gnocchi_service_setup_host }}" vars: - ansible_python_interpreter: >- - {{ (gnocchi_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }} + ansible_python_interpreter: "{{ gnocchi_service_setup_host_python_interpreter }}" block: - name: Add service to the keystone service catalog os_keystone_service: