diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-04-07 16:38:54 -0400 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-04-07 16:38:54 -0400 |
commit | 1b82b1b5980cddae781b31adf02855227ce1ffde (patch) | |
tree | 7193fe0f159f255a3f41b09345a87c6c442a8ad4 | |
parent | 83b3b916705b9cdd4ad52b77383580f7b93530ef (diff) | |
parent | 3bcf3139b6abe1ca5d14bda6a630996f2bce8d4b (diff) | |
download | openshift-1b82b1b5980cddae781b31adf02855227ce1ffde.tar.gz openshift-1b82b1b5980cddae781b31adf02855227ce1ffde.tar.bz2 openshift-1b82b1b5980cddae781b31adf02855227ce1ffde.tar.xz openshift-1b82b1b5980cddae781b31adf02855227ce1ffde.zip |
Merge pull request #1720 from abutcher/fix-docker-install
Test docker_version_result.stdout when determining if docker should be installed/downgraded.
-rw-r--r-- | roles/docker/tasks/main.yml | 4 |
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: |