mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
* Move 'stop' services to pre-hook and post-hook. This way they will also be stopped and started when renewing. - remove service stop/start tasks - add pre-hook/post-hook templates - add pre-hook/pos-hook template tasks - create missing directories at first run - run pre and post hook during first manual run
16 lines
400 B
Django/Jinja
16 lines
400 B
Django/Jinja
#!/bin/bash
|
|
# {{ ansible_managed }}
|
|
|
|
{% for item in certbot_create_standalone_stop_services %}
|
|
echo "starting service {{ item }}"
|
|
{% if ansible_service_mgr == 'systemd' %}
|
|
systemctl start {{ item }}
|
|
{% elif ansible_service_mgr == 'upstart' %}
|
|
initctl start {{ item }}
|
|
{% elif ansible_service_mgr == 'openrc' %}
|
|
rc-service {{ item }} start
|
|
{% else %}
|
|
service {{ item }} start
|
|
{% endif %}
|
|
{% endfor %}
|