diff options
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades/docker')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml b/playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml index 928913ef3..caf8d1de5 100644 --- a/playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml +++ b/playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml @@ -1,4 +1,10 @@ --- + +# This snippet determines if docker_upgrade should be set for the host. If it's already +# set via the inventory we will respect it. Otherwise we check if the current version +# is equal to the either the latest, or the requested docker_version, and set +# docker_upgrade accordingly. + - name: Determine available Docker version script: ../../../../common/openshift-cluster/upgrades/files/rpm_versions.sh docker register: g_docker_version_result @@ -26,6 +32,13 @@ # Disable the 1.10 requirement if the user set a specific Docker version when: avail_docker_version.stdout | version_compare('1.10','<') and docker_version is not defined +# We respect docker_upgrade=False in the inventory, but True is the default and +# if set in inventory, we still flip it to False here and only set to true if +# they're not already running the required version. +- set_fact: + docker_upgrade: False + when: docker_upgrade is not defined or docker_upgrade | bool + - name: Flag for upgrade if Docker version does not equal latest set_fact: docker_upgrade: true |