From f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 11 Mar 2018 19:56:38 +0100 Subject: Various fixes before moving to hardware installation --- roles/docker/tasks/main.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'roles/docker/tasks/main.yml') 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" -- cgit v1.2.3