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
|
```yaml
|
||||||
root:
|
root:
|
||||||
path: /
|
paths:
|
||||||
|
- /
|
||||||
options:
|
options:
|
||||||
compression: GZIP
|
compression: GZIP
|
||||||
excludes:
|
excludes:
|
||||||
|
|||||||
@ -22,3 +22,4 @@ bareos_storage_max_concurrent_jobs: 10
|
|||||||
bareos_storage_devices: {}
|
bareos_storage_devices: {}
|
||||||
bareos_storage_droplet: false
|
bareos_storage_droplet: false
|
||||||
bareos_web: false
|
bareos_web: false
|
||||||
|
# bareos_hosts_group:
|
||||||
@ -6,15 +6,11 @@
|
|||||||
tags: bareos
|
tags: bareos
|
||||||
|
|
||||||
- name: "Set bareos url based on the OS type"
|
- name: "Set bareos url based on the OS type"
|
||||||
ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}"
|
include_vars: '{{ item }}'
|
||||||
vars:
|
with_first_found:
|
||||||
params:
|
- '{{ ansible_distribution }}.yaml'
|
||||||
files:
|
- '{{ ansible_os_family }}.yaml'
|
||||||
- "{{ ansible_distribution }}.yaml"
|
- default.yaml
|
||||||
- "{{ ansible_os_family }}.yaml"
|
|
||||||
- default.yaml
|
|
||||||
paths:
|
|
||||||
- 'vars'
|
|
||||||
tags: bareos
|
tags: bareos
|
||||||
|
|
||||||
- name: import repo key
|
- name: import repo key
|
||||||
|
|||||||
@ -11,7 +11,13 @@ FileSet {
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
File = "{{ fileset.path }}"
|
{% if 'paths' in fileset %}
|
||||||
|
{% for path in fileset.paths %}
|
||||||
|
File = "{{ path }}"
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
File = "{{ path }}"
|
||||||
|
{% endif %}
|
||||||
}
|
}
|
||||||
{% if 'excludes' in fileset %}
|
{% if 'excludes' in fileset %}
|
||||||
Exclude {
|
Exclude {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user