Fix copy of exported keys
This commit is contained in:
parent
4e6628e86c
commit
72555d15c4
1 changed files with 4 additions and 3 deletions
|
@ -28,10 +28,11 @@
|
||||||
|
|
||||||
- name: "Borg | Export repo key"
|
- name: "Borg | Export repo key"
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "borg key export {{ item }} > {{ borg_key_export_path }}/{{ item }}.key"
|
cmd: "borg key export {{ item }} {{ borg_key_export_path }}/{{ item | replace('ssh://', '') | replace('@', '') | replace('.', '_') | replace('/', '') }}"
|
||||||
loop: "{{ borg_repository }}"
|
loop: "{{ borg_repository }}"
|
||||||
|
|
||||||
- name: "Borg | Save repo key to localhost"
|
- name: "Borg | Save repo key to localhost"
|
||||||
ansible.builtin.fetch:
|
ansible.posix.synchronize:
|
||||||
src: "{{ repo_key_export.stdout }}"
|
mode: pull
|
||||||
|
src: "{{ borg_key_export_path }}"
|
||||||
dest: "~/"
|
dest: "~/"
|
||||||
|
|
Loading…
Reference in a new issue