Adds test for systemd

This commit is contained in:
Nikolaos Kakouros
2019-05-12 23:26:33 +02:00
parent d446865f13
commit 9b02af1064
4 changed files with 16 additions and 1 deletions
+12
View File
@@ -1,13 +1,25 @@
---
- name: Get absolute path of certbot executable
command: "which {{ certbot_script }}"
register: certbot_script_absolute
changed_when: false
- name: Create certbot-renew service
template:
src: certbot-renew.service.j2
dest: /etc/systemd/system/certbot-renew.service
notify: certbot restart renew timer
vars:
certbot_script_path: "{{ certbot_script_absolute.stdout }}"
- name: Create certbot-renew timer
template:
src: certbot-renew.timer.j2
dest: /etc/systemd/system/certbot-renew.timer
notify: certbot restart renew timer
- name: Start certbot-renew timer
systemd:
name: certbot-renew.timer
state: started