verify_docker_upgrade_targets.yml 996 B

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