mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
Adds test for systemd
This commit is contained in:
parent
d446865f13
commit
5e295e8714
@ -10,6 +10,8 @@ env:
|
|||||||
- MOLECULE_DISTRO: centos6
|
- MOLECULE_DISTRO: centos6
|
||||||
MOLECULE_PLAYBOOK: playbook-source-install.yml
|
MOLECULE_PLAYBOOK: playbook-source-install.yml
|
||||||
- MOLECULE_DISTRO: ubuntu1804
|
- MOLECULE_DISTRO: ubuntu1804
|
||||||
|
- MOLECULE_DISTRO: ubuntu1604
|
||||||
|
CERTBOT_AUTO_RENEW_SYSTEMD: true
|
||||||
- MOLECULE_DISTRO: ubuntu1604
|
- MOLECULE_DISTRO: ubuntu1604
|
||||||
- MOLECULE_DISTRO: ubuntu1404
|
- MOLECULE_DISTRO: ubuntu1404
|
||||||
MOLECULE_PLAYBOOK: playbook-source-install.yml
|
MOLECULE_PLAYBOOK: playbook-source-install.yml
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
vars:
|
vars:
|
||||||
certbot_auto_renew_user: root
|
certbot_auto_renew_user: root
|
||||||
|
certbot_auto_renew_systemd: "{{ lookup('env', 'CERTBOT_AUTO_RENEW_SYSTEMD') }}"
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Update apt cache.
|
- name: Update apt cache.
|
||||||
|
@ -11,3 +11,8 @@
|
|||||||
src: certbot-renew.timer.j2
|
src: certbot-renew.timer.j2
|
||||||
dest: /etc/systemd/system/certbot-renew.timer
|
dest: /etc/systemd/system/certbot-renew.timer
|
||||||
notify: certbot restart renew timer
|
notify: certbot restart renew timer
|
||||||
|
|
||||||
|
- name: Start certbot-renew timer
|
||||||
|
systemd:
|
||||||
|
name: certbot-renew.timer
|
||||||
|
state: started
|
||||||
|
@ -4,6 +4,6 @@ Description=Let's Encrypt renewal service
|
|||||||
[Service]
|
[Service]
|
||||||
User={{ certbot_auto_renew_user }}
|
User={{ certbot_auto_renew_user }}
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart={{ certbot_script }} renew --quiet --agree-tos
|
ExecStart={{ certbot_script }} renew {{ certbot_auto_renew_options }}
|
||||||
|
|
||||||
ExecStartPost=/bin/systemctl reload {{ certbot_web_service }}.service
|
ExecStartPost=/bin/systemctl reload {{ certbot_web_service }}.service
|
||||||
|
Loading…
x
Reference in New Issue
Block a user