Merge "Support exclude list for logs collecting"
This commit is contained in:
commit
a4a890ad2e
@ -34,6 +34,9 @@ artcl_collect_list:
|
||||
- /home/stack/*.log
|
||||
- /var/log
|
||||
```
|
||||
* `artcl_exclude_list` -- A list of files and directories to remove from
|
||||
the collected logs. First of all we collect everything and then remove all
|
||||
we have in `artcl_exclude_list` (`/etc/puppet/modules` by default).
|
||||
|
||||
* `artcl_collect_dir` -- A local directory where the logs should be
|
||||
gathered, without a trailing slash.
|
||||
|
@ -3,7 +3,6 @@
|
||||
artcl_collect: true
|
||||
artcl_collect_list:
|
||||
- /var/log/
|
||||
- /var/lib/mysql
|
||||
- /var/lib/heat-config/heat-config-puppet/
|
||||
- /var/lib/heat-config/heat-config-script/
|
||||
- /var/tmp/sosreport*
|
||||
@ -32,6 +31,13 @@ artcl_collect_list:
|
||||
- /home/stack/browbeat/results
|
||||
- /usr/share/openstack-tripleo-heat-templates
|
||||
- /tmp/tripleoclient*
|
||||
artcl_exclude_list:
|
||||
- /etc/udev/hwdb.bin
|
||||
- /etc/puppet/modules
|
||||
- /etc/project-config
|
||||
- /etc/services
|
||||
- /etc/selinux/targeted
|
||||
- /etc/pki/ca-trust/extracted
|
||||
artcl_collect_dir: "{{ local_working_dir }}/collected_files"
|
||||
artcl_gzip_only: true
|
||||
artcl_tar_gz: false
|
||||
|
@ -188,6 +188,9 @@
|
||||
cp -rL --parents $F /tmp/{{ inventory_hostname }};
|
||||
done;
|
||||
find /tmp/{{ inventory_hostname }} -not -type f -not -type d -delete;
|
||||
for D in {{ artcl_exclude_list | default([]) | join(' ') }}; do
|
||||
rm -rf "/tmp/{{ inventory_hostname }}/$D";
|
||||
done;
|
||||
find /tmp/{{ inventory_hostname }} -type d -print0 | xargs -0 chmod 755;
|
||||
find /tmp/{{ inventory_hostname }} -type f -print0 | xargs -0 chmod 644;
|
||||
chown -R {{ ansible_user }}: /tmp/{{ inventory_hostname }};
|
||||
|
Loading…
Reference in New Issue
Block a user