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>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
---
|
||||
- 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
|
||||
Reference in New Issue
Block a user