22 lines
476 B
YAML
22 lines
476 B
YAML
- name: remove old cronfile
|
|
ansible.builtin.file:
|
|
path: /etc/cron.d/backup
|
|
state: absent
|
|
|
|
- name: Deploy systemd service and timer unit files
|
|
ansible.builtin.template:
|
|
src: "{{ item }}"
|
|
dest: /etc/systemd/system/
|
|
notify: reload systemd
|
|
loop:
|
|
- borg_backup.service
|
|
- borg_backup.timer
|
|
|
|
- ansible.builtin.meta: flush_handlers
|
|
|
|
- name: enable and start timer
|
|
ansible.builtin.systemd:
|
|
name: borg_backup.timer
|
|
state: started
|
|
enabled: true
|