verify_docker_upgrade_targets.yml 868 B

12345678910111213141516171819202122
  1. ---
  2. # Only check if docker upgrade is required if docker_upgrade is not
  3. # already set to False.
  4. - include_tasks: ../../docker/upgrade_check.yml
  5. when:
  6. - docker_upgrade is not defined or (docker_upgrade | bool)
  7. - not (openshift.common.is_atomic | bool)
  8. # Additional checks for Atomic hosts:
  9. - name: Determine available Docker
  10. shell: "rpm -q --queryformat '---\ncurr_version: %{VERSION}\navail_version: \n' docker"
  11. register: g_atomic_docker_version_result
  12. when: openshift.common.is_atomic | bool
  13. - set_fact:
  14. l_docker_version: "{{ g_atomic_docker_version_result.stdout | from_yaml }}"
  15. when: openshift.common.is_atomic | bool
  16. - fail:
  17. msg: This playbook requires access to Docker 1.12 or later
  18. when: openshift.common.is_atomic | bool and l_docker_version.avail_version | default(l_docker_version.curr_version, true) | version_compare('1.12','<')