summaryrefslogtreecommitdiffstats
path: root/roles/docker-storage-setup/tasks
diff options
context:
space:
mode:
authorEduardo Mínguez <edu@redhat.com>2017-10-04 03:31:56 +0200
committerRyan Cook <rcook@redhat.com>2017-10-03 21:31:56 -0400
commitc969394a52c311f1ff5cc2fc669276bc8e2b4e4b (patch)
tree2d2731381aae8334f3a2f80fcc602e138346df8b /roles/docker-storage-setup/tasks
parentb1c98274f883a5b98ca82b6f3a4829417352eac9 (diff)
downloadopenshift-c969394a52c311f1ff5cc2fc669276bc8e2b4e4b.tar.gz
openshift-c969394a52c311f1ff5cc2fc669276bc8e2b4e4b.tar.bz2
openshift-c969394a52c311f1ff5cc2fc669276bc8e2b4e4b.tar.xz
openshift-c969394a52c311f1ff5cc2fc669276bc8e2b4e4b.zip
Required variables to create dedicated lv (#766)
* Required variables to create dedicated lv https://bugzilla.redhat.com/show_bug.cgi?id=1490910#c11 * Fixed lint and added distribution to checks
Diffstat (limited to 'roles/docker-storage-setup/tasks')
-rw-r--r--roles/docker-storage-setup/tasks/main.yaml35
1 files changed, 28 insertions, 7 deletions
diff --git a/roles/docker-storage-setup/tasks/main.yaml b/roles/docker-storage-setup/tasks/main.yaml
index 7202bc46b..209062ca7 100644
--- a/roles/docker-storage-setup/tasks/main.yaml
+++ b/roles/docker-storage-setup/tasks/main.yaml
@@ -1,8 +1,29 @@
---
-- name: create the docker-storage-setup config file
- template:
- src: "{{ role_path }}/templates/docker-storage-setup.j2"
- dest: /etc/sysconfig/docker-storage-setup
- owner: root
- group: root
- mode: 0644
+- block:
+ - name: create the docker-storage config file
+ template:
+ src: "{{ role_path }}/templates/docker-storage-setup-overlayfs.j2"
+ dest: /etc/sysconfig/docker-storage-setup
+ owner: root
+ group: root
+ mode: 0644
+
+ when:
+ - ansible_distribution_version | version_compare('7.4', '>=')
+ - ansible_distribution == "RedHat"
+
+- block:
+ - name: create the docker-storage-setup config file
+ template:
+ src: "{{ role_path }}/templates/docker-storage-setup-dm.j2"
+ dest: /etc/sysconfig/docker-storage-setup
+ owner: root
+ group: root
+ mode: 0644
+
+ when:
+ - ansible_distribution_version | version_compare('7.4', '<')
+ - ansible_distribution == "RedHat"
+
+- name: start docker
+ service: name=docker state=started enabled=true