Linux needs zrepl's config in a different location.

This commit is contained in:
Tom Alexander 2023-03-04 08:42:53 -05:00
parent 3c72b7c5ee
commit cce1a0ca46
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 41 additions and 21 deletions

View File

@ -16,7 +16,7 @@ users:
- homeassistant - homeassistant
gitconfig: "gitconfig_home" gitconfig: "gitconfig_home"
zfs_snapshot_datasets: zfs_snapshot_datasets:
- zroot/linux/archmain/home # - zroot/linux/archmain/home
- zroot/linux/archmain/be - zroot/linux/archmain/be
install_graphics: true install_graphics: true
graphics_driver: "intel" graphics_driver: "intel"

View File

@ -1,25 +1,5 @@
- name: Create directories
file:
name: "{{ item }}"
state: directory
mode: 0755
owner: root
group: wheel
loop:
- /usr/local/etc/zrepl
- import_tasks: tasks/freebsd.yaml - import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"' when: 'os_flavor == "freebsd"'
- import_tasks: tasks/linux.yaml - import_tasks: tasks/linux.yaml
when: 'os_flavor == "linux"' 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"

View File

@ -4,6 +4,26 @@
- zrepl - zrepl
state: present state: present
- name: Create directories
file:
name: "{{ item }}"
state: directory
mode: 0755
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"
- name: Enable services - name: Enable services
copy: copy:
src: "files/{{ item.src }}" src: "files/{{ item.src }}"

View File

@ -20,6 +20,26 @@
- zrepl - zrepl
state: present state: present
- name: Create directories
file:
name: "{{ item }}"
state: directory
mode: 0755
owner: root
group: wheel
loop:
- /etc/zrepl
- name: Configure zrepl
template:
src: templates/zrepl.yml.j2
dest: /etc/zrepl/zrepl.yml
mode: 0440
owner: root
group: wheel
validate: "zrepl configcheck --config %s"
notify: "restart zrepl"
- name: Enable services - name: Enable services
systemd: systemd:
enabled: yes enabled: yes