Browse Source

Clean override of docker systemd unit

This hack is still unfortunately needed in stretch…
tags/9.0.1^2
Romain Dessort 2 years ago
parent
commit
a82de720a9
1 changed files with 13 additions and 8 deletions
  1. +13
    -8
      docker-host/tasks/main.yml

+ 13
- 8
docker-host/tasks/main.yml View File

@@ -46,15 +46,20 @@
template:
src: daemon.json.j2
dest: /etc/docker/daemon.json
notify:
- reload systemd
- restart docker
notify: restart docker

- name: Remove options from docker systemd service
lineinfile:
dest: /lib/systemd/system/docker.service
regexp: '^ExecStart='
line: 'ExecStart=/usr/bin/dockerd'
- name: Create override directory for docker unit
file:
name: /etc/systemd/system/docker.service.d/
state: directory
mode: "0755"

- name: Remove options in ExecStart from docker unit
copy:
src: docker.conf
dest: /etc/systemd/system/docker.service.d/
mode: "0644"
notify: reload systemd

- name: Creating Docker tmp directory
file:


Loading…
Cancel
Save