diff --git a/defaults/main.yml b/defaults/main.yml index 711a2b1..5407b58 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,5 @@ --- # Default values for variables of the role # variable_name: value +letsencrypt_account_email: certs@example.org +domain: example.org diff --git a/tasks/configure_prometheus_exporters_certificates.yml b/tasks/configure_prometheus_exporters_certificates.yml index 5061056..2f9a724 100644 --- a/tasks/configure_prometheus_exporters_certificates.yml +++ b/tasks/configure_prometheus_exporters_certificates.yml @@ -23,11 +23,11 @@ state: stopped - name: Request certificate for node-metrics - shell: "certbot certonly --agree-tos --email certs@susurrando.com --standalone -n -d node-metrics-{{ inventory_hostname }}" + shell: "certbot certonly --agree-tos --email {{ letsencrypt_account_email }} --standalone -n -d node-metrics-{{ inventory_hostname }}.{{ domain }}" args: creates: "/etc/letsencrypt/live/node-metrics-{{ inventory_hostname }}/fullchain.pem" - name: Request certificate for postfix-metrics - shell: "certbot certonly --agree-tos --email certs@susurrando.com --standalone --agree-tos --email gestor@susurrando.com -n -d postfix-metrics-{{ inventory_hostname }}" + shell: "certbot certonly --agree-tos --email {{ letsencrypt_account_email }} --standalone -n -d postfix-metrics-{{ inventory_hostname }}.{{ domain }}" args: creates: "/etc/letsencrypt/live/postfix-metrics-{{ inventory_hostname }}/fullchain.pem"