diff --git a/tasks/distribution/Linux.yml b/tasks/distribution/Linux.yml index 29a7af6..42188d1 100644 --- a/tasks/distribution/Linux.yml +++ b/tasks/distribution/Linux.yml @@ -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" diff --git a/vars/main.yml b/vars/main.yml index 4fa0924..60b8937 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -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'