Verified Commit f5500702 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

Also fetch the offsite borg backup key


Signed-off-by: Jelle van der Waa's avatarJelle van der Waa <jelle@archlinux.org>
parent 919a6d4b
......@@ -12,9 +12,20 @@
command: "/usr/local/bin/borg key export :: /dev/stdout"
register: borg_key
- name: fetch borg offsite key
command: "/usr/local/bin/borg-offsite key export :: /dev/stdout"
register: borg_offsite_key
- name: save borg key
shell: gpg --batch --armor --encrypt --output - >"{{playbook_dir}}/../../borg-keys/{{inventory_hostname}}.gpg" {% for userid in root_gpgkeys %}--recipient {{userid}} {% endfor %}
args:
stdin: "{{borg_key.stdout}}"
chdir: "{{playbook_dir}}/../.."
delegate_to: localhost
- name: save borg offsite key
shell: gpg --batch --armor --encrypt --output - >"{{playbook_dir}}/../../borg-keys/{{inventory_hostname}}-offsite.gpg" {% for userid in root_gpgkeys %}--recipient {{userid}} {% endfor %}
args:
stdin: "{{borg_offsite_key.stdout}}"
chdir: "{{playbook_dir}}/../.."
delegate_to: localhost
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment