summaryrefslogtreecommitdiffstats
path: root/roles/docker
diff options
context:
space:
mode:
Diffstat (limited to 'roles/docker')
-rw-r--r--roles/docker/defaults/main.yml3
-rw-r--r--roles/docker/tasks/main.yml16
2 files changed, 18 insertions, 1 deletions
diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml
index f7b96f5..30b1ff8 100644
--- a/roles/docker/defaults/main.yml
+++ b/roles/docker/defaults/main.yml
@@ -4,3 +4,6 @@ docker_lv: "docker-pool"
docker_min_size: 100
docker_max_log_size: "2m"
docker_max_log_files: "3"
+
+# There are some problems with groups on 1.13
+docker_version: "-1.12*"
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 0d040a9..c03d897 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -1,6 +1,20 @@
---
+#- name: Remove docker
+# yum: name="{{ item }}" state="absent"
+# with_items: [ docker, docker-client, docker-common ]
+
+- name: Remove versionlock from yum
+ command: yum versionlock delete docker docker-common docker-client
+ register: result
+ failed_when: false
+ changed_when: result | failed
+
- name: Ensure docker is installed
- yum: name="docker" state="present"
+ yum: name="docker{{ docker_version | default('') }}" state="{{ docker_version is defined | ternary('latest', 'present') }}"
+
+- name: Add versionlock to yum
+ command: yum versionlock add docker docker-common docker-client
+ when: docker_version is defined
- name: start docker
service: name="docker" state="started"