ansible-role-certbot/templates/stop_services.j2

18 lines
462 B
Django/Jinja

#!/bin/sh
# {{ ansible_managed }}
{% if ansible_service_mgr == 'systemd' %}
systemctl stop {{ certbot_create_standalone_stop_services | join(" ") }}
{% else %}
{% for item in certbot_create_standalone_stop_services %}
echo "stopping service {{ item }}"
{% if ansible_service_mgr == 'upstart' %}
initctl stop {{ item }}
{% elif ansible_service_mgr == 'openrc' %}
rc-service {{ item }} stop
{% else %}
service {{ item }} stop
{% endif %}
{% endfor %}
{% endif %}