Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

43 line
1.7 KiB

  1. #jinja2: lstrip_blocks: "True", trim_blocks: "True"
  2. location:
  3. source_directories: {{ matrix_backup_borg_location_source_directories|to_json }}
  4. repositories: {{ matrix_backup_borg_location_repositories|to_json }}
  5. one_file_system: true
  6. exclude_patterns: {{ matrix_backup_borg_location_exclude_patterns|to_json }}
  7. storage:
  8. compression: {{ matrix_backup_borg_storage_compression|to_json }}
  9. ssh_command: {{ matrix_backup_borg_storage_ssh_command|to_json }}
  10. archive_name_format: {{ matrix_backup_borg_storage_archive_name_format|to_json }}
  11. encryption_passphrase: {{ matrix_backup_borg_storage_encryption_passphrase|to_json }}
  12. retention:
  13. keep_hourly: {{ matrix_backup_borg_retention_keep_hourly|to_json }}
  14. keep_daily: {{ matrix_backup_borg_retention_keep_daily|to_json }}
  15. keep_weekly: {{ matrix_backup_borg_retention_keep_weekly|to_json }}
  16. keep_monthly: {{ matrix_backup_borg_retention_keep_monthly|to_json }}
  17. keep_yearly: {{ matrix_backup_borg_retention_keep_yearly|to_json }}
  18. prefix: {{ matrix_backup_borg_retention_prefix|to_json }}
  19. consistency:
  20. checks:
  21. - repository
  22. - archives
  23. hooks:
  24. {% if matrix_backup_borg_postgresql_enabled and matrix_backup_borg_postgresql_databases|length > 0 %}
  25. postgresql_databases:
  26. {% for database in matrix_backup_borg_postgresql_databases %}
  27. - name: {{ database|to_json }}
  28. hostname: {{ matrix_backup_borg_postgresql_databases_hostname|to_json }}
  29. username: {{ matrix_backup_borg_postgresql_databases_username|to_json }}
  30. password: {{ matrix_backup_borg_postgresql_databases_password|to_json }}
  31. port: {{ matrix_backup_borg_postgresql_databases_port|to_json }}
  32. {% endfor %}
  33. {% endif %}
  34. after_backup:
  35. - echo "Backup created."
  36. on_error:
  37. - echo "Error while creating a backup."