Skip to content
Snippets Groups Projects
Commit 73264667 authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

Handlers instead of register-when

parent 0072fc9c
No related branches found
No related tags found
No related merge requests found
---
- name: Enable borgmatic timer
systemd:
name: borgbackup.timer
enabled: true
daemon-reload: true
state: restarted
- name: Enable borgmatic-check timer
systemd:
name: borgbackup-check.timer
enabled: true
daemon-reload: true
state: restarted
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
owner: "root" owner: "root"
group: "root" group: "root"
mode: "0644" mode: "0644"
register: service notify: Enable borgmatic timer
- name: Add borgbackup timer - name: Add borgbackup timer
template: template:
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
owner: "root" owner: "root"
group: "root" group: "root"
mode: "0644" mode: "0644"
register: timer notify: Enable borgmatic timer
- name: Add borgbackup-check service - name: Add borgbackup-check service
copy: copy:
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
owner: "root" owner: "root"
group: "root" group: "root"
mode: "0644" mode: "0644"
register: check_service notify: Enable borgmatic-check timer
- name: Add borgbackup-check timer - name: Add borgbackup-check timer
copy: copy:
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
owner: "root" owner: "root"
group: "root" group: "root"
mode: "0644" mode: "0644"
register: check_timer notify: Enable borgmatic-check timer
- name: Copy notify script - name: Copy notify script
template: template:
...@@ -113,20 +113,4 @@ ...@@ -113,20 +113,4 @@
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
register: notify notify: Enable borgmatic-check timer
- name: Reload systemctl
command: systemctl daemon-reload
when: "service.changed or timer.changed or notify.changed"
- name: Enable borgmatic timer
service:
name: "borgbackup.timer"
enabled: true
state: started
- name: Enable borgmatic-check timer
service:
name: "borgbackup-check.timer"
enabled: true
state: started
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment