|
1 | 1 | --- |
2 | | -- name: "{{ test_id | upper }} Converge - Configuration deployment with CVP" |
| 2 | +- name: "Converge - Configuration deployment with CVP - {{ test_id | upper }}" |
3 | 3 | hosts: SITE1_FABRIC |
4 | 4 | connection: local |
5 | 5 | gather_facts: false |
|
20 | 20 | cv_common_pattern: "avd_cv-deploy_{{ test_id }}" |
21 | 21 |
|
22 | 22 | tasks: |
23 | | - - name: "{{ test_id | upper }} Banner" |
| 23 | + - name: "Banner - {{ test_id | upper }}" |
24 | 24 | tags: ["{{ test_id }}"] |
25 | 25 | run_once: true |
26 | 26 | ansible.builtin.debug: |
|
29 | 29 | - "### STARTING MOLECULE TEST {{ test_id[:69] | upper }} ###" |
30 | 30 | - "{{ ('#' * (31 + test_id | length))[:100] }}" |
31 | 31 |
|
32 | | - - name: "{{ test_id | upper }} {{ 'Read' if lookup('env', 'MOLECULE_EXECUTION_ID') else 'Generate' }} molecule execution ID" |
| 32 | + - name: "{{ (test_id | upper) + ' - ' + ('Read' if lookup('env', 'MOLECULE_EXECUTION_ID') else 'Generate') + ' molecule execution ID' }}" |
33 | 33 | tags: ["{{ test_id }}"] |
34 | 34 | run_once: true |
35 | 35 | ansible.builtin.set_fact: |
36 | 36 | r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" |
37 | 37 |
|
38 | | - - name: "{{ test_id | upper }} Code block to provision CVP with AVD configuration" |
| 38 | + - name: "Code block to provision CVP with AVD configuration - {{ test_id | upper }}" |
39 | 39 | tags: ["{{ test_id }}"] |
40 | 40 | run_once: true |
41 | 41 | delegate_to: localhost |
42 | 42 |
|
43 | 43 | block: |
44 | 44 |
|
45 | | - - name: "(BLOCK) {{ test_id | upper }} Banner" |
| 45 | + - name: "(BLOCK) Banner - {{ test_id | upper }}" |
46 | 46 | tags: ["{{ test_id }}"] |
47 | 47 | run_once: true |
48 | 48 | ansible.builtin.debug: |
49 | 49 | msg: |
50 | 50 | - "### ENGAGE CV_DEPLOY ROLE TO PUSH CONFIGURATION FOR {{ test_id[:69] | upper }} ###" |
51 | 51 |
|
52 | | - - name: "(BLOCK) {{ test_id | upper }} Provision CVP with AVD configuration" |
| 52 | + - name: "(BLOCK) Provision CVP with AVD configuration - {{ test_id | upper }}" |
53 | 53 | tags: ["{{ test_id }}"] |
54 | 54 | run_once: true |
55 | 55 | delegate_to: localhost |
|
64 | 64 | cv_submit_workspace_force: true |
65 | 65 | cv_run_change_control: true |
66 | 66 |
|
67 | | - - name: "(BLOCK) {{ test_id | upper }} Check CVP returns" |
| 67 | + - name: "(BLOCK) Check CVP returns - {{ test_id | upper }}" |
68 | 68 | tags: ["{{ test_id }}"] |
69 | 69 | run_once: true |
70 | 70 | ansible.builtin.assert: |
|
90 | 90 | cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_converge" |
91 | 91 | cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" |
92 | 92 |
|
93 | | - - name: "(BLOCK) {{ test_id | upper }} Check tags from output" |
| 93 | + - name: "(BLOCK) Check tags from output - {{ test_id | upper }}" |
94 | 94 | tags: ["{{ test_id }}"] |
95 | 95 | run_once: true |
96 | 96 | ansible.builtin.assert: |
|
99 | 99 | - item.0.value == item.1.value |
100 | 100 | loop: "{{ cv_deploy_results.deployed_device_tags | zip(cv_deploy_results.device_tags) | list }}" |
101 | 101 |
|
102 | | - - name: "(BLOCK) {{ test_id | upper }} Extract all device tags from structured configs" |
| 102 | + - name: "(BLOCK) Extract all device tags from structured configs - {{ test_id | upper }}" |
103 | 103 | tags: ["{{ test_id }}"] |
104 | 104 | run_once: true |
105 | 105 | ansible.builtin.set_fact: |
106 | 106 | expected_device_tags: "{{ intended_tags.metadata.cv_tags.device_tags }}" |
107 | 107 | output_device_tags: "{{ cv_deploy_results.deployed_device_tags }}" |
108 | 108 |
|
109 | | - - name: "(BLOCK) {{ test_id | upper }} Check output device tags == intended device tags" |
| 109 | + - name: "(BLOCK) Check output device tags == intended device tags - {{ test_id | upper }}" |
110 | 110 | tags: ["{{ test_id }}"] |
111 | 111 | run_once: true |
112 | 112 | ansible.builtin.assert: |
|
115 | 115 | - item.0.value == item.1.value |
116 | 116 | loop: "{{ expected_device_tags | zip(output_device_tags) | list }}" |
117 | 117 |
|
118 | | - - name: "(BLOCK) {{ test_id | upper }} Extract all interface tags from role output" |
| 118 | + - name: "(BLOCK) Extract all interface tags from role output - {{ test_id | upper }}" |
119 | 119 | tags: ["{{ test_id }}"] |
120 | 120 | run_once: true |
121 | 121 | ansible.builtin.set_fact: |
122 | 122 | output_interface_tags: "{{ cv_deploy_results.deployed_interface_tags }}" |
123 | 123 |
|
124 | | - - name: "(BLOCK) {{ test_id | upper }} Extract all interface tags from structured configs" |
| 124 | + - name: "(BLOCK) Extract all interface tags from structured configs - {{ test_id | upper }}" |
125 | 125 | tags: ["{{ test_id }}"] |
126 | 126 | run_once: true |
127 | 127 | ansible.builtin.set_fact: |
|
130 | 130 | loop_control: |
131 | 131 | label: "{{ item.interface }}" |
132 | 132 |
|
133 | | - - name: "(BLOCK) {{ test_id | upper }} Check output interface tags == intended interface tags" |
| 133 | + - name: "(BLOCK) Check output interface tags == intended interface tags - {{ test_id | upper }}" |
134 | 134 | tags: ["{{ test_id }}"] |
135 | 135 | run_once: true |
136 | 136 | ansible.builtin.assert: |
|
139 | 139 | - item.0.value == item.1.value |
140 | 140 | loop: "{{ expected_interface_tags | zip(output_interface_tags) | list }}" |
141 | 141 |
|
142 | | - - name: "(BLOCK) {{ test_id | upper }} Convert unstructed data into yaml" |
| 142 | + - name: "(BLOCK) Convert unstructed data into yaml - {{ test_id | upper }}" |
143 | 143 | tags: ["{{ test_id }}"] |
144 | 144 | run_once: true |
145 | 145 | ansible.builtin.set_fact: |
146 | 146 | deivces_structure: '{{ cv_deploy_results.deployed_configs | from_yaml }}' |
147 | 147 | output_devices: [] |
148 | 148 |
|
149 | | - - name: "(BLOCK) {{ test_id | upper }} Extract devices from output" |
| 149 | + - name: "(BLOCK) Extract devices from output - {{ test_id | upper }}" |
150 | 150 | tags: ["{{ test_id }}"] |
151 | 151 | run_once: true |
152 | 152 | ansible.builtin.set_fact: |
|
155 | 155 | loop_control: |
156 | 156 | label: "{{ item.configlet_name }}" |
157 | 157 |
|
158 | | - - name: "(BLOCK) {{ test_id | upper }} Check output devices == intended devices" |
| 158 | + - name: "(BLOCK) Check output devices == intended devices - {{ test_id | upper }}" |
159 | 159 | tags: ["{{ test_id }}"] |
160 | 160 | run_once: true |
161 | 161 | ansible.builtin.assert: |
|
164 | 164 |
|
165 | 165 | always: |
166 | 166 |
|
167 | | - - name: "(ALWAYS) {{ test_id | upper }} Display CVP detailed result" |
| 167 | + - name: "(ALWAYS) Display CVP detailed result - {{ test_id | upper }}" |
168 | 168 | tags: ["{{ test_id }}"] |
169 | 169 | run_once: true |
170 | 170 | ansible.builtin.debug: |
171 | 171 | var: cv_deploy_results |
172 | 172 |
|
173 | | - - name: "(ALWAYS) {{ test_id | upper }} Banner" |
| 173 | + - name: "(ALWAYS) Banner - {{ test_id | upper }}" |
174 | 174 | tags: ["{{ test_id }}"] |
175 | 175 | run_once: true |
176 | 176 | ansible.builtin.debug: |
177 | 177 | msg: |
178 | 178 | - "### ENGAGE CV_DEPLOY ROLE TO CLEANUP AFTER {{ test_id[:69] | upper }} ###" |
179 | 179 |
|
180 | | - - name: "(ALWAYS) {{ test_id | upper }} Cleanup" |
| 180 | + - name: "(ALWAYS) Cleanup - {{ test_id | upper }}" |
181 | 181 | tags: ["{{ test_id }}"] |
182 | 182 | run_once: true |
183 | 183 | delegate_to: localhost |
|
0 commit comments