Use the host python interpreter when delegating to localhost

In order to ensure that the localhost delegated task uses the host
python interpreter (to access host-installed libs like
python-selinux), the interpreter is set on the task.

Change-Id: Ic2a360bfa64f7e3968f0f56f8c46e7b0b5ca57bb
see: https://review.openstack.org/#/c/474565/
This commit is contained in:
Marc Gariepy 2017-06-19 08:00:56 -04:00
parent 975a6e20da
commit 234ec64b13

View File

@ -29,6 +29,8 @@
dest: "/var/tmp/openstack-nova-key.sh"
mode: "0755"
delegate_to: localhost
vars:
ansible_python_interpreter: "/usr/bin/python"
when:
- inventory_hostname == first_available_compute
tags: