|
@@ -55,8 +55,8 @@
|
|
|
- Import public keys
|
|
|
|
|
|
- name: Extract encryption key identifier (Duplicty requires key ID in hexadecimal format)
|
|
|
shell: "set -o pipefail && {{ gnupg_binary }} --no-tty --list-packets /etc/duply/main/private_keys.asc | grep keyid: |
|
|
|
head -n1 | sed -e 's/.*: //' | sed -re 's/^.{{ '{' + gnupg_key_cutoff + '}' }}//'"
|
|
|
shell: "set -o pipefail && gpg --no-tty --list-packets /etc/duply/main/private_keys.asc | grep keyid: |
|
|
|
head -n1 | sed -e 's/.*: //'"
|
|
|
args:
|
|
|
executable: /bin/bash
|
|
|
register: backup_encryption_key_id
|
|
@@ -64,8 +64,8 @@
|
|
|
failed_when: not backup_encryption_key_id.stdout
|
|
|
|
|
|
- name: Extract additional encryption keys identifiers (Duplicty requires key ID in hexadecimal format)
|
|
|
shell: "set -o pipefail && {{ gnupg_binary }} --no-tty --list-packets /etc/duply/main/public_keys.asc | grep keyid: |
|
|
|
sed -e 's/.*: //' | sort -u | sed -re 's/^.{{ '{' + gnupg_key_cutoff + '}' }}//' | tr '\n' ',' | sed -e 's/,$//'"
|
|
|
shell: "set -o pipefail && gpg --no-tty --list-packets /etc/duply/main/public_keys.asc | grep keyid: |
|
|
|
sed -e 's/.*: //' | sort -u | tr '\n' ',' | sed -e 's/,$//'"
|
|
|
args:
|
|
|
executable: /bin/bash
|
|
|
when: backup_additional_encryption_keys | length > 0
|