Add var to append to exclude list

The review adds a new variable called artcl_exclude_list_append
which can be set to extra exclude paths artcl_exclude_list will
be extended about.

Change-Id: I1d104647447d63b993550e7c24e4e5262cb93632
This commit is contained in:
Martin Kopec 2020-02-07 16:12:15 +00:00
parent 2dd3370478
commit e1a1b854f5
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
and it takes precedence over the collection list. For details see the
“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
gathered, without a trailing slash.
- ``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
precedence over the collection list. For details see the
“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:
type: Value
help: |

View File

@ -45,6 +45,10 @@
- artcl_collect_override 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
file:
dest: "/tmp/{{ inventory_hostname }}"