Add override to ensure ZFS starts before docker
Stolen with love from 7dda0bc7cb
This commit is contained in:
parent
30cb9e52e7
commit
0353887590
6 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
expose_ssh: true
|
||||
|
||||
traefik_influx_db_dir: /mnt/tank/dbs/influx/traefik
|
||||
|
||||
docker_zfs_override: true
|
||||
|
|
1
ansible/host_vars/walker.yml
Normal file
1
ansible/host_vars/walker.yml
Normal file
|
@ -0,0 +1 @@
|
|||
docker_zfs_override: true
|
1
ansible/roles/docker_cleanup/defaults/main.yml
Normal file
1
ansible/roles/docker_cleanup/defaults/main.yml
Normal file
|
@ -0,0 +1 @@
|
|||
docker_zfs_override: false
|
3
ansible/roles/docker_cleanup/files/zfs-override.conf
Normal file
3
ansible/roles/docker_cleanup/files/zfs-override.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Unit]
|
||||
Requires=zfs.target
|
||||
After=zfs.target
|
|
@ -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
|
||||
|
|
15
ansible/roles/docker_cleanup/tasks/zfs-override.yml
Normal file
15
ansible/roles/docker_cleanup/tasks/zfs-override.yml
Normal 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
|
Loading…
Reference in a new issue