--- - name: Get cluster version kubernetes.core.k8s_info: api_version: config.openshift.io/v1 kind: ClusterVersion name: version kubeconfig: /auth/kubeconfig register: cluster_version - name: Set OCP version fact ansible.builtin.set_fact: ocp_version: "{{ cluster_version.resources[0].status.desired.version }}" - name: Create temporary directory for s390x artifacts ansible.builtin.tempfile: state: directory suffix: s390x register: temp_dir - name: Login to quay.io containers.podman.podman_login: username: "{{ (((ocp_pull_secret | string | from_json).auths['quay.io'].auth | b64decode) | split(':'))[0] }}" password: "{{ (((ocp_pull_secret | string | from_json).auths['quay.io'].auth | b64decode) | split(':'))[1] }}" registry: quay.io become: true - name: Extract s390x release tools ansible.builtin.command: cmd: "oc adm release extract --tools quay.io/openshift-release-dev/ocp-release:{{ ocp_version }}-s390x" chdir: "{{ temp_dir.path }}" register: extract_result changed_when: extract_result.rc == 0 become: true - name: Wait for RHCOS ISO to be available ansible.builtin.wait_for: path: "{{ temp_dir.path }}/rhcos-live.s390x.iso" timeout: 300 # 5 minutes should be enough - name: Install coreos-installer ansible.builtin.package: name: coreos-installer state: present become: true - name: Get cluster infrastructure details kubernetes.core.k8s_info: api_version: config.openshift.io/v1 kind: Infrastructure name: cluster register: cluster_infrastructure - name: Generate worker ignition config ansible.builtin.command: cmd: "openshift-install create worker-ignition" chdir: "{{ temp_dir.path }}" - name: Create ISO for s390x nodes ansible.builtin.command: cmd: >- coreos-installer iso customize --dest-ignition {{ temp_dir.path }}/worker.ign --output {{ temp_dir.path }}/s390x-worker.iso {{ temp_dir.path }}/rhcos-live.s390x.iso register: customize_result changed_when: customize_result.rc == 0 failed_when: customize_result.rc != 0