mirror of
https://github.com/roles-ansible/ansible_role_restic.git
synced 2024-12-11 23:41:32 +01:00
update restic systemd init
This commit is contained in:
parent
93b9de9826
commit
0a3637f1d4
2 changed files with 14 additions and 2 deletions
|
@ -82,7 +82,19 @@
|
|||
- item.name is defined
|
||||
- item.scheduled | default(false)
|
||||
|
||||
- name: Enable restic timer
|
||||
- name: Enable restic service
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
name: "restic-{{ item.name | replace(' ', '') | string }}.service"
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
with_items: '{{ restic_backups }}'
|
||||
when:
|
||||
- restic_create_cron
|
||||
- item.name is defined
|
||||
- item.scheduled | default(false)
|
||||
|
||||
- name: Enable and start restic timer
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
name: "restic-{{ item.name | replace(' ', '') | string }}.timer"
|
||||
|
|
|
@ -10,5 +10,5 @@ restic_os_variables:
|
|||
paths:
|
||||
- 'vars'
|
||||
|
||||
playbook_version_number: 3 # should be int
|
||||
playbook_version_number: 4 # should be int
|
||||
playbook_version_path: 'do1jlr.restic.version'
|
||||
|
|
Loading…
Reference in a new issue