|
1 | 1 | ---
|
| 2 | + |
2 | 3 | - name: Create example-cnf facts
|
3 | 4 | set_fact:
|
4 | 5 | app_version: v0.2.6
|
|
73 | 74 | when:
|
74 | 75 | - dci_change_dir is defined
|
75 | 76 |
|
| 77 | +- name: Create the preflight_operators_to_certify variable |
| 78 | + when: |
| 79 | + - certify_operators | default(false) | bool |
| 80 | + - example_cnf_index_image is defined |
| 81 | + block: |
| 82 | + - name: Get Catalog Data |
| 83 | + ansible.builtin.shell: |
| 84 | + cmd: > |
| 85 | + set -e -o pipefail; |
| 86 | + ~/clusterconfigs-{{ cluster_name }}/opm render |
| 87 | + {{ example_cnf_index_image }} | |
| 88 | + jq -r '.relatedImages[].image' |
| 89 | + args: |
| 90 | + executable: /bin/bash |
| 91 | + register: catalog_data_cmd |
| 92 | + retries: 1 |
| 93 | + delay: 5 |
| 94 | + until: |
| 95 | + - catalog_data_cmd.rc == 0 |
| 96 | + |
| 97 | + - name: Create an empty preflight_operators_to_certify variable |
| 98 | + ansible.builtin.set_fact: |
| 99 | + preflight_operators_to_certify: [] |
| 100 | + |
| 101 | + - name: Populate the preflight_operators_to_certify variable |
| 102 | + ansible.builtin.set_fact: |
| 103 | + preflight_operators_to_certify: "{{ preflight_operators_to_certify + [dict(bundle_image=item, index_image=example_cnf_index_image)] }}" |
| 104 | + when: '"bundle@" in item' |
| 105 | + loop: "{{ catalog_data_cmd.stdout_lines }}" |
| 106 | + |
| 107 | + - name: Display the prefight_operators_to_certify variable |
| 108 | + ansible.builtin.debug: |
| 109 | + msg: "{{ preflight_operators_to_certify }}" |
| 110 | + |
76 | 111 | - name: "Create CNF Namespace"
|
77 | 112 | community.kubernetes.k8s:
|
78 | 113 | state: present
|
|
115 | 150 | loop_control:
|
116 | 151 | loop_var: sriov
|
117 | 152 | when: sriov_network is defined
|
| 153 | + tags: [sriov] |
118 | 154 |
|
119 | 155 | - name: Create SriovNetwork
|
120 | 156 | k8s:
|
|
123 | 159 | loop_control:
|
124 | 160 | loop_var: sriov
|
125 | 161 | when: sriov_network is defined
|
| 162 | + tags: [sriov] |
126 | 163 |
|
127 | 164 | # SR-IOV operator reports networks to be well-created,
|
128 | 165 | # but then it takes several minutes
|
129 | 166 | # to see them allocatable on the worker nodes.
|
130 | 167 | # OCPBUGS created in case of issues (OCP 4.12/13/14) - https://issues.redhat.com/browse/OCPBUGS-13278
|
131 | 168 | # Workaround included in check-resource common role in dci-openshift-agent for the moment
|
132 | 169 | - name: Ensure that SR-IOV networks are allocatable on the nodes
|
| 170 | + tags: [sriov] |
133 | 171 | block:
|
134 | 172 | - name: Wait to have all networks allocatable on worker nodes
|
135 | 173 | include_role:
|
|
160 | 198 | name: "{{ dci_config_dir }}/hooks/roles/sriov-networks"
|
161 | 199 |
|
162 | 200 | - name: SR-IOV must-gather
|
| 201 | + tags: [sriov] |
163 | 202 | script: "{{ dci_config_dir }}/hooks/files/collect-sriov-operator-data.sh {{ oc_tool_path }} | tee {{ job_logs.path }}/collect-sriov-operator-data.txt"
|
164 | 203 | ignore_errors: true
|
165 | 204 | no_log: true
|
|
0 commit comments