From 273d06d18ebe8542bb6d6f63fc3e75981beca7de Mon Sep 17 00:00:00 2001 From: Frank Dornheim <524257+conloos@users.noreply.github.com> Date: Sun, 19 Mar 2023 11:34:18 +0100 Subject: [PATCH] add borg_ssh_key_name, renamed borg_ssh_key_file to borg_ssh_key_file_path --- defaults/main.yml | 8 +++++--- meta/arguments_specs.yml | 6 +++++- molecule/default/converge.yml | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index f69de51..9d5a2b9 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,10 +5,12 @@ borg_one_file_system: true borg_exclude_from: [] borg_encryption_passcommand: false borg_lock_wait_time: 5 -borg_ssh_key_file: "{{ backup_user_info.home }}/.ssh/backup" -borg_ssh_command: "ssh -i {{ borg_ssh_key_file }}" -# borg_ssh_command: "ssh -i {{ borg_ssh_key_file }} -o StrictHostKeyChecking=no" borg_ssh_key_type: "ed25519" +borg_ssh_key_name: "id_{{ borg_ssh_key_type }}" +borg_ssh_key_file_path: "{{ backup_user_info.home }}/.ssh/{{ borg_ssh_key_name }}" +# borg_ssh_key_file_path: "{{ backup_user_info.home }}/.ssh/backup" # static key +borg_ssh_command: "ssh -i {{ borg_ssh_key_file_path }}" +# borg_ssh_command: "ssh -i {{ borg_ssh_key_file_path }} -o StrictHostKeyChecking=no" borg_remote_path: false borg_remote_rate_limit: 0 borg_retention_policy: diff --git a/meta/arguments_specs.yml b/meta/arguments_specs.yml index 612cbe8..d9ff145 100644 --- a/meta/arguments_specs.yml +++ b/meta/arguments_specs.yml @@ -101,7 +101,7 @@ argument_specs: type: int required: false description: Remote network upload rate limit in kiBytes/second. - borg_ssh_key_file: + borg_ssh_key_file_path: type: str required: false description: Path to ssh-key @@ -176,3 +176,7 @@ argument_specs: type: str required: false description: The algorithm used to generate the SSH private key + borg_ssh_key_name: + type: str + required: false + description: Name of the SSH public and private key diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 6433c2d..9508ae1 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -39,8 +39,8 @@ hostname: database1.example.org port: 5433 borg_install_method: pip - borg_ssh_key_file: "{{ backup_user_info.home }}/.ssh/backup" - borg_ssh_command: "ssh -i {{ borg_ssh_key_file }} -o StrictHostKeyChecking=no" + borg_ssh_key_file_path: "{{ backup_user_info.home }}/.ssh/backup" + borg_ssh_command: "ssh -i {{ borg_ssh_key_file_path }} -o StrictHostKeyChecking=no" borgmatic_timer: cron post_tasks: