Add option to leave tar.gz logs files and flat log

When publishing logs in usptream we need an option to get
all files from host together both getting only one of them.
Save and upload the whole tar.gz for host together with flattened
logs and configs.

Change-Id: Ib272841a9ddf15d9ccd36a5d42a9dd94bf934f8f
This commit is contained in:
Sagi Shnaidman 2017-01-26 04:08:16 +02:00
parent a04c7b9959
commit ffa5cc887a
2 changed files with 3 additions and 2 deletions

View File

@ -33,6 +33,7 @@ artcl_collect_list:
- /tmp/tripleoclient*
artcl_collect_dir: "{{ lookup('env', 'PWD') }}/collected_files"
artcl_gzip_only: true
artcl_tar_gz: false
## publishing related vars
artcl_publish: false

View File

@ -189,7 +189,7 @@
shell: >
chdir=/tmp
tar czf {{ inventory_hostname }}.tar.gz {{ inventory_hostname }};
when: not artcl_gzip_only|bool
when: artcl_tar_gz|bool
- name: gzip logs individually and tar them
shell: >
@ -204,7 +204,7 @@
dest: "{{ artcl_collect_dir }}/{{ inventory_hostname }}.tar.gz"
flat: yes
validate_checksum: no
when: not artcl_gzip_only|bool
when: artcl_tar_gz|bool
- name: Fetch log archive (tar)
fetch: