Skip to content
Snippets Groups Projects
Verified Commit 27d0d6cb authored by David Mehren's avatar David Mehren
Browse files

Allow to disable backup encryption

parent 8cb24dcd
No related branches found
No related tags found
No related merge requests found
Pipeline #146890 passed
......@@ -47,3 +47,4 @@ borgbackup_interval: "hourly"
borgbackup_chunker_params: "19,23,21,4095"
borgbackup_mariadb_enable: false
borgbackup_extra_borg_options: []
borgbackup_enable_encryption: true
......@@ -41,7 +41,7 @@
- name: Create Borg Repo
ansible.builtin.command: "borg init -e repokey {{ borgbackup_target_user }}@{{ borgbackup_target_ip }}:{{ borgbackup_repo_path }}"
environment:
BORG_PASSPHRASE: "{{ borgbackup_key }}"
BORG_PASSPHRASE: "{{ borgbackup_enable_encryption | ternary(borgbackup_key, '') }}"
when: not repo.stat.exists
- name: Install borgmatic # noqa package-latest
......
......@@ -21,7 +21,9 @@ location:
storage:
compression: {{ borgbackup_compression }}
{% if borgbackup_enable_encryption %}
encryption_passphrase: {{ borgbackup_key }}
{% endif %}
chunker_params: {{ borgbackup_chunker_params }}
{% if borgbackup_extra_borg_options | length != 0 %}
extra_borg_options:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment