Added role cleanup-certs based on certreap

This commit is contained in:
2025-05-07 06:38:07 +02:00
parent 9575ee31ff
commit 7afa368594
7 changed files with 99 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
- name: "pkgmgr install"
include_role:
name: pkgmgr-install
vars:
package_name: cleanup-certs
when: run_once_cleanup_certs is not defined
- name: configure cleanup-certs.cymais.service
template:
src: cleanup-certs.service.j2
dest: /etc/systemd/system/cleanup-certs.cymais.service
notify: Reload and restart cleanup-certs.cymais.service
when: run_once_cleanup_certs is not defined
- name: set service_name to the name of the current role
set_fact:
service_name: "{{ role_name }}"
when: run_once_cleanup_certs is not defined
- name: "include role for systemd-timer for {{service_name}}"
include_role:
name: systemd-timer
vars:
on_calendar: "{{ on_calendar_cleanup_certs }}"
when: run_once_cleanup_certs is not defined
- name: run the run_once_cleanup_certs tasks once
set_fact:
run_once_cleanup_certs: true
when: run_once_cleanup_certs is not defined