diff --git a/defaults/main.yml b/defaults/main.yml index 43ba78d9..a2f88d9d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -28,6 +28,7 @@ debug: False # for the service setup. The host must already have # clouds.yaml properly configured. neutron_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" +neutron_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((neutron_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}" ### ### Packages Options diff --git a/tasks/neutron_service_setup.yml b/tasks/neutron_service_setup.yml index cd8241c2..2f395253 100644 --- a/tasks/neutron_service_setup.yml +++ b/tasks/neutron_service_setup.yml @@ -21,8 +21,7 @@ - name: Setup the service delegate_to: "{{ neutron_service_setup_host }}" vars: - ansible_python_interpreter: >- - {{ (neutron_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }} + ansible_python_interpreter: "{{ neutron_service_setup_host_python_interpreter }}" block: - name: Add service to the keystone service catalog os_keystone_service: