Skip to content

Commit 67997ee

Browse files
committed
tests: Use same verbosity when re-executing Ansible inside a playbook
1 parent fd53f94 commit 67997ee

File tree

9 files changed

+26
-4
lines changed

9 files changed

+26
-4
lines changed

tests/ansible/integration/connection/disconnect_during_module.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
- name: Run _disconnect_during_module.yml
1212
delegate_to: localhost
13+
environment:
14+
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
1315
command: |
1416
ansible-playbook
1517
{% for inv in ansible_inventory_sources %}

tests/ansible/integration/process/unix_socket_cleanup.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- shell: >
1111
ANSIBLE_STRATEGY=mitogen_linear
1212
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
13+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
1314
ansible -m shell -c local -a whoami
1415
{% for inv in ansible_inventory_sources %}
1516
-i "{{ inv }}"

tests/ansible/integration/runner/missing_module.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
tasks:
66
- name: Run missing_module
77
connection: local
8+
environment:
9+
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
810
command: |
9-
ansible -vvv
11+
ansible
1012
{% for inv in ansible_inventory_sources %}
1113
-i "{{ inv }}"
1214
{% endfor %}

tests/ansible/integration/ssh/timeouts.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
connection: local
1515
environment:
1616
ANSIBLE_SSH_TIMEOUT: 10
17+
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
1718
command: |
18-
ansible -vvv
19+
ansible
1920
{% for inv in ansible_inventory_sources %}
2021
-i "{{ inv }}"
2122
{% endfor %}

tests/ansible/integration/ssh/variables.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
ANSIBLE_ANY_ERRORS_FATAL=false
2121
ANSIBLE_STRATEGY=mitogen_linear
2222
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
23+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
2324
ansible -m shell -a whoami
2425
{% for inv in ansible_inventory_sources %}
2526
-i "{{ inv }}"
@@ -36,6 +37,7 @@
3637
ANSIBLE_ANY_ERRORS_FATAL=false
3738
ANSIBLE_STRATEGY=mitogen_linear
3839
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
40+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
3941
ansible -m shell -a whoami
4042
{% for inv in ansible_inventory_sources %}
4143
-i "{{ inv }}"
@@ -59,6 +61,7 @@
5961
ANSIBLE_ANY_ERRORS_FATAL=false
6062
ANSIBLE_STRATEGY=mitogen_linear
6163
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
64+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
6265
ansible -m shell -a whoami
6366
{% for inv in ansible_inventory_sources %}
6467
-i "{{ inv }}"
@@ -75,6 +78,7 @@
7578
ANSIBLE_ANY_ERRORS_FATAL=false
7679
ANSIBLE_STRATEGY=mitogen_linear
7780
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
81+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
7882
ansible -m shell -a whoami
7983
{% for inv in ansible_inventory_sources %}
8084
-i "{{ inv }}"
@@ -98,6 +102,7 @@
98102
ANSIBLE_ANY_ERRORS_FATAL=false
99103
ANSIBLE_STRATEGY=mitogen_linear
100104
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
105+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
101106
ansible -m shell -a whoami
102107
{% for inv in ansible_inventory_sources %}
103108
-i "{{ inv }}"
@@ -114,6 +119,7 @@
114119
ANSIBLE_ANY_ERRORS_FATAL=false
115120
ANSIBLE_STRATEGY=mitogen_linear
116121
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
122+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
117123
ansible -m shell -a whoami
118124
{% for inv in ansible_inventory_sources %}
119125
-i "{{ inv }}"
@@ -142,6 +148,7 @@
142148
ANSIBLE_ANY_ERRORS_FATAL=false
143149
ANSIBLE_STRATEGY=mitogen_linear
144150
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
151+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
145152
ansible -m shell -a whoami
146153
{% for inv in ansible_inventory_sources %}
147154
-i "{{ inv }}"
@@ -158,6 +165,7 @@
158165
ANSIBLE_ANY_ERRORS_FATAL=false
159166
ANSIBLE_STRATEGY=mitogen_linear
160167
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
168+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
161169
ansible -m shell -a whoami
162170
{% for inv in ansible_inventory_sources %}
163171
-i "{{ inv }}"

tests/ansible/integration/strategy/mixed_vanilla_mitogen.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,26 @@
33
hosts: test-targets[0]
44
tasks:
55
- connection: local
6+
environment:
7+
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
68
command: |
79
ansible-playbook
810
{% for inv in ansible_inventory_sources %}
911
-i "{{ inv }}"
1012
{% endfor %}
11-
-vvv
1213
integration/strategy/_mixed_mitogen_vanilla.yml
1314
args:
1415
chdir: ../..
1516
register: out
1617

1718
- connection: local
19+
environment:
20+
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
1821
command: |
1922
ansible-playbook
2023
{% for inv in ansible_inventory_sources %}
2124
-i "{{ inv }}"
2225
{% endfor %}
23-
-vvv
2426
integration/strategy/_mixed_vanilla_mitogen.yml
2527
args:
2628
chdir: ../..

tests/ansible/integration/stub_connections/setns_lxc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
- include_tasks: _end_play_if_not_sudo_linux.yml
1313

1414
- name: Run stub-lxc-info.py
15+
environment:
16+
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
1517
command: |
1618
sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible"
1719
-i localhost,

tests/ansible/integration/stub_connections/setns_lxd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
- include_tasks: _end_play_if_not_sudo_linux.yml
1313

1414
- name: Run ansible stub-lxc.py
15+
environment:
16+
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
1517
command: |
1618
sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible"
1719
-i localhost,

tests/ansible/regression/issue_952__ask_become_pass.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
tasks:
77
- name: Test --ask-become-pass
88
delegate_to: localhost
9+
environment:
10+
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
911
expect:
1012
command: >
1113
ansible-playbook

0 commit comments

Comments
 (0)