machine_setup/ansible/roles/zrepl/tasks/common.yaml

26 lines
526 B
YAML
Raw Normal View History

- name: Create directories
file:
name: "{{ item }}"
state: directory
2022-10-11 23:52:53 +00:00
mode: 0755
owner: root
group: wheel
loop:
- /usr/local/etc/zrepl
2023-02-02 04:14:20 +00:00
- import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/linux.yaml
when: 'os_flavor == "linux"'
- 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"