summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Sedovic <tomas@sedovic.cz>2017-10-09 09:57:08 +0000
committerTomas Sedovic <tomas@sedovic.cz>2017-10-09 09:57:08 +0000
commit5a6c1927828d942ebe4c71861521c0dae6545011 (patch)
tree78ad74321fb2b5dd46913cc5e7446a78b666bb55
parent1c73318927fe1730fa4c52fc684a94d37d12a5fd (diff)
downloadopenshift-5a6c1927828d942ebe4c71861521c0dae6545011.tar.gz
openshift-5a6c1927828d942ebe4c71861521c0dae6545011.tar.bz2
openshift-5a6c1927828d942ebe4c71861521c0dae6545011.tar.xz
openshift-5a6c1927828d942ebe4c71861521c0dae6545011.zip
Add CentOS support to the docker-storage-setup role
This let's us use the role on CentOS systems, as well as RHEL. In addition, it installs docker and makes sure it's restarted (as opposed to just "started" which has no effect when docker is already running).
-rw-r--r--roles/docker-storage-setup/tasks/main.yaml18
1 files changed, 17 insertions, 1 deletions
diff --git a/roles/docker-storage-setup/tasks/main.yaml b/roles/docker-storage-setup/tasks/main.yaml
index 209062ca7..8dabb1cc7 100644
--- a/roles/docker-storage-setup/tasks/main.yaml
+++ b/roles/docker-storage-setup/tasks/main.yaml
@@ -25,5 +25,21 @@
- ansible_distribution_version | version_compare('7.4', '<')
- ansible_distribution == "RedHat"
+- block:
+ - name: create the docker-storage-setup config file for CentOS
+ template:
+ src: "{{ role_path }}/templates/docker-storage-setup-dm.j2"
+ dest: /etc/sysconfig/docker-storage-setup
+ owner: root
+ group: root
+ mode: 0644
+
+ # TODO(shadower): Find out which CentOS version supports overlayfs2
+ when:
+ - ansible_distribution == "CentOS"
+
+- name: Install Docker
+ package: name=docker state=present
+
- name: start docker
- service: name=docker state=started enabled=true
+ service: name=docker state=restarted enabled=true