From 98a52b8f535c6eea25a2363a2bbe35ae654a8e59 Mon Sep 17 00:00:00 2001 From: Erik Stambaugh Date: Mon, 22 Jan 2024 20:05:57 -0800 Subject: [PATCH] Parameterize admin email address --- ansible/inventory.tmpl.yaml | 1 + ansible/roles/certbot/tasks/main.yaml | 2 +- config.mk.in | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ansible/inventory.tmpl.yaml b/ansible/inventory.tmpl.yaml index 2d20898..7551675 100644 --- a/ansible/inventory.tmpl.yaml +++ b/ansible/inventory.tmpl.yaml @@ -30,4 +30,5 @@ social: #vapid_private_key: #vapid_public_key: + admin_email: {{ADMIN_EMAIL}} diff --git a/ansible/roles/certbot/tasks/main.yaml b/ansible/roles/certbot/tasks/main.yaml index 81b7ca9..1d22a09 100644 --- a/ansible/roles/certbot/tasks/main.yaml +++ b/ansible/roles/certbot/tasks/main.yaml @@ -57,7 +57,7 @@ # XXX FIXME configure email address - name: seed a cert if needed - command: "docker run --volume /srv/certbot/etc:/etc/letsencrypt --volume /srv/certbot/www:/var/www/certbot -p 80:80 --rm -t certbot/certbot certonly --agree-tos --email erik@erikstambaugh.com --standalone --noninteractive --cert-name {{domain_name}} --domains {{domain_name}}" + command: "docker run --volume /srv/certbot/etc:/etc/letsencrypt --volume /srv/certbot/www:/var/www/certbot -p 80:80 --rm -t certbot/certbot certonly --agree-tos --email {{admin_email}} --standalone --noninteractive --cert-name {{domain_name}} --domains {{domain_name}}" args: chdir: /srv/certbot creates: "/srv/certbot/etc/live/{{domain_name}}/fullchain.pem" diff --git a/config.mk.in b/config.mk.in index 2d6cb21..7e47415 100644 --- a/config.mk.in +++ b/config.mk.in @@ -4,6 +4,10 @@ ## Template for configuration. ## The comment preceding any variable is printed as its prompt. +# What is the site admin's email address? +ADMIN_EMAIL = + + # Right now AWS is the only option. This is only here for future use. # AWS: Are we using AWS? 1 means yes, 0 means no (only 1 works right now!)