Add override to ensure ZFS starts before docker

Stolen with love from 7dda0bc7cb
This commit is contained in:
Jake Howard 2020-12-21 21:37:46 +00:00
parent 30cb9e52e7
commit 0353887590
Signed by: jake
GPG key ID: 57AFB45680EDD477
6 changed files with 26 additions and 0 deletions

View file

@ -1,3 +1,5 @@
expose_ssh: true
traefik_influx_db_dir: /mnt/tank/dbs/influx/traefik
docker_zfs_override: true

View file

@ -0,0 +1 @@
docker_zfs_override: true

View file

@ -0,0 +1 @@
docker_zfs_override: false

View file

@ -0,0 +1,3 @@
[Unit]
Requires=zfs.target
After=zfs.target

View file

@ -44,3 +44,7 @@
dest: "{{ home }}"
mode: 0755
directory_mode: 0755
- name: override docker service for zfs dependencies
include: zfs-override.yml
when: docker_zfs_override

View file

@ -0,0 +1,15 @@
- name: Create dir for docker service ZFS override
file:
path: /etc/systemd/system/docker.service.d
state: directory
mode: "0755"
become: true
- name: Create override.conf
copy:
src: files/zfs-override.conf
dest: /etc/systemd/system/docker.service.d/zfs-override.conf
owner: root
group: root
mode: "0644"
become: true