We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eeb08e8 commit cbfae1bCopy full SHA for cbfae1b
1 file changed
roles/hotlogs/tasks/main.yml
@@ -125,6 +125,19 @@
125
hotlogs_collection_failed: true
126
hotlogs_failures: "{{ hotlogs_failures + ['Must-gather post operations failed'] }}"
127
128
+- name: Compress all files in hotlog directory
129
+ delegate_to: "{{ inventory_hostname }}"
130
+ ansible.builtin.shell: |
131
+ find "{{ hotlog_dir }}" -type f ! -name "*.gz" -exec gzip {} \;
132
+ register: gzip_result
133
+ ignore_errors: true
134
+
135
+- name: Track gzip operation failure
136
+ ansible.builtin.set_fact:
137
+ hotlogs_collection_failed: true
138
+ hotlogs_failures: "{{ hotlogs_failures + ['Failed to compress log files'] }}"
139
+ when: gzip_result.failed | default(false)
140
141
- name: Report collection summary
142
ansible.builtin.debug:
143
msg: >-
0 commit comments