Skip to content

Commit e403e48

Browse files
authored
CI: Moving template in task title at the end to make ansible-lint happier (#6747)
1 parent 77f173a commit e403e48

14 files changed

Lines changed: 196 additions & 197 deletions

ansible_collections/arista/avd/.ansible-lint

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
profile: production
33

44
skip_list:
5-
- name[template] # Remove warnings on task names where Jinja template is not at the end
65
- run-once[task] # Remove warnings on using run_once with other strategies
76
- var-naming[no-role-prefix] # TODO: Fix internal variable names as a breaking change for AVD 6.0.0
87
kinds:

ansible_collections/arista/avd/extensions/molecule/cv_deploy/cc_false.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: "{{ test_id | upper }} Converge - cv_run_change_control = false"
2+
- name: "Converge - cv_run_change_control = false - {{ test_id | upper }}"
33
hosts: SITE1_FABRIC
44
connection: local
55
gather_facts: false
@@ -20,7 +20,7 @@
2020
cv_common_pattern: "avd_cv-deploy_{{ test_id }}"
2121

2222
tasks:
23-
- name: "{{ test_id | upper }} Banner"
23+
- name: "Banner - {{ test_id | upper }}"
2424
tags: ["{{ test_id }}"]
2525
run_once: true
2626
ansible.builtin.debug:
@@ -29,27 +29,27 @@
2929
- "### STARTING MOLECULE TEST {{ test_id[:69] | upper }} ###"
3030
- "{{ ('#' * (31 + test_id | length))[:100] }}"
3131

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' }}"
3333
tags: ["{{ test_id }}"]
3434
run_once: true
3535
ansible.builtin.set_fact:
3636
r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}"
3737

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 }}"
3939
tags: ["{{ test_id }}"]
4040
run_once: true
4141
delegate_to: localhost
4242

4343
block:
4444

45-
- name: "(BLOCK) {{ test_id | upper }} Banner"
45+
- name: "(BLOCK) Banner - {{ test_id | upper }}"
4646
tags: ["{{ test_id }}"]
4747
run_once: true
4848
ansible.builtin.debug:
4949
msg:
5050
- "### ENGAGE CV_DEPLOY ROLE TO PUSH CONFIGURATION FOR {{ test_id[:69] | upper }} ###"
5151

52-
- name: "(BLOCK) {{ test_id | upper }} Provision with cv_run_change_control = false"
52+
- name: "(BLOCK) Provision with cv_run_change_control = false - {{ test_id | upper }}"
5353
tags: ["{{ test_id }}"]
5454
run_once: true
5555
delegate_to: localhost
@@ -63,7 +63,7 @@
6363
cv_register_detailed_results: true
6464
cv_submit_workspace_force: true
6565

66-
- name: "(BLOCK) {{ test_id | upper }} Check CVP returns"
66+
- name: "(BLOCK) Check CVP returns - {{ test_id | upper }}"
6767
tags: ["{{ test_id }}"]
6868
run_once: true
6969
ansible.builtin.assert:
@@ -74,13 +74,13 @@
7474

7575
always:
7676

77-
- name: "(ALWAYS) {{ test_id | upper }} Display CVP detailed result"
77+
- name: "(ALWAYS) Display CVP detailed result - {{ test_id | upper }}"
7878
tags: ["{{ test_id }}"]
7979
run_once: true
8080
ansible.builtin.debug:
8181
var: cv_deploy_results
8282

83-
- name: "(ALWAYS) {{ test_id | upper }} Cleanup orphan CC"
83+
- name: "(ALWAYS) Cleanup orphan CC - {{ test_id | upper }}"
8484
tags: ["{{ test_id }}"]
8585
run_once: true
8686
ansible.legacy.uri:
@@ -107,14 +107,14 @@
107107
https_proxy: >-
108108
http://{{ (proxy_username and proxy_password) | ternary(proxy_username ~ ':' ~ proxy_password ~ '@', '') }}{{ proxy_host }}:{{ proxy_port }}
109109
110-
- name: "(ALWAYS) {{ test_id | upper }} Banner"
110+
- name: "(ALWAYS) Banner - {{ test_id | upper }}"
111111
tags: ["{{ test_id }}"]
112112
run_once: true
113113
ansible.builtin.debug:
114114
msg:
115115
- "### ENGAGE CV_DEPLOY ROLE TO CLEANUP AFTER {{ test_id[:69] | upper }} ###"
116116

