123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- ---
- # This is a hack to allow us to update various components without restarting
- # services. This will persist into the upgrade play as well, so everything
- # needs to be restarted by hand.
- - set_fact:
- skip_node_svc_handlers: True
- - import_tasks: registry_auth.yml
- - name: Check that pod image is present
- command: "{{ openshift_container_cli }} images -q {{ osn_pod_image }}"
- register: pod_image
- # This task runs async to save time while other downloads proceed
- - name: pre-pull pod image
- docker_image:
- name: "{{ osn_pod_image }}"
- environment:
- NO_PROXY: "{{ openshift.common.no_proxy | default('') }}"
- when: pod_image.stdout_lines == []
- # 10 minutes to pull the image
- async: 600
- poll: 0
- register: pod_image_prepull
- - name: update package meta data to speed install later.
- command: "{{ ansible_pkg_mgr }} makecache"
- register: result
- until: result is succeeded
- when: not openshift_is_atomic | bool
- # Prepull the rpms for docker upgrade, but don't install
- - name: download docker upgrade rpm
- command: "{{ ansible_pkg_mgr }} install -y --downloadonly docker{{ '-' + docker_version }}"
- register: result
- until: result is succeeded
- when:
- - l_docker_upgrade is defined
- - l_docker_upgrade | bool
- - name: Stage cri-o updates
- command: "{{ ansible_pkg_mgr }} install -y --downloadonly {{ crio_pkgs | join(' ') }}"
- register: result
- until: result is succeeded
- when:
- - openshift_use_crio | bool
- vars:
- crio_pkgs:
- - "cri-o"
- - "cri-tools"
- - import_tasks: upgrade/rpm_upgrade.yml
- when: not openshift_is_atomic | bool
- - name: Check status of node pod image pre-pull
- async_status:
- jid: "{{ pod_image_prepull.ansible_job_id }}"
- register: job_result
- until: job_result.finished
- when: pod_image.stdout_lines == []
- retries: 20
- delay: 30
- failed_when: false
|