tests: Use same verbosity when re-executing Ansible inside a playbook

pull/1060/head
Alex Willmer 7 months ago
parent 05d98e5b49
commit 65c8a42c13

@ -10,6 +10,8 @@
- name: Run _disconnect_during_module.yml - name: Run _disconnect_during_module.yml
delegate_to: localhost delegate_to: localhost
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible-playbook ansible-playbook
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}

@ -10,6 +10,7 @@
- shell: > - shell: >
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -c local -a whoami ansible -m shell -c local -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"

@ -5,8 +5,10 @@
tasks: tasks:
- name: Run missing_module - name: Run missing_module
connection: local connection: local
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible -vvv ansible
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
{% endfor %} {% endfor %}

@ -14,8 +14,9 @@
connection: local connection: local
environment: environment:
ANSIBLE_SSH_TIMEOUT: 10 ANSIBLE_SSH_TIMEOUT: 10
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible -vvv ansible
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
{% endfor %} {% endfor %}

@ -20,6 +20,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -36,6 +37,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -60,6 +62,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -76,6 +79,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -100,6 +104,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -116,6 +121,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -145,6 +151,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -161,6 +168,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"

@ -3,24 +3,26 @@
hosts: test-targets[0] hosts: test-targets[0]
tasks: tasks:
- connection: local - connection: local
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible-playbook ansible-playbook
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
{% endfor %} {% endfor %}
-vvv
integration/strategy/_mixed_mitogen_vanilla.yml integration/strategy/_mixed_mitogen_vanilla.yml
args: args:
chdir: ../.. chdir: ../..
register: out register: out
- connection: local - connection: local
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible-playbook ansible-playbook
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
{% endfor %} {% endfor %}
-vvv
integration/strategy/_mixed_vanilla_mitogen.yml integration/strategy/_mixed_vanilla_mitogen.yml
args: args:
chdir: ../.. chdir: ../..

@ -12,6 +12,8 @@
- include_tasks: _end_play_if_not_sudo_linux.yml - include_tasks: _end_play_if_not_sudo_linux.yml
- name: Run stub-lxc-info.py - name: Run stub-lxc-info.py
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible" sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible"
-i localhost, -i localhost,

@ -12,6 +12,8 @@
- include_tasks: _end_play_if_not_sudo_linux.yml - include_tasks: _end_play_if_not_sudo_linux.yml
- name: Run ansible stub-lxc.py - name: Run ansible stub-lxc.py
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible" sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible"
-i localhost, -i localhost,

@ -6,6 +6,8 @@
tasks: tasks:
- name: Test --ask-become-pass - name: Test --ask-become-pass
delegate_to: localhost delegate_to: localhost
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
expect: expect:
command: > command: >
ansible-playbook ansible-playbook

Loading…
Cancel
Save