Created
January 11, 2017 14:36
-
-
Save silenius/a9b97f0efde46e2f882a5621ecf6078e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/etc/salt/states/bacula/files/ cat bacula-sd.conf.jinja | |
# vim: syntax=config | |
{% for k, v in storage.devices.items() %} | |
Device { | |
Name = "{{ k }}" | |
{% for pk, pv in v.items() %} | |
{%- if pv is string -%} | |
{{ pk }} = "{{ pv }}" | |
{% elif pv == True -%} | |
{{ pk }} = yes | |
{% elif pv == False -%} | |
{{ pk }} = no | |
{% else -%} | |
{{ pk }} = {{ pv }} | |
{%- endif %} | |
{%- endfor %} | |
} | |
{% endfor %} | |
/usr/local/etc/salt/pillar/bacula/storage/ cat backup.sls | |
include: | |
- bacula | |
bacula: | |
storage: | |
devices: | |
disk: | |
Media Type: "file" | |
Archive Device: "/tank/bacula" | |
Label Media: yes | |
Removable Media: no | |
Random Access: yes | |
Automatic Mount: yes | |
Always Open: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment