summaryrefslogtreecommitdiff
path: root/test/integration/targets/delegate_to
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2019-03-11 17:18:39 -0700
committerMatt Clay <matt@mystile.com>2019-03-11 21:43:58 -0700
commit759e037edcb2f4fc28718a72cc520d3cd572ddf8 (patch)
tree615c5d393e3ba6a3dc23ecf1f0400d80b40900b6 /test/integration/targets/delegate_to
parentc8c326d88e10d6d0f9ea46824bdcd5305f5412da (diff)
downloadansible-759e037edcb2f4fc28718a72cc520d3cd572ddf8.tar.gz
Fix integration tests with custom inventory.
All inventory hosts to which a connection is actually established should declare ansible_python_interpreter to avoid interpreter auto-discovery, as that may select the wrong interpreter.
Diffstat (limited to 'test/integration/targets/delegate_to')
-rw-r--r--test/integration/targets/delegate_to/inventory3
-rw-r--r--test/integration/targets/delegate_to/test_delegate_to_loop_randomness.yml1
2 files changed, 4 insertions, 0 deletions
diff --git a/test/integration/targets/delegate_to/inventory b/test/integration/targets/delegate_to/inventory
index dfd3a95372..8bf94347aa 100644
--- a/test/integration/targets/delegate_to/inventory
+++ b/test/integration/targets/delegate_to/inventory
@@ -3,3 +3,6 @@ testhost ansible_connection=local
testhost2 ansible_connection=local
testhost3 ansible_ssh_host=127.0.0.3
testhost4 ansible_ssh_host=127.0.0.4
+
+[local:vars]
+ansible_python_interpreter="{{ ansible_playbook_python }}"
diff --git a/test/integration/targets/delegate_to/test_delegate_to_loop_randomness.yml b/test/integration/targets/delegate_to/test_delegate_to_loop_randomness.yml
index 4513228614..81033a16a0 100644
--- a/test/integration/targets/delegate_to/test_delegate_to_loop_randomness.yml
+++ b/test/integration/targets/delegate_to/test_delegate_to_loop_randomness.yml
@@ -8,6 +8,7 @@
name: "foo{{item}}"
groups: foo
ansible_connection: local
+ ansible_python_interpreter: "{{ ansible_playbook_python }}"
loop: "{{ range(10)|list }}"
# We expect all of the next 3 runs to succeeed