tests: Eliminate MITOGEN_INVENTORY_FILE

Replaced with ansible_inventory_sources.
pull/964/head
Alex Willmer 2 years ago
parent 900760e913
commit 1ed932e8d5

@ -10,7 +10,11 @@
- shell: >
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -c local -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
ansible -m shell -c local -a whoami
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
args:
chdir: ../..
register: out

@ -7,7 +7,9 @@
connection: local
command: |
ansible -vvv
-i "{{MITOGEN_INVENTORY_FILE}}"
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-m missing_module
args:

@ -9,7 +9,9 @@
ANSIBLE_SSH_TIMEOUT: 10
command: |
ansible -vvv
-i "{{MITOGEN_INVENTORY_FILE}}"
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-m custom_python_detect_environment
-e ansible_user=mitogen__slow_user -e ansible_password=slow_user_password

@ -18,7 +18,11 @@
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-e ansible_ssh_user=mitogen__has_sudo
-e ansible_ssh_pass=has_sudo_password
args:
@ -31,7 +35,11 @@
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-e ansible_ssh_user=mitogen__has_sudo
-e ansible_ssh_pass=wrong_password
args:
@ -52,7 +60,11 @@
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-e ansible_user=mitogen__has_sudo
-e ansible_ssh_pass=has_sudo_password
args:
@ -65,7 +77,11 @@
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-e ansible_user=mitogen__has_sudo
-e ansible_ssh_pass=wrong_password
args:
@ -86,7 +102,11 @@
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-e ansible_user=mitogen__has_sudo
-e ansible_password=has_sudo_password
args:
@ -99,7 +119,11 @@
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-e ansible_user=mitogen__has_sudo
-e ansible_password=wrong_password
args:
@ -125,7 +149,11 @@
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-e ansible_user=mitogen__has_sudo_pubkey
-e ansible_ssh_private_key_file=../data/docker/mitogen__has_sudo_pubkey.key
args:
@ -138,7 +166,11 @@
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
test-targets
-e ansible_user=mitogen__has_sudo
-e ansible_ssh_private_key_file=/dev/null
args:

@ -5,7 +5,9 @@
- connection: local
command: |
ansible-playbook
-i "{{MITOGEN_INVENTORY_FILE}}"
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
-vvv
integration/strategy/_mixed_mitogen_vanilla.yml
args:
@ -15,7 +17,9 @@
- connection: local
command: |
ansible-playbook
-i "{{MITOGEN_INVENTORY_FILE}}"
{% for inv in ansible_inventory_sources %}
-i "{{ inv }}"
{% endfor %}
-vvv
integration/strategy/_mixed_vanilla_mitogen.yml
args:

@ -40,15 +40,6 @@ extra = {
'git_basedir': GIT_BASEDIR,
}
if '-i' in sys.argv:
extra['MITOGEN_INVENTORY_FILE'] = (
os.path.abspath(sys.argv[1 + sys.argv.index('-i')])
)
else:
extra['MITOGEN_INVENTORY_FILE'] = (
os.path.join(GIT_BASEDIR, 'tests/ansible/hosts')
)
if 'ANSIBLE_ARGV' in os.environ:
args = eval(os.environ['ANSIBLE_ARGV'])
else:

Loading…
Cancel
Save