From 20fc1825e0f82db5ba069a3c3f55ddff62db025c Mon Sep 17 00:00:00 2001 From: phil Date: Sat, 8 Apr 2023 21:52:23 +0200 Subject: [PATCH] Init repo --- defaults/main.yml | 1 + tasks/main.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 0f86c08..98cb9ac 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,6 +11,7 @@ borg_ssh_key_type: "ed25519" borg_ssh_command: false borg_remote_path: false borg_remote_rate_limit: 0 +borg_repo_key: repokey-blake2 borg_retention_policy: keep_hourly: 3 keep_daily: 7 diff --git a/tasks/main.yml b/tasks/main.yml index 3870301..e80ecd1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,3 +27,8 @@ user: "{{ borg_user }}" cron_file: "{{ borgmatic_timer_cron_name }}" job: "borgmatic -c /etc/borgmatic/{{ borgmatic_config_name }}" + +- name: Init repo + ansible.builtin.expect: + command: "borgmatic init -e {{ borg_repo_key}}" + responses: ^.*want to continue connecting.*$: "yes"