ansible-edda/playbooks/roles/backups/snapshots/user/tasks/main.yml

23 lines
789 B
YAML

---
- name: "configure service sanoid snapshots"
ansible.builtin.blockinfile:
path: "/etc/sanoid/sanoid.conf"
insertbefore: "# BEGIN ANSIBLE MANAGED BLOCK TEMPLATES #"
marker: "# {mark} ANSIBLE MANAGED BLOCK USER {{ backups_snapshots_user_name }} #"
block: |
[{{ backups_snapshots_user_data_dataset }}]
use_template = production
recursive = yes
process_children_only = yes
[{{ backups_snapshots_user_backup_dataset }}]
use_template = backup
recursive = yes
process_children_only = yes
- name: "configure service syncoid snapshots"
ansible.builtin.template:
src: "./volumes.yml.j2"
dest: "/etc/syncoid-batch.d/{{ backups_snapshots_user_name }}.yml"
mode: 0644