mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
- remove service stop/start tasks - add pre-hook/post-hook templates - add pre-hook/pos-hook template tasks
15 lines
372 B
Django/Jinja
15 lines
372 B
Django/Jinja
#!/bin/bash
|
|
|
|
{% for item in certbot_create_standalone_stop_services %}
|
|
echo "stopping service {{ item }}"
|
|
{% if ansible_service_mgr == 'systemd' %}
|
|
systemctl stop {{ item }}
|
|
{% elif ansible_service_mgr == 'upstart' %}
|
|
initctl stop {{ item }}
|
|
{% elif ansible_service_mgr == 'openrc' %}
|
|
rc-service {{ item }} stop
|
|
{% else %}
|
|
service {{ item }} stop
|
|
{% endif %}
|
|
{% endfor %}
|