parent
48e8f1f7aa
commit
5b916fc556
@ -1,15 +0,0 @@
|
||||
#!/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 "$@"
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
export ANSIBLE_STRATEGY=mitogen_linear
|
||||
exec ./run_ansible_playbook.sh "$@"
|
||||
exec ./run_ansible_playbook.py "$@"
|
||||
|
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
# Wrap ansible-playbook, setting up some test of the test environment.
|
||||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
# Used by delegate_to.yml to ensure "sudo -E" preserves environment.
|
||||
os.environ['I_WAS_PRESERVED'] = '1'
|
||||
|
||||
# Used by LRU tests.
|
||||
os.environ['MITOGEN_MAX_INTERPRETERS'] = '3'
|
||||
|
||||
extra = {
|
||||
'is_mitogen': os.environ.get('ANSIBLE_STRATEGY', '').startswith('mitogen'),
|
||||
'git_basedir': os.path.dirname(
|
||||
os.path.abspath(
|
||||
os.path.join(__file__, '..', '..')
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
args = ['ansible-playbook']
|
||||
args += ['-e', json.dumps(extra)]
|
||||
args += sys.argv[1:]
|
||||
os.execvp(args[0], args)
|
@ -1,15 +0,0 @@
|
||||
#!/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 ansible-playbook -e "$EXTRA" "$@"
|
Loading…
Reference in New Issue