Only enable the backup units, do not start them during the playbook as there's a timer for that
This commit is contained in:
parent
19995fee01
commit
13d9607e61
1 changed files with 10 additions and 12 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue