ansible-edda/playbooks/roles/services/backups/tasks/include/snapshots.yml

22 lines
937 B
YAML

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