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

23 lines
858 B
YAML
Raw Normal View History

2023-02-19 22:36:16 +01:00
---
2023-02-22 21:25:21 +01:00
- name: "{{ backups_snapshots_user_name }} : configure service sanoid snapshots"
2023-02-19 22:36:16 +01:00
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
2023-02-22 21:25:21 +01:00
- name: "{{ backups_snapshots_user_name }} : configure service syncoid snapshots"
2023-02-19 22:36:16 +01:00
ansible.builtin.template:
2023-07-08 10:04:37 +02:00
src: "./volumes.yml"
2023-02-19 22:36:16 +01:00
dest: "/etc/syncoid-batch.d/{{ backups_snapshots_user_name }}.yml"
mode: 0644