ansible-pilote/templates/bacula/conf.d/filesets.conf.j2
Julien Riou 096a3e0540
Initial commit
Signed-off-by: Julien Riou <julien@riou.xyz>
2024-04-27 15:21:55 +02:00

32 lines
796 B
Django/Jinja

{{ ansible_managed | comment }}
{% for fileset in bacula_filesets %}
FileSet {
Name = {{ fileset['name'] }}
{% if 'include' in fileset %}
Include {
{% if 'options' in fileset['include'] %}
Options {
{% if 'signature' in fileset['include']['options'] %}
signature = {{ fileset['include']['options']['signature'] }}
{% endif %}
{% if 'compression' in fileset['include']['options'] %}
compression = {{ fileset['include']['options']['compression'] }}
{% endif %}
}
{% endif %}
{% for file in fileset['include']['files'] | default([]) | sort %}
File = "{{ file }}"
{% endfor %}
}
{% endif %}
{% if 'exclude' in fileset %}
Exclude {
{% for file in fileset['exclude']['files'] | default([]) | sort %}
File = "{{ file }}"
{% endfor %}
}
{% endif %}
}
{% endfor %}