collect-logs: broader txt.gz rename conditions
In addition to known text file extensions, also rename files without extension in the /var/log and /etc directories. Change-Id: Ia9898816831392951cd927b7661d4d8fdcb4d007
This commit is contained in:
parent
139cb35438
commit
a33d943195
|
@ -28,8 +28,10 @@
|
||||||
- name: Rename text based files to end with txt.gz extension
|
- name: Rename text based files to end with txt.gz extension
|
||||||
shell: >
|
shell: >
|
||||||
find {{ artcl_collect_dir }} -type f |
|
find {{ artcl_collect_dir }} -type f |
|
||||||
awk '/\.(conf|ini|json|sh|log|yaml|yml)\.gz$/ {
|
awk 'function rename(orig)
|
||||||
renamed=$0; sub(/\.gz$/, ".txt.gz", renamed); system("mv " $0 " " renamed) }';
|
{ new=orig; sub(/\.gz$/, ".txt.gz", new); system("mv " orig " " new) }
|
||||||
|
/\.(conf|ini|json|sh|log|yaml|yml)\.gz$/ { rename($0) }
|
||||||
|
/(\/var\/log\/|\/etc\/)[^ \/\.]+\.gz$/ { rename($0) }';
|
||||||
when: artcl_txt_rename|bool
|
when: artcl_txt_rename|bool
|
||||||
|
|
||||||
- name: upload to the artifact server using pubkey auth
|
- name: upload to the artifact server using pubkey auth
|
||||||
|
|
Loading…
Reference in New Issue