117-
- name: "(ALWAYS) {{ test_id | upper }} Cleanup"
117+
- name: "(ALWAYS) Cleanup - {{ test_id | upper }}"
118118
tags: ["{{ test_id }}"]
119119
run_once: true
120120
delegate_to: localhost

ansible_collections/arista/avd/extensions/molecule/cv_deploy/cleanup.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: "{{ test_id | upper }} Cleanup - Configuration deployment with CVP"
2+
- name: "Cleanup - Configuration deployment with CVP - {{ test_id | upper }}"
33
hosts: SITE1_FABRIC
44
connection: local
55
gather_facts: false
@@ -18,7 +18,7 @@
1818
cv_common_pattern: "avd_cv-deploy_{{ test_id }}"
1919

2020
tasks:
21-
- name: "{{ test_id | upper }} Banner"
21+
- name: "Banner - {{ test_id | upper }}"
2222
# Force task to run even if we used tags matching specific tests
2323
tags: ["always"]
2424
run_once: true
@@ -28,14 +28,14 @@
2828
- "### STARTING {{ test_id[:83] | upper }} ###"
2929
- "{{ ('#' * (17 + test_id | length))[:100] }}"
3030

31-
- name: "{{ test_id | upper }} {{ 'Read' if lookup('env', 'MOLECULE_EXECUTION_ID') else 'Generate' }} molecule execution ID"
31+
- name: "{{ (test_id | upper) + ' - ' + ('Read' if lookup('env', 'MOLECULE_EXECUTION_ID') else 'Generate') + ' molecule execution ID' }}"
3232
# Force task to run even if we used tags matching specific tests
3333
tags: ["always"]
3434
run_once: true
3535
ansible.builtin.set_fact:
3636
r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}"
3737

38-
- name: "{{ test_id | upper }} Cleanup"
38+
- name: "Cleanup - {{ test_id | upper }}"
3939
# Force task to run even if we used tags matching specific tests
4040
tags: ["always"]
4141
run_once: true
@@ -54,7 +54,7 @@
5454
cv_run_change_control: true
5555
cv_strict_tags: true
5656

57-
- name: "{{ test_id | upper }} Display CVP result"
57+
- name: "Display CVP result - {{ test_id | upper }}"
5858
# Force task to run even if we used tags matching specific tests
5959
tags: ["always"]
6060
run_once: true

ansible_collections/arista/avd/extensions/molecule/cv_deploy/cv_deploy.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: "{{ test_id | upper }} Converge - Configuration deployment with CVP"
2+
- name: "Converge - Configuration deployment with CVP - {{ test_id | upper }}"
33
hosts: SITE1_FABRIC
44
connection: local
55
gather_facts: false
@@ -20,7 +20,7 @@
2020
cv_common_pattern: "avd_cv-deploy_{{ test_id }}"
2121

2222
tasks:
23-
- name: "{{ test_id | upper }} Banner"
23+
- name: "Banner - {{ test_id | upper }}"
2424
tags: ["{{ test_id }}"]
2525
run_once: true
2626
ansible.builtin.debug:
@@ -29,27 +29,27 @@
2929
- "### STARTING MOLECULE TEST {{ test_id[:69] | upper }} ###"
3030
- "{{ ('#' * (31 + test_id | length))[:100] }}"
3131

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' }}"
3333
tags: ["{{ test_id }}"]
3434
run_once: true
3535
ansible.builtin.set_fact:
3636
r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}"
3737

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 }}"
3939
tags: ["{{ test_id }}"]
4040
run_once: true
4141
delegate_to: localhost
4242

4343
block:
4444

45-
- name: "(BLOCK) {{ test_id | upper }} Banner"
45+
- name: "(BLOCK) Banner - {{ test_id | upper }}"
4646
tags: ["{{ test_id }}"]
4747
run_once: true
4848
ansible.builtin.debug:
4949
msg:
5050
- "### ENGAGE CV_DEPLOY ROLE TO PUSH CONFIGURATION FOR {{ test_id[:69] | upper }} ###"
5151

52-
- name: "(BLOCK) {{ test_id | upper }} Provision CVP with AVD configuration"
52+
- name: "(BLOCK) Provision CVP with AVD configuration - {{ test_id | upper }}"
5353
tags: ["{{ test_id }}"]
5454
run_once: true
5555
delegate_to: localhost
@@ -64,7 +64,7 @@
6464
cv_submit_workspace_force: true
6565
cv_run_change_control: true
6666

