summaryrefslogtreecommitdiff
path: root/roles/x509/uacme/base/tasks
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-08-17 00:38:13 +0200
committerChristian Pointner <equinox@spreadspace.org>2023-08-20 22:12:03 +0200
commit2ae1b55727449c61b320703a11bc622ec76b579a (patch)
tree4b106abcf72b9bcc686efef521df3e5467dbca8f /roles/x509/uacme/base/tasks
parentrevamp x509 service reloading (diff)
uacme: add automatic refresh timer/service
Diffstat (limited to 'roles/x509/uacme/base/tasks')
-rw-r--r--roles/x509/uacme/base/tasks/main.yml15
1 files changed, 14 insertions, 1 deletions
diff --git a/roles/x509/uacme/base/tasks/main.yml b/roles/x509/uacme/base/tasks/main.yml
index 9d67e0e7..17e6034f 100644
--- a/roles/x509/uacme/base/tasks/main.yml
+++ b/roles/x509/uacme/base/tasks/main.yml
@@ -50,4 +50,17 @@
dest: /usr/local/bin/uacme-reconcile.sh
mode: 0755
-## TODO: add systemd units for automatic refreshing
+- name: install systemd unit for automatic refresh
+ loop:
+ - service
+ - timer
+ template:
+ src: "uacme-reconcile.{{ item }}.j2"
+ dest: "/etc/systemd/system/uacme-reconcile.{{ item }}"
+
+- name: make sure systemd timer for automatic refresh is enabled and started
+ systemd:
+ daemon_reload: yes
+ name: uacme-reconcile.timer
+ state: started
+ enabled: yes