mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Added role cleanup-certs based on certreap
This commit is contained in:
30
roles/cleanup-certs/tasks/main.yml
Normal file
30
roles/cleanup-certs/tasks/main.yml
Normal 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
|
Reference in New Issue
Block a user