summaryrefslogtreecommitdiffstats
path: root/roles/docker
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-04-06 12:21:43 -0400
committerAndrew Butcher <abutcher@redhat.com>2016-04-06 12:21:54 -0400
commit3bcf3139b6abe1ca5d14bda6a630996f2bce8d4b (patch)
tree87720d1a0adc0f2a76b86720bdade61045b1ade5 /roles/docker
parent6cd266510dfa5423ae9af60ba191ff3aa1016100 (diff)
downloadopenshift-3bcf3139b6abe1ca5d14bda6a630996f2bce8d4b.tar.gz
openshift-3bcf3139b6abe1ca5d14bda6a630996f2bce8d4b.tar.bz2
openshift-3bcf3139b6abe1ca5d14bda6a630996f2bce8d4b.tar.xz
openshift-3bcf3139b6abe1ca5d14bda6a630996f2bce8d4b.zip
Test docker_version_result.stdout when determining if docker should be installed/downgraded.
Diffstat (limited to 'roles/docker')
-rw-r--r--roles/docker/tasks/main.yml4
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 9cf949d65..2d207a1a9 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -10,7 +10,7 @@
- name: Downgrade docker if necessary
command: "{{ ansible_pkg_mgr }} downgrade -y docker-{{ docker_version }}"
register: docker_downgrade_result
- when: not docker_version_result | skipped and docker_version_result | default('0.0', True) | version_compare(docker_version, 'gt')
+ when: not docker_version_result | skipped and docker_version_result.stdout | default('0.0', True) | version_compare(docker_version, 'gt')
- name: Install docker
action: "{{ ansible_pkg_mgr }} name=docker{{ '-' + docker_version if docker_version != '' else '' }} state=present"
@@ -23,7 +23,7 @@
- name: Remove deferred deletion for downgrades from 1.9
command: >
sed -i 's/--storage-opt dm.use_deferred_deletion=true//' /etc/sysconfig/docker-storage
- when: docker_downgrade_result | changed and docker_check.stat.exists | bool and docker_version_result | default('0.0', True) | version_compare('1.9', '>=') and docker_version | version_compare('1.9', '<')
+ when: docker_downgrade_result | changed and docker_check.stat.exists | bool and docker_version_result.stdout | default('0.0', True) | version_compare('1.9', '>=') and docker_version | version_compare('1.9', '<')
- name: enable and start the docker service
service: