Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions roles/os_must_gather/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,30 @@
depth: 1
register: _os_gather_latest_dir

- name: Print interesting folder info
ansible.builtin.debug:
msg: |
cifmw_os_must_gather_output_log_dir: {{ cifmw_os_must_gather_output_log_dir }}
_os_gather_latest_dir: {{ _os_gather_latest_dir.files }}
latest os gather {{ (_os_gather_latest_dir.files | sort(attribute='mtime', reverse=True) | first).path | basename }}
ignore_errors: true

- 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

- name: List directory
ansible.builtin.shell: |
ls -la {{ cifmw_os_must_gather_output_log_dir }}
register: _daniel_test

- name: Print list directory if zuul will ignore it
ansible.builtin.debug:
msg: |
daniel here {{ _daniel_test.stdout }}

rescue:
- name: Openstack-must-gather failure
block:
Expand Down
Loading