diff options
author | Tim Bielawa <timbielawa@gmail.com> | 2017-03-02 08:27:45 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-02 08:27:45 -0800 |
commit | 5a91f31b65a4bb0ec524aee9ba1c6d4e4030d8d2 (patch) | |
tree | 329c4989c5727df319f5b4a8b74cc047cea072d2 | |
parent | 68aa6f269a6b0c4bf9af5f30d0dfb5ac6428b575 (diff) | |
parent | 2437a98760d25e83f37a5d78372f4c67e486ade1 (diff) | |
download | openshift-5a91f31b65a4bb0ec524aee9ba1c6d4e4030d8d2.tar.gz openshift-5a91f31b65a4bb0ec524aee9ba1c6d4e4030d8d2.tar.bz2 openshift-5a91f31b65a4bb0ec524aee9ba1c6d4e4030d8d2.tar.xz openshift-5a91f31b65a4bb0ec524aee9ba1c6d4e4030d8d2.zip |
Merge pull request #3475 from ashcrow/1425583
Fails Installation If Docker Version is Too Old On Atomic Host
-rw-r--r-- | roles/openshift_facts/tasks/main.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml index 0ec294bbc..c538ff7a1 100644 --- a/roles/openshift_facts/tasks/main.yml +++ b/roles/openshift_facts/tasks/main.yml @@ -26,6 +26,25 @@ msg: "openshift-ansible requires Python 2 for {{ ansible_distribution }}" when: ansible_distribution != 'Fedora' and ansible_python['version']['major'] != 2 +# Fail as early as possible if Atomic and old version of Docker +- block: + + # See https://access.redhat.com/articles/2317361 + # and https://github.com/ansible/ansible/issues/15892 + # NOTE: the "'s can not be removed at this level else the docker command will fail + # NOTE: When ansible >2.2.1.x is used this can be updated per + # https://github.com/openshift/openshift-ansible/pull/3475#discussion_r103525121 + - name: Determine Atomic Host Docker Version + shell: 'CURLY="{"; docker version --format "$CURLY{json .Server.Version}}"' + register: l_atomic_docker_version + + - assert: + msg: Installation on Atomic Host requires Docker 1.12 or later. Please upgrade and restart the Atomic Host. + that: + - l_atomic_docker_version.stdout | replace('"', '') | version_compare('1.12','>=') + + when: l_is_atomic | bool + - name: Ensure various deps are installed package: name={{ item }} state=present with_items: "{{ required_packages }}" |