support multiply paths

This commit is contained in:
Andrey Sokolovskiy 2024-02-29 06:06:03 +07:00
parent 63efde46b4
commit fcc58fae64
4 changed files with 15 additions and 11 deletions

View File

@ -40,7 +40,8 @@ Install and configure the bareos client, server and storage
```yaml
root:
path: /
paths:
- /
options:
compression: GZIP
excludes:

View File

@ -22,3 +22,4 @@ bareos_storage_max_concurrent_jobs: 10
bareos_storage_devices: {}
bareos_storage_droplet: false
bareos_web: false
# bareos_hosts_group:

View File

@ -6,15 +6,11 @@
tags: bareos
- name: "Set bareos url based on the OS type"
ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}"
vars:
params:
files:
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- default.yaml
paths:
- 'vars'
include_vars: '{{ item }}'
with_first_found:
- '{{ ansible_distribution }}.yaml'
- '{{ ansible_os_family }}.yaml'
- default.yaml
tags: bareos
- name: import repo key

View File

@ -11,7 +11,13 @@ FileSet {
{% endfor %}
}
{% endif %}
File = "{{ fileset.path }}"
{% if 'paths' in fileset %}
{% for path in fileset.paths %}
File = "{{ path }}"
{% endfor %}
{% else %}
File = "{{ path }}"
{% endif %}
}
{% if 'excludes' in fileset %}
Exclude {