homeserver/roles/mgrote.restic/handlers/main.yml
mg 16ebb0324e systemd: restic (#332)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#332
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2022-02-21 16:42:22 +01:00

29 lines
612 B
YAML

---
- name: systemctl daemon-reload
become: yes
ansible.builtin.systemd:
daemon_reload: yes
- name: systemctl enable units
become: yes
ansible.builtin.systemd:
name: "{{ item }}"
enabled: yes
masked: no
with_items:
- media-restic.automount
- media-restic.mount
- restic.service
- restic.timer
- restic_mail.service
- name: systemctl start units
become: yes
ansible.builtin.systemd:
name: "{{ item }}"
state: restarted
enabled: yes
with_items:
- restic.timer
notify: systemctl daemon-reload