67-
- name: "(BLOCK) {{ test_id | upper }} Check CVP returns"
67+
- name: "(BLOCK) Check CVP returns - {{ test_id | upper }}"
6868
tags: ["{{ test_id }}"]
6969
run_once: true
7070
ansible.builtin.assert:
@@ -90,7 +90,7 @@
9090
cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_converge"
9191
cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}"
9292

93-
- name: "(BLOCK) {{ test_id | upper }} Check tags from output"
93+
- name: "(BLOCK) Check tags from output - {{ test_id | upper }}"
9494
tags: ["{{ test_id }}"]
9595
run_once: true
9696
ansible.builtin.assert:
@@ -99,14 +99,14 @@
9999
- item.0.value == item.1.value
100100
loop: "{{ cv_deploy_results.deployed_device_tags | zip(cv_deploy_results.device_tags) | list }}"
101101

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 }}"
103103
tags: ["{{ test_id }}"]
104104
run_once: true
105105
ansible.builtin.set_fact:
106106
expected_device_tags: "{{ intended_tags.metadata.cv_tags.device_tags }}"
107107
output_device_tags: "{{ cv_deploy_results.deployed_device_tags }}"
108108

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 }}"
110110
tags: ["{{ test_id }}"]
111111
run_once: true
112112
ansible.builtin.assert:
@@ -115,13 +115,13 @@
115115
- item.0.value == item.1.value
116116
loop: "{{ expected_device_tags | zip(output_device_tags) | list }}"
117117

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 }}"
119119
tags: ["{{ test_id }}"]
120120
run_once: true
121121
ansible.builtin.set_fact:
122122
output_interface_tags: "{{ cv_deploy_results.deployed_interface_tags }}"
123123

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 }}"
125125
tags: ["{{ test_id }}"]
126126
run_once: true
127127
ansible.builtin.set_fact:
@@ -130,7 +130,7 @@
130130
loop_control:
131131
label: "{{ item.interface }}"
132132

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 }}"
134134
tags: ["{{ test_id }}"]
135135
run_once: true
136136
ansible.builtin.assert:
@@ -139,14 +139,14 @@
139139
- item.0.value == item.1.value
140140
loop: "{{ expected_interface_tags | zip(output_interface_tags) | list }}"
141141

142-
- name: "(BLOCK) {{ test_id | upper }} Convert unstructed data into yaml"
142+
- name: "(BLOCK) Convert unstructed data into yaml - {{ test_id | upper }}"
143143
tags: ["{{ test_id }}"]
144144
run_once: true
145145
ansible.builtin.set_fact:
146146
deivces_structure: '{{ cv_deploy_results.deployed_configs | from_yaml }}'
147147
output_devices: []
148148

149-
- name: "(BLOCK) {{ test_id | upper }} Extract devices from output"
149+
- name: "(BLOCK) Extract devices from output - {{ test_id | upper }}"
150150
tags: ["{{ test_id }}"]
151151
run_once: true
152152
ansible.builtin.set_fact:
@@ -155,7 +155,7 @@
155155
loop_control:
156156
label: "{{ item.configlet_name }}"
157157

158-
- name: "(BLOCK) {{ test_id | upper }} Check output devices == intended devices"
158+
- name: "(BLOCK) Check output devices == intended devices - {{ test_id | upper }}"
159159
tags: ["{{ test_id }}"]
160160
run_once: true
161161
ansible.builtin.assert:
@@ -164,20 +164,20 @@
164164

165165
always:
166166

167-
- name: "(ALWAYS) {{ test_id | upper }} Display CVP detailed result"
167+
- name: "(ALWAYS) Display CVP detailed result - {{ test_id | upper }}"
168168
tags: ["{{ test_id }}"]
169169
run_once: true
170170
ansible.builtin.debug:
171171
var: cv_deploy_results
172172

173-
- name: "(ALWAYS) {{ test_id | upper }} Banner"
173+
- name: "(ALWAYS) Banner - {{ test_id | upper }}"
174174
tags: ["{{ test_id }}"]
175175
run_once: true
176176
ansible.builtin.debug:
177177
msg:
178178
- "### ENGAGE CV_DEPLOY ROLE TO CLEANUP AFTER {{ test_id[:69] | upper }} ###"
179179

180-
- name: "(ALWAYS) {{ test_id | upper }} Cleanup"
180+
- name: "(ALWAYS) Cleanup - {{ test_id | upper }}"
181181
tags: ["{{ test_id }}"]
182182
run_once: true
183183
delegate_to: localhost

0 commit comments

Comments
 (0)