Browse Source

Merge branch 'docker-storage-setup' into openshift-ansible-source

Tomas Sedovic 7 years ago
parent
commit
332f131e8e
1 changed files with 17 additions and 1 deletions
  1. 17 1
      roles/docker-storage-setup/tasks/main.yaml

+ 17 - 1
roles/docker-storage-setup/tasks/main.yaml

@@ -26,5 +26,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