Add variables for certs

This commit is contained in:
Antonio J. Delgado 2023-08-23 12:33:12 +03:00
parent 9ac0280a31
commit cb88569fe1
2 changed files with 4 additions and 2 deletions

View file

@ -1,3 +1,5 @@
--- ---
# Default values for variables of the role # Default values for variables of the role
# variable_name: value # variable_name: value
letsencrypt_account_email: certs@example.org
domain: example.org

View file

@ -23,11 +23,11 @@
state: stopped state: stopped
- name: Request certificate for node-metrics - 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: args:
creates: "/etc/letsencrypt/live/node-metrics-{{ inventory_hostname }}/fullchain.pem" creates: "/etc/letsencrypt/live/node-metrics-{{ inventory_hostname }}/fullchain.pem"
- name: Request certificate for postfix-metrics - 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: args:
creates: "/etc/letsencrypt/live/postfix-metrics-{{ inventory_hostname }}/fullchain.pem" creates: "/etc/letsencrypt/live/postfix-metrics-{{ inventory_hostname }}/fullchain.pem"