Skip to content

Commit ec57d7f

Browse files
committed
[multiple] Update no_log to use cifmw_nolog variable
This change enhances the debugging experience and ensures conistent usage of the no_log variable throughout the CI Framework repository. Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
1 parent 5f5393f commit ec57d7f

File tree

14 files changed

+25
-25
lines changed

14 files changed

+25
-25
lines changed

ci/playbooks/collect-logs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,6 @@
177177
become: true
178178
ansible.builtin.shell: |
179179
journalctl -u kubelet > kubelet.log
180-
no_log: true
180+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
181181
args:
182182
chdir: "{{ ansible_user_dir }}/zuul-output/logs/"

ci/playbooks/e2e-collect-logs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
become: true
4848
ansible.builtin.shell: |
4949
journalctl -u kubelet > kubelet.log
50-
no_log: true
50+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
5151
args:
5252
chdir: "{{ ansible_user_dir }}/zuul-output/logs/"

hooks/playbooks/ceph.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
- name: Create private key if it does not exist
4848
ansible.builtin.command:
4949
cmd: "ssh-keygen -t rsa -q -N '' -f {{ private_key }}"
50-
no_log: true
50+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
5151
when:
5252
- not private_key_stat.stat.exists
5353

@@ -83,7 +83,7 @@
8383
src: "{{ lookup('env', 'HOME') }}/.ssh/{{ cifmw_admin_user }}-id_rsa"
8484
register: private_key_get
8585
delegate_to: localhost
86-
no_log: true
86+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
8787

8888
- name: Get local public key
8989
ansible.builtin.slurp:
@@ -96,7 +96,7 @@
9696
cifmw_admin_pubkey: "{{ public_key_get['content'] | b64decode }}"
9797
cifmw_admin_prikey: "{{ private_key_get['content'] | b64decode }}"
9898
cifmw_admin_distribute_private_key: true
99-
no_log: true
99+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
100100

101101
- name: Create Block Device on target nodes
102102
tags: block
@@ -332,7 +332,7 @@
332332
- name: Generate a cephx key
333333
cephx_key:
334334
register: cephx
335-
no_log: true
335+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
336336

337337
- name: Set cifmw_cephadm_keys with the cephx key and cifmw_cephadm_pools
338338
ansible.builtin.set_fact:
@@ -347,7 +347,7 @@
347347
'profile rbd pool=\\1') | join(', ') }}"
348348
vars:
349349
pools: "{{ cifmw_cephadm_pools | map(attribute='name') | list }}"
350-
no_log: true
350+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
351351

352352
# for deploying external ceph for 17.1 using cifmw, we need this playbook to create keyring
353353
# for manila client and manila_data pool
@@ -370,7 +370,7 @@
370370
pg_autoscale_mode: true
371371
application: cephfs
372372
when: adoption_deploy_ceph_for_tripleo | default (false)
373-
no_log: true
373+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
374374

375375
# public network always exist because is provided by the ceph_spec role
376376
- name: Get Storage network range

roles/adoption_osp_deploy/tasks/login_registries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
block:
2222
- name: Make redhat subscription
2323
become: true
24-
no_log: true
24+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
2525
community.general.redhat_subscription:
2626
activationkey: "{{ cifmw_adoption_osp_deploy_rhsm_key }}"
2727
org_id: "{{ cifmw_adoption_osp_deploy_rhsm_org }}"
@@ -58,7 +58,7 @@
5858

5959
- name: Login to container registry both zuul and root users
6060
become: "{{ item == 'root' }}"
61-
no_log: true
61+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
6262
ansible.builtin.command: >
6363
podman login
6464
--username "{{ _container_user }}"

roles/ci_dcn_site/tasks/remove_node.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,4 @@
228228
content: "{{ item.content | b64decode | from_yaml | ansible.utils.remove_keys(target=[_node_to_remove]) | to_nice_yaml }}"
229229
mode: '0644'
230230
with_items: "{{ vars_files.results }}"
231-
no_log: true
231+
no_log: "{{ cifmw_nolog | default(true) | bool }}"

roles/ci_dcn_site/tasks/scaledown_site.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
cinder_prefix: "{{ (item.metadata.name | regex_search('^(cinder-[a-z0-9]+)')) }}"
193193
loop: "{{ pod_list.resources }}"
194194
when: item.metadata.name is match('^cinder-.*-scheduler-0$')
195-
no_log: true
195+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
196196

197197
- name: Delete the cinder-volume service
198198
kubernetes.core.k8s_exec:

roles/ci_setup/tasks/packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
{{ cifmw_ci_setup_oc_install_path }}/oc completion bash |
7474
tee -a ~/.oc_completion
7575
creates: "{{ ansible_user_dir }}/.oc_completion"
76-
no_log: true
76+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
7777

7878
- name: Source completion from within .bashrc
7979
ansible.builtin.blockinfile:

roles/cifmw_ceph_client/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@
6060
src: "{{ cifmw_ceph_client_fetch_dir }}/{{ cifmw_ceph_client_cluster | default('ceph') }}.conf"
6161
register: cifmw_ceph_client_conf_file_b64
6262
delegate_to: localhost
63-
no_log: true
63+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
6464

6565
- name: Base64 encode cephx key file
6666
tags: k8s
6767
ansible.builtin.slurp:
6868
src: "{{ cifmw_ceph_client_fetch_dir }}/{{ cifmw_ceph_client_cluster | default('ceph') }}.client.openstack.keyring"
6969
register: cifmw_ceph_client_key_file_b64
7070
delegate_to: localhost
71-
no_log: true
71+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
7272

7373
- name: Create k8s_ceph_secret.yml with base64 encoded files
7474
tags: k8s

roles/cifmw_external_dns/tasks/cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# under the License.
1616

1717
- name: Remove key and certificate files on target host
18-
no_log: true
18+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
1919
become: true
2020
ansible.builtin.file:
2121
state: absent

roles/devscripts/tasks/320_restore_pull_secret.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
# pulling images from external registries for operators and other workloads.
2121

2222
- name: Get original pull-secret content
23-
no_log: true
23+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
2424
ansible.builtin.slurp:
2525
src: "{{ cifmw_devscripts_repo_dir }}/pull_secret.json"
2626
register: _original_pull_secret
2727

2828
- name: Get current cluster pull-secret
29-
no_log: true
29+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
3030
kubernetes.core.k8s_info:
3131
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
3232
api_key: "{{ cifmw_openshift_token | default(omit) }}"
@@ -37,7 +37,7 @@
3737
register: _cluster_pull_secret_raw
3838

3939
- name: Update cluster pull-secret
40-
no_log: true
40+
no_log: "{{ cifmw_nolog | default(true) | bool }}"
4141
vars:
4242
_original_auths: "{{ (_original_pull_secret.content | b64decode | from_json).auths }}"
4343
_cluster_auths: "{{ (_cluster_pull_secret_raw.resources[0].data['.dockerconfigjson'] | b64decode | from_json).auths }}"

0 commit comments

Comments
 (0)