Ensure systemd snap certbot timer has started and is enabled

This commit is contained in:
Guilherme Balzana 2021-02-25 15:14:27 +00:00
parent a6a9b7cf95
commit 29b64067bc
3 changed files with 9 additions and 1 deletions

View File

@ -13,7 +13,7 @@
- name: Add renew options to cli.ini file - name: Add renew options to cli.ini file
copy: copy:
path: /etc/letsencrypt/cli.ini dest: /etc/letsencrypt/cli.ini
content: "{{ certbot_cli_options }}" content: "{{ certbot_cli_options }}"
when: certbot_cli_options is defined when: certbot_cli_options is defined

View File

@ -14,6 +14,7 @@
- name: Ensure snapd is enabled. - name: Ensure snapd is enabled.
systemd: systemd:
name: snapd name: snapd
state: started
enabled: true enabled: true
- name: Enable classic snap support. - name: Enable classic snap support.

View File

@ -7,3 +7,10 @@
hour: "{{ certbot_auto_renew_hour }}" hour: "{{ certbot_auto_renew_hour }}"
user: "{{ certbot_auto_renew_user }}" user: "{{ certbot_auto_renew_user }}"
when: certbot_install_method == 'package' or certbot_install_method == 'source' when: certbot_install_method == 'package' or certbot_install_method == 'source'
- name: Enable systemd timer when using snap
systemd:
name: snap.certbot.renew.timer
state: started
enabled: yes
when: certbot_install_method == 'snap'