From 13d9607e613287e6f9ec53a78d09be20f87a6a92 Mon Sep 17 00:00:00 2001 From: erebion Date: Thu, 16 Nov 2023 10:12:44 +0100 Subject: [PATCH] Only enable the backup units, do not start them during the playbook as there's a timer for that --- roles/unhb_backup_scripts/tasks/main.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/roles/unhb_backup_scripts/tasks/main.yml b/roles/unhb_backup_scripts/tasks/main.yml index c1dbaee..78acb97 100644 --- a/roles/unhb_backup_scripts/tasks/main.yml +++ b/roles/unhb_backup_scripts/tasks/main.yml @@ -81,7 +81,7 @@ dest: "/etc/systemd/system/restic@.service" owner: root group: root - mode: 'u+rwx' + mode: 'u+rw' register: unit when: "ansible_os_family == 'Debian'" @@ -91,7 +91,7 @@ dest: "/etc/systemd/system/restic@.timer" owner: root group: root - mode: 'u+rwx' + mode: 'u+rw' register: unit when: "ansible_os_family == 'Debian'" @@ -100,9 +100,8 @@ daemon_reload: true when: unit.changed -- name: "Restart systemd units for restic" +- name: "Enable systemd units for restic" ansible.builtin.systemd: - state: restarted enabled: true name: "{{ item }}" with_items: @@ -110,14 +109,13 @@ - "restic@{{ inventory_hostname }}.timer" when: unit.changed -- name: "Enable systemd units for restic-wasabi" - ansible.builtin.systemd: - state: started - enabled: true - name: "{{ item }}" - with_items: - - "restic@{{ inventory_hostname }}.service" - - "restic@{{ inventory_hostname }}.timer" +#- name: "Enable systemd units for restic-wasabi" +# ansible.builtin.systemd: +# enabled: true +# name: "{{ item }}" +# with_items: +# - "restic@{{ inventory_hostname }}.service" +# - "restic@{{ inventory_hostname }}.timer" #- name: "Cronjob for Backups" # ansible.builtin.cron: