From 234ec64b1381fd181ff66e28e6d41dd82b6d22c0 Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Mon, 19 Jun 2017 08:00:56 -0400 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: Ic2a360bfa64f7e3968f0f56f8c46e7b0b5ca57bb see: https://review.openstack.org/#/c/474565/ --- tasks/nova_compute_key_distribute.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/nova_compute_key_distribute.yml b/tasks/nova_compute_key_distribute.yml index 0ef50126..bca5c643 100644 --- a/tasks/nova_compute_key_distribute.yml +++ b/tasks/nova_compute_key_distribute.yml @@ -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: