From 393175577c3d4a8024fab2563b683dece10d46eb Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Thu, 15 Jun 2017 13:42:42 +0100 Subject: [PATCH] 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 --- tasks/openstack_update_hosts_file.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/openstack_update_hosts_file.yml b/tasks/openstack_update_hosts_file.yml index 08f36432..d9a805ea 100644 --- a/tasks/openstack_update_hosts_file.yml +++ b/tasks/openstack_update_hosts_file.yml @@ -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: