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: I4ec936dc851bec61227d015d6126df9d566d7232
This commit is contained in:
Jesse Pretorius 2017-06-15 13:42:42 +01:00
parent c9017ca92a
commit 393175577c
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,8 @@
mode: "0755"
delegate_to: localhost
run_once: true
vars:
ansible_python_interpreter: "/usr/bin/python"
- name: Copy templated hosts file entries script
template: