From 3eafe01888594982bd42a322b04b93b2285834c5 Mon Sep 17 00:00:00 2001 From: Daniel Pawlik Date: Thu, 13 Nov 2025 12:56:28 +0100 Subject: [PATCH] DNM Get os must gather info The info would be helpful to find out why in some CI jobs the must gather data is limited. Signed-off-by: Daniel Pawlik --- roles/os_must_gather/tasks/main.yml | 38 +++++++++++++++++++---------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/roles/os_must_gather/tasks/main.yml b/roles/os_must_gather/tasks/main.yml index a409961162..a3d27e2c33 100644 --- a/roles/os_must_gather/tasks/main.yml +++ b/roles/os_must_gather/tasks/main.yml @@ -77,19 +77,6 @@ gather 2>&1 - - name: Find existing os-must-gather directories - ansible.builtin.find: - paths: "{{ cifmw_os_must_gather_output_log_dir }}" - file_type: directory - depth: 1 - register: _os_gather_latest_dir - - - name: Create a symlink to newest os-must-gather directory - ansible.builtin.file: - src: "{{ (_os_gather_latest_dir.files | sort(attribute='mtime', reverse=True) | first).path | basename }}" - dest: "{{ cifmw_os_must_gather_output_log_dir }}/latest" - state: link - rescue: - name: Openstack-must-gather failure block: @@ -132,3 +119,28 @@ ) ) | unique }} + always: + - name: Find existing os-must-gather directories + ansible.builtin.find: + paths: "{{ cifmw_os_must_gather_output_log_dir }}" + file_type: directory + depth: 1 + register: _os_gather_latest_dir + + - name: Get interesting info + ansible.builtin.shell: | + whoami + hostname + register: _debug_msg + + - name: Found existing os-must-gather directories + ansible.builtin.debug: + msg: | + we are {{ _debug_msg.stdout }} + _os_gather_latest_dir {{ _os_gather_latest_dir | default('') }} + + - name: Create a symlink to newest os-must-gather directory + ansible.builtin.file: + src: "{{ (_os_gather_latest_dir.files | sort(attribute='mtime', reverse=True) | first).path | basename }}" + dest: "{{ cifmw_os_must_gather_output_log_dir }}/latest" + state: link