Start of zrepl role.

Currently only doing FreeBSD.
This commit is contained in:
Tom Alexander
2022-10-10 22:31:22 -04:00
parent a271d1c756
commit 87c6ad5c5a
10 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
- name: Install packages
package:
name:
- zrepl
state: present
- name: Create directories
file:
name: "{{ item }}"
state: directory
mode: 0750
owner: root
group: wheel
loop:
- /usr/local/etc/zrepl
- name: Configure zrepl
template:
src: templates/zrepl.yml.j2
dest: /usr/local/etc/zrepl/zrepl.yml
mode: 0440
owner: root
group: wheel
validate: "zrepl configcheck --config %s"
notify: "restart zrepl"
- include: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'
- include: tasks/linux.yaml
when: 'os_flavor == "linux"'

View File

View File

View File

@@ -0,0 +1,2 @@
- include: tasks/common.yaml
when: zfs_snapshot_datasets is defined