Files
Adyrem 1cf6c81ac5 Add sanoid Ansible role for ZFS snapshots and replication
Replaces manually deployed config files with a fully idempotent role:
installs sanoid, templates sanoid.conf and syncoid service/timer from
variables, enables both systemd timers. Removes static proxmox/sanoid.*
files. README rebuild section updated accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 04:22:05 +02:00

48 lines
1.0 KiB
YAML

---
- name: Install sanoid
ansible.builtin.apt:
name: sanoid
state: present
update_cache: true
- name: Deploy sanoid.conf
ansible.builtin.template:
src: sanoid.conf.j2
dest: /etc/sanoid/sanoid.conf
owner: root
group: root
mode: '0644'
notify: Restart sanoid timer
- name: Deploy syncoid systemd service
ansible.builtin.template:
src: syncoid.service.j2
dest: /etc/systemd/system/syncoid.service
owner: root
group: root
mode: '0644'
notify: Restart syncoid timer
- name: Deploy syncoid systemd timer
ansible.builtin.template:
src: syncoid.timer.j2
dest: /etc/systemd/system/syncoid.timer
owner: root
group: root
mode: '0644'
notify: Restart syncoid timer
- name: Enable and start sanoid timer
ansible.builtin.systemd:
name: sanoid.timer
enabled: true
state: started
daemon_reload: true
- name: Enable and start syncoid timer
ansible.builtin.systemd:
name: syncoid.timer
enabled: true
state: started
daemon_reload: true