homeserver/friedhof/mgrote_zfs_sanoid_mit_syncoid/tasks/snaps.yml
Michael Grote 7a2ccbabb6
All checks were successful
ansible-lint / gitleaks (push) Successful in 2s
ansible-lint / Ansible Lint (push) Successful in 23s
remove syncoid, switch to rsync (#221)
no more zfs send
mirroring with rsync
snaps an both sides

Reviewed-on: #221
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2024-10-31 12:01:46 +01:00

46 lines
1 KiB
YAML

---
- name: Generate Sanoid Configuration
become: true
ansible.builtin.template:
src: sanoid.conf.j2
dest: "/etc/sanoid/sanoid.conf"
owner: "{{ sanoid_user }}"
group: "{{ sanoid_user_group }}"
mode: "0400"
- name: template sanoid_mail.service
become: true
ansible.builtin.template:
src: "sanoid_mail.service.j2"
dest: /etc/systemd/system/sanoid_mail.service
owner: root
group: root
mode: "0644"
notify:
- systemctl daemon-reload
- name: add overrides (sanoid_mail + TZ)
become: true
ansible.builtin.template:
src: "overrides.j2"
mode: "0644"
owner: root
group: root
dest: /lib/systemd/system/sanoid.service.d/override.conf
notify:
- systemctl daemon-reload
- name: set timer
become: true
ansible.builtin.blockinfile:
create: true
mode: "0644"
owner: root
group: root
path: /lib/systemd/system/sanoid.timer.d/override.conf
block: |
[Timer]
OnCalendar = {{ sanoid_timer }}
when: sanoid_timer is defined
notify:
- systemctl daemon-reload