mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
Use more specific services to stop/start during cert creation process
This is useful when you need to stop different services depending on the certificates. For example, if you have a first certificate that uses varnish and a second one using nginx you can have a configuration that looks like this: certbot_certs: - email: janedoe@example.com stop_services: - varnish domains: - example1.com - email: janedoe@example.com stop_services: - nginx domains: - example2.com This way, you don't have to stop both varnish and nginx during cert creation process.
This commit is contained in:
parent
b96acd79ec
commit
1411e392be
@ -9,7 +9,7 @@
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
when: not letsencrypt_cert.stat.exists
|
||||
with_items: "{{ certbot_create_standalone_stop_services }}"
|
||||
with_items: "{{ cert_item.stop_services | default(certbot_create_standalone_stop_services) }}"
|
||||
|
||||
- name: Generate new certificate if one doesn't exist.
|
||||
command: "{{ certbot_create_command }}"
|
||||
@ -20,4 +20,4 @@
|
||||
name: "{{ item }}"
|
||||
state: started
|
||||
when: not letsencrypt_cert.stat.exists
|
||||
with_items: "{{ certbot_create_standalone_stop_services }}"
|
||||
with_items: "{{ cert_item.stop_services | default(certbot_create_standalone_stop_services) }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user