summaryrefslogtreecommitdiffstats
path: root/roles/docker/tasks
diff options
context:
space:
mode:
authorRussell Teague <rteague@redhat.com>2016-11-09 13:24:07 -0500
committerRussell Teague <rteague@redhat.com>2016-11-11 09:50:34 -0500
commitb300b2e3563f406058b6c29d61a9ec7fb6969cab (patch)
treeacaaaf77e7bf4504fca857a4bd23b96532ad1a07 /roles/docker/tasks
parent24804da994917f50be32e2c5fb62e2e120e6652f (diff)
downloadopenshift-b300b2e3563f406058b6c29d61a9ec7fb6969cab.tar.gz
openshift-b300b2e3563f406058b6c29d61a9ec7fb6969cab.tar.bz2
openshift-b300b2e3563f406058b6c29d61a9ec7fb6969cab.tar.xz
openshift-b300b2e3563f406058b6c29d61a9ec7fb6969cab.zip
Resolve docker and iptables service dependencies
The docker service adds rules to the iptables configuration to support proper network functionality for running containers. If the service is started prior to iptables, these rules are not properly created. * Ensure iptables is started prior to docker Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1390835
Diffstat (limited to 'roles/docker/tasks')
-rw-r--r--roles/docker/tasks/main.yml14
1 files changed, 13 insertions, 1 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 7147aa2d4..240673b22 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -46,11 +46,23 @@
action: "{{ ansible_pkg_mgr }} name=docker{{ '-' + docker_version if docker_version is defined else '' }} state=present"
when: not openshift.common.is_atomic | bool
+- name: Ensure docker.service.d directory exists
+ file:
+ path: "{{ docker_systemd_dir }}"
+ state: directory
+
+# Extend the default Docker service unit file
+- name: Configure Docker service unit file
+ template:
+ dest: "{{ docker_systemd_dir }}/custom.conf"
+ src: custom.conf.j2
+
- name: Start the Docker service
- service:
+ systemd:
name: docker
enabled: yes
state: started
+ daemon_reload: yes
register: start_result
- set_fact: