Start of zrepl role.
Currently only doing FreeBSD.
This commit is contained in:
31
ansible/roles/zrepl/tasks/common.yaml
Normal file
31
ansible/roles/zrepl/tasks/common.yaml
Normal 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"'
|
||||
Reference in New Issue
Block a user