diff --git a/defaults/main.yml b/defaults/main.yml index c456b31..63045fb 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -42,6 +42,8 @@ borgmatic_commands: run: - echo "Something went wrong!" +borgmatic_databases: [] + borgmatic_checks: - name: repository frequency: "4 weeks" diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index a37f6f1..23fd8eb 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -177,13 +177,13 @@ check_last: {{ borgmatic_check_last }} # Do not forget to set secure permissions on this file as well as on any script listed (chmod 0700) to # prevent potential shell injection or privilege escalation. commands: -{{ borgmatic_commands | to_nice_yaml(indent=4) | indent(4, first=False) }} +{{ borgmatic_commands | to_nice_yaml(indent=4) }} {% endif %} {% if borgmatic_databases is defined %} # Databases specific backup {% for database in borgmatic_databases %} {{ database }}_databases: -{{ borgmatic_databases[database] | to_nice_yaml(indent=4) | indent(4, first=true) }} +{{ borgmatic_databases[database] | to_nice_yaml(indent=4) }} {% endfor %} {% endif %}