mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-11 10:32:27 +08:00
copr-keygen: fix using of backup key
Do not require the key to be imported in keyring.
This commit is contained in:
@@ -10,7 +10,7 @@ OUTPUT_FILE="$BACKUP_DIR/copr_keygen_keyring_$(date -I).tar.gz.gpg"
|
||||
|
||||
tar --exclude="*agent*" -czPf - "$PATH_TO_KEYRING_DIR" \
|
||||
| gpg2 --output "$OUTPUT_FILE".tmp --encrypt \
|
||||
--recipient copr-keygen-backup-key --always-trust \
|
||||
--recipient-file /root/backup_key.asc \
|
||||
&& mv "$OUTPUT_FILE.tmp" "$OUTPUT_FILE"
|
||||
|
||||
# shell pattern matching provides sorted output
|
||||
|
||||
@@ -4,11 +4,6 @@
|
||||
|
||||
- name: copy pubkey for backup encryption
|
||||
copy: src="{{ private }}/files/copr/keygen/backup_key.asc" dest="/root/backup_key.asc"
|
||||
register: pub_key_installed
|
||||
|
||||
- name: import pubkey for backup encryption
|
||||
shell: gpg2 --import /root/backup_key.asc creates=/root/backupkeyimported
|
||||
when: pub_key_installed.changed
|
||||
|
||||
- name: copy backup script
|
||||
copy: src="backup_keyring.sh" dest="/etc/cron.hourly/backup_keyring.sh" owner=root group=root mode=755
|
||||
|
||||
Reference in New Issue
Block a user