|
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 | + {% if mc_pullsecret is defined %} |
| 88 | + --authfile {{ mc_pullsecret }} |
| 89 | + {% endif %} |
| 90 | + {{ example_cnf_index_image }} | |
| 91 | + jq -r '.relatedImages[].image' |
| 92 | + args: |
| 93 | + executable: /bin/bash |
| 94 | + register: catalog_data_cmd |
| 95 | + retries: 1 |
| 96 | + delay: 5 |
| 97 | + until: |
| 98 | + - catalog_data_cmd.rc == 0 |
| 99 | + |
| 100 | + - name: Create an empty preflight_operators_to_certify variable |
| 101 | + ansible.builtin.set_fact: |
| 102 | + preflight_operators_to_certify: [] |
| 103 | + |
| 104 | + - name: Populate the preflight_operators_to_certify variable |
| 105 | + ansible.builtin.set_fact: |
| 106 | + preflight_operators_to_certify: "{{ preflight_operators_to_certify + [dict(bundle_image=item, index_image=example_cnf_index_image)] }}" |
| 107 | + when: '"bundle@" in item' |
| 108 | + loop: "{{ catalog_data_cmd.stdout_lines }}" |
| 109 | + |
| 110 | + - name: Display the prefight_operators_to_certify variable |
| 111 | + ansible.builtin.debug: |
| 112 | + msg: "{{ preflight_operators_to_certify }}" |
| 113 | + |
76 | 114 | - name: "Create CNF Namespace"
|
77 | 115 | community.kubernetes.k8s:
|
78 | 116 | state: present
|
|
115 | 153 | loop_control:
|
116 | 154 | loop_var: sriov
|
117 | 155 | when: sriov_network is defined
|
| 156 | + tags: [sriov] |
118 | 157 |
|
119 | 158 | - name: Create SriovNetwork
|
120 | 159 | k8s:
|
|
123 | 162 | loop_control:
|
124 | 163 | loop_var: sriov
|
125 | 164 | when: sriov_network is defined
|
| 165 | + tags: [sriov] |
126 | 166 |
|
127 | 167 | # SR-IOV operator reports networks to be well-created,
|
128 | 168 | # but then it takes several minutes
|
129 | 169 | # to see them allocatable on the worker nodes.
|
130 | 170 | # OCPBUGS created in case of issues (OCP 4.12/13/14) - https://issues.redhat.com/browse/OCPBUGS-13278
|
131 | 171 | # Workaround included in check-resource common role in dci-openshift-agent for the moment
|
132 | 172 | - name: Ensure that SR-IOV networks are allocatable on the nodes
|
| 173 | + tags: [sriov] |
133 | 174 | block:
|
134 | 175 | - name: Wait to have all networks allocatable on worker nodes
|
135 | 176 | include_role:
|
|
160 | 201 | name: "{{ dci_config_dir }}/hooks/roles/sriov-networks"
|
161 | 202 |
|
162 | 203 | - name: SR-IOV must-gather
|
| 204 | + tags: [sriov] |
163 | 205 | script: "{{ dci_config_dir }}/hooks/files/collect-sriov-operator-data.sh {{ oc_tool_path }} | tee {{ job_logs.path }}/collect-sriov-operator-data.txt"
|
164 | 206 | ignore_errors: true
|
165 | 207 | no_log: true
|
|
0 commit comments