mise au point : attention , certbot en test-mode

This commit is contained in:
2022-05-06 16:34:38 +02:00
parent 0dc0373c85
commit 5e0fc8381d
4 changed files with 11 additions and 5 deletions

View File

@@ -1,7 +1,10 @@
---
- name: install certbot
package:
name: certbot
name:
- certbot
- mod_ssl
state: present
- name: install apache config file without ssl
@@ -24,13 +27,13 @@
- name: generate certificates for domaine and subdomains
vars:
subdomains: "-d {{ apache_server_alias | join( ' -d ' ) }}"
command: certbot certonly --agree-tos --non-interactive -m {{ apache_ssl_root_email }} --webroot --webroot-path {{ apache_document_root }} -d {{ apache_server_name }} {{ subdomains }}
command: certbot certonly --agree-tos --non-interactive -m {{ apache_ssl_root_email }} --webroot --webroot-path {{ apache_document_root }} -d {{ apache_server_name }} --test-cert {{ subdomains }}
args:
creates: "{{ apache_ssl_chain }}"
when: apache_server_alias is defined
- name: generate certificates
command: certbot certonly --agree-tos --non-interactive -m {{ apache_ssl_root_email }} --webroot --webroot-path {{ apache_document_root }} -d {{ apache_server_name }}
command: certbot certonly --agree-tos --non-interactive -m {{ apache_ssl_root_email }} --webroot --webroot-path {{ apache_document_root }} -d {{ apache_server_name }} --test-cert
args:
creates: "{{ apache_ssl_chain }}"
when: apache_server_alias is not defined