Skip to content

Commit 65c8a42

Browse files
committed
tests: Use same verbosity when re-executing Ansible inside a playbook
1 parent 05d98e5 commit 65c8a42

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 }}"
@@ -60,6 +62,7 @@
6062
ANSIBLE_ANY_ERRORS_FATAL=false
6163
ANSIBLE_STRATEGY=mitogen_linear
6264
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
65+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
6366
ansible -m shell -a whoami
6467
{% for inv in ansible_inventory_sources %}
6568
-i "{{ inv }}"
@@ -76,6 +79,7 @@
7679
ANSIBLE_ANY_ERRORS_FATAL=false
7780
ANSIBLE_STRATEGY=mitogen_linear
7881
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
82+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
7983
ansible -m shell -a whoami
8084
{% for inv in ansible_inventory_sources %}
8185
-i "{{ inv }}"
@@ -100,6 +104,7 @@
100104
ANSIBLE_ANY_ERRORS_FATAL=false
101105
ANSIBLE_STRATEGY=mitogen_linear
102106
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
107+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
103108
ansible -m shell -a whoami
104109
{% for inv in ansible_inventory_sources %}
105110
-i "{{ inv }}"
@@ -116,6 +121,7 @@
116121
ANSIBLE_ANY_ERRORS_FATAL=false
117122
ANSIBLE_STRATEGY=mitogen_linear
118123
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
124+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
119125
ansible -m shell -a whoami
120126
{% for inv in ansible_inventory_sources %}
121127
-i "{{ inv }}"
@@ -145,6 +151,7 @@
145151
ANSIBLE_ANY_ERRORS_FATAL=false
146152
ANSIBLE_STRATEGY=mitogen_linear
147153
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
154+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
148155
ansible -m shell -a whoami
149156
{% for inv in ansible_inventory_sources %}
150157
-i "{{ inv }}"
@@ -161,6 +168,7 @@
161168
ANSIBLE_ANY_ERRORS_FATAL=false
162169
ANSIBLE_STRATEGY=mitogen_linear
163170
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
171+
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
164172
ansible -m shell -a whoami
165173
{% for inv in ansible_inventory_sources %}
166174
-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)