support multiply paths
This commit is contained in:
parent
63efde46b4
commit
fcc58fae64
@ -40,7 +40,8 @@ Install and configure the bareos client, server and storage
|
||||
|
||||
```yaml
|
||||
root:
|
||||
path: /
|
||||
paths:
|
||||
- /
|
||||
options:
|
||||
compression: GZIP
|
||||
excludes:
|
||||
|
||||
@ -22,3 +22,4 @@ bareos_storage_max_concurrent_jobs: 10
|
||||
bareos_storage_devices: {}
|
||||
bareos_storage_droplet: false
|
||||
bareos_web: false
|
||||
# bareos_hosts_group:
|
||||
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user