mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-21 20:31:02 +01:00
Solved system-timer bugs
This commit is contained in:
parent
f396179681
commit
e199c1e7f6
@ -1,6 +1,6 @@
|
||||
- name: set service_name to the name of the current role
|
||||
- name: set service_name to cleanup-backups
|
||||
set_fact:
|
||||
service_name: "{{ role_name }}"
|
||||
service_name: "cleanup-backups"
|
||||
when: run_once_cleanup_backups_timer is not defined
|
||||
|
||||
- name: "include role for systemd-timer for {{service_name}}"
|
||||
|
@ -1,6 +0,0 @@
|
||||
- name: "restart timer"
|
||||
systemd:
|
||||
name: "{{service_name}}.cymais.timer"
|
||||
state: restarted
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
@ -3,5 +3,11 @@
|
||||
src: dummy.timer.j2
|
||||
dest: "/etc/systemd/system/{{service_name}}.cymais.timer"
|
||||
register: dummy_timer
|
||||
changed_when: dummy_timer.changed or activate_all_timers | bool
|
||||
notify: restart timer
|
||||
|
||||
- name: "restart timer"
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
name: "{{service_name}}.cymais.timer"
|
||||
state: restarted
|
||||
enabled: yes
|
||||
when: dummy_timer.changed or activate_all_timers | bool
|
Loading…
Reference in New Issue
Block a user