diff --git a/README.md b/README.md index f1d3bb1..57f7c94 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ Install and configure the bareos client, server and storage ```yaml root: - path: / + paths: + - / options: compression: GZIP excludes: diff --git a/defaults/main.yml b/defaults/main.yml index a3db893..635acce 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -22,3 +22,4 @@ bareos_storage_max_concurrent_jobs: 10 bareos_storage_devices: {} bareos_storage_droplet: false bareos_web: false +# bareos_hosts_group: \ No newline at end of file diff --git a/tasks/repo.yml b/tasks/repo.yml index 635982a..004a4b6 100644 --- a/tasks/repo.yml +++ b/tasks/repo.yml @@ -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 diff --git a/templates/server-fileset.conf.j2 b/templates/server-fileset.conf.j2 index a411898..6443dbf 100644 --- a/templates/server-fileset.conf.j2 +++ b/templates/server-fileset.conf.j2 @@ -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 {