From 5668267f47f1fc7ca72337d8297ea77ae81ab89d Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 10 Jun 2018 16:38:09 +0100 Subject: [PATCH] tests: import debug_ansible_playbook.sh. --- tests/ansible/debug_run_ansible_playbook.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tests/ansible/debug_run_ansible_playbook.sh diff --git a/tests/ansible/debug_run_ansible_playbook.sh b/tests/ansible/debug_run_ansible_playbook.sh new file mode 100755 index 00000000..ab2c9385 --- /dev/null +++ b/tests/ansible/debug_run_ansible_playbook.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Wrap ansible-playbook, setting up some test of the test environment. + +# Used by delegate_to.yml to ensure "sudo -E" preserves environment. +export I_WAS_PRESERVED=1 +export MITOGEN_MAX_INTERPRETERS=3 + +if [ "${ANSIBLE_STRATEGY:0:7}" = "mitogen" ] +then + EXTRA='{"is_mitogen": true}' +else + EXTRA='{"is_mitogen": false}' +fi + +exec ~/src/cpython/venv/bin/ansible-playbook -e "$EXTRA" -e ansible_python_interpreter=/Users/dmw/src/cpython/venv/bin/python2.7 "$@"