Merge "Add var to append to exclude list"

This commit is contained in:
Zuul 2020-02-18 00:53:57 +00:00 committed by Gerrit Code Review
commit 02b5112787
3 changed files with 13 additions and 0 deletions

View File

@ -49,6 +49,9 @@ Collection related
from collecting. This list is passed to rsync as an exclude filter from collecting. This list is passed to rsync as an exclude filter
and it takes precedence over the collection list. For details see the and it takes precedence over the collection list. For details see the
“FILTER RULES” topic in the rsync man page. “FILTER RULES” topic in the rsync man page.
- ``artcl_exclude_list_append`` A list of files and directories to be
appended in the default exclude list. This is useful for users that want to
keep the original list and just add more relevant paths.
- ``artcl_collect_dir`` A local directory where the logs should be - ``artcl_collect_dir`` A local directory where the logs should be
gathered, without a trailing slash. gathered, without a trailing slash.
- ``collect_log_types`` - A list of which type of logs will be collected, - ``collect_log_types`` - A list of which type of logs will be collected,

View File

@ -45,6 +45,12 @@ subparsers:
list is passed to rsync as an exclude filter and it takes list is passed to rsync as an exclude filter and it takes
precedence over the collection list. For details see the precedence over the collection list. For details see the
“FILTER RULES” topic in the rsync man page. “FILTER RULES” topic in the rsync man page.
artcl_exclude_list_append:
type: ListValue
help: |
A list of files and directories to be appended in the default
exclude list. This is useful for users that want to keep the
original list and just add more relevant paths.
local_working_dir: local_working_dir:
type: Value type: Value
help: | help: |

View File

@ -45,6 +45,10 @@
- artcl_collect_override is defined - artcl_collect_override is defined
- artcl_collect_override[inventory_hostname] is defined - artcl_collect_override[inventory_hostname] is defined
- name: Set default exclude list
set_fact:
artcl_exclude_list: "{{ artcl_exclude_list|default([]) }} + {{ artcl_exclude_list_append|default([]) }}"
- name: Create temp directory before gathering logs - name: Create temp directory before gathering logs
file: file:
dest: "/tmp/{{ inventory_hostname }}" dest: "/tmp/{{ inventory_hostname }}"