From d3197b81c89dab8f0eb412037aec42f38f0cc189 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 8 Aug 2019 08:41:13 +0200 Subject: borg: Adding arius. borg-target: Adding pipelining. --- ansible/roles/borg-target/tasks/borg-init.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ansible/roles') diff --git a/ansible/roles/borg-target/tasks/borg-init.yml b/ansible/roles/borg-target/tasks/borg-init.yml index 513b7d3..2f6efe6 100644 --- a/ansible/roles/borg-target/tasks/borg-init.yml +++ b/ansible/roles/borg-target/tasks/borg-init.yml @@ -6,7 +6,9 @@ success_msg: "" - set_fact: - ssh_key: "{{ client.value.ssh_key_path if client.value.ssh_key_path is defined else ('files/borg/' + client.key + '/ssh-key') }}" + ssh_key: "{{ client.value.ssh_key_path if client.value.ssh_key_path is defined else default_file_path }}" + vars: + default_file_path: "files/borg/{{ client.key }}/ssh-key" - debug: var=ssh_key - with_items: "{{ client.value.repos }}" @@ -20,8 +22,8 @@ path: "{{ borg_target__home }}/repos/{{ client.key }}/{{ item }}" - with_items: "{{ client.value.repos }}" - name: borg init become_user: "{{ borg_target__user }}" + name: borg init command: "borg init --encryption repokey {{ path }}" args: creates: "{{ path }}" @@ -29,6 +31,7 @@ BORG_PASSPHRASE: "{{ borg__passphrases[client.key][item] }}" vars: path: "{{ borg_target__home }}/repos/{{ client.key }}/{{ item }}" + ansible_ssh_pipelining: true - local_action: module: stat -- cgit v1.2.3