From 4ac7bed4c88a86abb3b052c4ab889bf8fa5ac311 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 3 Nov 2023 16:50:48 +0100 Subject: [PATCH] Added ability to upload custom email keys --- group_vars/all/default.yml | 8 ++++++++ roles/sr.ht-core/templates/config.ini | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/group_vars/all/default.yml b/group_vars/all/default.yml index 4b5b060..6d05e62 100644 --- a/group_vars/all/default.yml +++ b/group_vars/all/default.yml @@ -60,6 +60,14 @@ srht_pgp_key_id: "" srht_email_pubkey: "" # the private key itself (without begin/end blocks) here srht_email_privkey: "" +# path to the private and public key pair +# leave as default when using srht_email_pubkey and srht_email_privkey, +# as the playbook will automatically generate these files for you, +# if you want to copy your files to the host instead, +# you have to changes these, +# as otherwise they'd be overwritten by the playbook +srht_pgp_privkey_path: "/etc/sr.ht/email.priv" +srht_pgp_pubkey_path: "/etc/sr.ht/email.pub" # the following values have to be generated in advance # to do so have a look at: diff --git a/roles/sr.ht-core/templates/config.ini b/roles/sr.ht-core/templates/config.ini index 3011027..6e4b675 100644 --- a/roles/sr.ht-core/templates/config.ini +++ b/roles/sr.ht-core/templates/config.ini @@ -85,8 +85,8 @@ error-from={{ srht_smtp_error_from }} # that file. pgp-pubkey should be set to the path to your public key, and # pgp-key-id should be set to the key ID string. Outgoing emails are signed with # this PGP key. -pgp-privkey=/etc/sr.ht/email.priv -pgp-pubkey=/etc/sr.ht/email.pub +pgp-privkey={{ srht_pgp_privkey_path }} +pgp-pubkey={{ srht_pgp_pubkey_path }} pgp-key-id={{ srht_pgp_key_id }} [webhooks] -- 2.38.5