From 97fc1d87b6ec48a30b5cb069154938ed4f33d447 Mon Sep 17 00:00:00 2001 From: Alexey Gorbunov Date: Wed, 12 Feb 2025 14:45:29 -0800 Subject: [PATCH 1/5] Enhance cv_deploy molecule ci --- .../avd/molecule/cv_deploy/cc_false.yml | 53 ++++++++---- .../arista/avd/molecule/cv_deploy/cleanup.yml | 22 +++-- .../avd/molecule/cv_deploy/cv_deploy.yml | 86 ++++++++++++------- .../cv_deploy/workspace_force_false.yml | 65 ++++++++++---- .../cv_deploy/workspace_force_true.yml | 54 ++++++++---- .../molecule/cv_deploy/workspace_pending.yml | 57 ++++++++---- 6 files changed, 223 insertions(+), 114 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml index f17ba023d50..2e6ec174858 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml @@ -1,5 +1,5 @@ --- -- name: Converge - cv_run_change_control = false +- name: "{{ test_id | upper }} Converge - cv_run_change_control = false" hosts: SITE1_FABRIC connection: local gather_facts: false @@ -12,38 +12,47 @@ structured_dir: "{{ playbook_dir }}/intended/structured_configs/test_configs" intended_tag_device: avd-ci-leaf1 intended_tags: "{{ lookup('file', structured_dir ~ '/' ~ intended_tag_device ~ '.yml')| from_yaml }}" + test_id: "force-ws-true_run-cc-false" + cv_common_pattern: "avd-cv-deploy_{{ test_id }}" tasks: - - name: Generate random string - ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + - name: "{{ test_id | upper }} Banner" + tags: ["{{ test_id }}"] run_once: true + ansible.builtin.debug: + msg: + - "{{ ('#' * (31 + test_id | length))[:100] }}" + - "### STARTING MOLECULE TEST {{ test_id[:69] | upper }} ###" + - "{{ ('#' * (31 + test_id | length))[:100] }}" - - name: Set facts - ansible.builtin.set_fact: - cv_workspace_name: avd-cv-deploy-{{ r }} - cv_workspace_description: sample description - cv_change_control_name: cc_cv_deploy-{{ r }} - cv_change_control_description: sample description - cv_register_detailed_results: true + - name: "{{ test_id | upper }} Generate random string" + tags: ["{{ test_id }}"] run_once: true + ansible.builtin.set_fact: + r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - - name: Provision with cv_run_change_control = false + - name: "{{ test_id | upper }} Provision with cv_run_change_control = false" + tags: ["{{ test_id }}"] run_once: true delegate_to: localhost ansible.builtin.import_role: name: arista.avd.cv_deploy vars: - cv_submit_workspace: true - cv_run_change_control: false + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_register_detailed_results: true cv_submit_workspace_force: true - - name: Display CVP result + - name: "{{ test_id | upper }} Display CVP result" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.debug: msg: '{{ cv_deploy_results }}' - - name: Check CVP returns + - name: "{{ test_id | upper }} Check CVP returns" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.assert: that: @@ -51,7 +60,8 @@ - cv_deploy_results.change_control.requested_state == "pending approval" - cv_deploy_results.change_control.requested_state == cv_deploy_results.change_control.state - - name: Cleanup orphan CC + - name: "{{ test_id | upper }} Cleanup orphan CC" + tags: ["{{ test_id }}"] run_once: true ansible.legacy.uri: url: https://{{ cv_server }}/api/resources/changecontrol/v1/ChangeControlConfig?key.id={{ cv_deploy_results.change_control.id }} @@ -72,14 +82,19 @@ ignore_errors: true when: cv_deploy_results.change_control.state | lower in ['pending approval', 'approved'] - - name: Cleanup + - name: "{{ test_id | upper }} Cleanup" + tags: ["{{ test_id }}"] run_once: true delegate_to: localhost ansible.builtin.import_role: name: arista.avd.cv_deploy vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_register_detailed_results: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" - cv_submit_workspace: true cv_submit_workspace_force: true cv_run_change_control: true diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml index 788db5da7ac..15e16527890 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml @@ -1,5 +1,5 @@ --- -- name: Cleanup - Configuration deployment with CVP +- name: "{{ test_id | upper }} Cleanup - Configuration deployment with CVP" hosts: SITE1_FABRIC connection: local gather_facts: false @@ -10,21 +10,14 @@ cv_skip_missing_devices: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" + test_id: "global-scenario-cleanup" + cv_common_pattern: "avd-cv-deploy_{{ test_id }}" tasks: - - name: Generate random string - ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + - name: "{{ test_id | upper }} Generate random string" run_once: true - - - name: Set facts ansible.builtin.set_fact: - cv_workspace_name: avd-cv-deploy-cleanup-{{ r }} - cv_workspace_description: sample description - cv_change_control_name: cc_cv_deploy-cleanup-{{ r }} - cv_change_control_description: sample description - cv_register_detailed_results: true - run_once: true + r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - name: Cleanup run_once: true @@ -32,6 +25,11 @@ ansible.builtin.import_role: name: arista.avd.cv_deploy vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_register_detailed_results: true cv_submit_workspace: true cv_submit_workspace_force: true cv_run_change_control: true diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml index 036f717ea64..808f8187f7d 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml @@ -1,5 +1,5 @@ --- -- name: Converge - Configuration deployment with CVP +- name: "{{ test_id | upper }} Converge - Configuration deployment with CVP" hosts: SITE1_FABRIC connection: local gather_facts: false @@ -12,48 +12,55 @@ structured_dir: "{{ playbook_dir }}/intended/structured_configs/test_configs" intended_tag_device: avd-ci-leaf1 intended_tags: "{{ lookup('file', structured_dir ~ '/' ~ intended_tag_device ~ '.yml')| from_yaml }}" + test_id: "force-ws-true_run-cc-true" + cv_common_pattern: "avd-cv-deploy_{{ test_id }}" tasks: - - name: Generate random string - ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + - name: "{{ test_id | upper }} Banner" + tags: ["{{ test_id }}"] run_once: true + ansible.builtin.debug: + msg: + - "{{ ('#' * (31 + test_id | length))[:100] }}" + - "### STARTING MOLECULE TEST {{ test_id[:69] | upper }} ###" + - "{{ ('#' * (31 + test_id | length))[:100] }}" - - name: Set facts - ansible.builtin.set_fact: - cv_workspace_name: avd-cv-deploy-{{ r }} - cv_workspace_description: sample description - cv_change_control_name: cc_cv_deploy-{{ r }} - cv_change_control_description: sample description - cv_register_detailed_results: true + - name: "{{ test_id | upper }} Generate random string" + tags: ["{{ test_id }}"] run_once: true + ansible.builtin.set_fact: + r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" -########################### -######## cv_deploy ######## -########################### - - name: Provision CVP with AVD configuration + - name: "{{ test_id | upper }} Provision CVP with AVD configuration" + tags: ["{{ test_id }}"] run_once: true delegate_to: localhost ansible.builtin.import_role: name: arista.avd.cv_deploy vars: - cv_submit_workspace: true + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_register_detailed_results: true cv_submit_workspace_force: true cv_run_change_control: true - cv_register_detailed_results: true - - name: Display CVP result + - name: "{{ test_id | upper }} Display CVP result" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.debug: msg: '{{ cv_deploy_results }}' - - name: Check CVP returns + - name: "{{ test_id | upper }} Check CVP returns" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.assert: that: # workspace - cv_deploy_results.workspace.name == cv_workspace_name - cv_deploy_results.workspace.state == "submitted" + - cv_deploy_results.workspace.description == cv_workspace_description - cv_deploy_results.workspace.state # errors and warnings - cv_deploy_results.errors == [] @@ -65,8 +72,14 @@ - cv_deploy_results.change_control.name == cv_change_control_name - cv_deploy_results.change_control.requested_state == "completed" - cv_deploy_results.change_control.description == cv_change_control_description + vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" - - name: Check tags from output + - name: "{{ test_id | upper }} Check tags from output" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.assert: that: @@ -74,13 +87,15 @@ - item.0.value == item.1.value loop: "{{ cv_deploy_results.deployed_device_tags | zip(cv_deploy_results.device_tags) | list }}" - - name: Extract all device tags from structured configs + - name: "{{ test_id | upper }} Extract all device tags from structured configs" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.set_fact: expected_device_tags: "{{ intended_tags.metadata.cv_tags.device_tags }}" output_device_tags: "{{ cv_deploy_results.deployed_device_tags }}" - - name: Check output device tags == intended device tags + - name: "{{ test_id | upper }} Check output device tags == intended device tags" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.assert: that: @@ -88,12 +103,14 @@ - item.0.value == item.1.value loop: "{{ expected_device_tags | zip(output_device_tags) | list }}" - - name: Extract all interface tags from role output + - name: "{{ test_id | upper }} Extract all interface tags from role output" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.set_fact: output_interface_tags: "{{ cv_deploy_results.deployed_interface_tags }}" - - name: Extract all interface tags from structured configs + - name: "{{ test_id | upper }} Extract all interface tags from structured configs" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.set_fact: expected_interface_tags: "{{ expected_interface_tags | default([]) + [item.tags | list | first | combine({'interface': item.interface})] }}" @@ -101,7 +118,8 @@ loop_control: label: "{{ item.interface }}" - - name: Check output interface tags == intended interface tags + - name: "{{ test_id | upper }} Check output interface tags == intended interface tags" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.assert: that: @@ -109,13 +127,15 @@ - item.0.value == item.1.value loop: "{{ expected_interface_tags | zip(output_interface_tags) | list }}" - - name: Convert unstructed data into yaml + - name: "{{ test_id | upper }} Convert unstructed data into yaml" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.set_fact: deivces_structure: '{{ cv_deploy_results.deployed_configs | from_yaml }}' output_devices: [] - - name: Extract devices from output + - name: "{{ test_id | upper }} Extract devices from output" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.set_fact: output_devices: "{{ output_devices + [item.device.hostname] }}" @@ -123,20 +143,26 @@ loop_control: label: "{{ item.configlet_name }}" - - name: Check output devices == intended devices + - name: "{{ test_id | upper }} Check output devices == intended devices" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.assert: that: - output_devices == cv_devices - - name: Cleanup + - name: "{{ test_id | upper }} Cleanup" + tags: ["{{ test_id }}"] run_once: true delegate_to: localhost ansible.builtin.import_role: name: arista.avd.cv_deploy vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_register_detailed_results: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" - cv_submit_workspace: true cv_submit_workspace_force: true cv_run_change_control: true diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml index 275ada5f4cc..b48a99b08c4 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml @@ -1,5 +1,5 @@ --- -- name: Converge - cv_submit_workspace_force = false +- name: "{{ test_id | upper }} Converge - cv_submit_workspace_force = false" hosts: SITE1_FABRIC:INACTIVE connection: local gather_facts: false @@ -12,47 +12,67 @@ structured_dir: "{{ playbook_dir }}/intended/structured_configs/test_configs" intended_tag_device: avd-ci-leaf1 intended_tags: "{{ lookup('file', structured_dir ~ '/' ~ intended_tag_device ~ '.yml')| from_yaml }}" + test_id: "inactive-device_force-ws-false" + cv_common_pattern: "avd-cv-deploy_{{ test_id }}" tasks: - - name: Generate random string - ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + - name: "{{ test_id | upper }} Banner" + tags: ["{{ test_id }}"] run_once: true + ansible.builtin.debug: + msg: + - "{{ ('#' * (31 + test_id | length))[:100] }}" + - "### STARTING MOLECULE TEST {{ test_id[:69] | upper }} ###" + - "{{ ('#' * (31 + test_id | length))[:100] }}" - - name: Set facts + - name: "{{ test_id | upper }} Generate random string" + tags: ["{{ test_id }}"] ansible.builtin.set_fact: - cv_workspace_name: avd-cv-deploy-{{ r }} - cv_workspace_description: sample description - cv_change_control_name: cc_cv_deploy-{{ r }} - cv_change_control_description: sample description - cv_register_detailed_results: true + r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" run_once: true - - name: Dynamically add inactive device avd-ci-core1 to group INACTIVE + - name: "{{ test_id | upper }} Dynamically add inactive device avd-ci-core1 to group INACTIVE" + tags: ["{{ test_id }}"] run_once: true ansible.legacy.add_host: name: avd-ci-core1 groups: INACTIVE - - name: Provision with cv_submit_workspace_force = false + - name: "{{ test_id | upper }} Provision with cv_submit_workspace_force = false" + tags: ["{{ test_id }}"] run_once: true delegate_to: localhost + block: - name: Trigger errors + tags: ["{{ test_id }}"] ansible.builtin.import_role: name: arista.avd.cv_deploy vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_register_detailed_results: true cv_devices: [ avd-ci-leaf1, avd-ci-core1 ] - cv_submit_workspace_force: false + rescue: - - name: Check CVP returns + - name: "{{ test_id | upper }} Display CVP result" + tags: ["{{ test_id }}"] + run_once: true + ansible.builtin.debug: + msg: '{{ cv_deploy_results }}' + + - name: "{{ test_id | upper }} Check CVP returns" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.assert: that: # errors and warnings - "'Failed to submit workspace' in cv_deploy_results.errors[0]" - - name: Cleanup orphan workspace + - name: "{{ test_id | upper }} Cleanup orphan workspace" + tags: ["{{ test_id }}"] run_once: true ansible.legacy.uri: url: https://{{ cv_server }}/api/resources/workspace/v1/WorkspaceConfig/some @@ -85,21 +105,30 @@ retries: 3 delay: 3 ignore_errors: true - when: cv_deploy_results.workspace.id is not none and cv_deploy_results.workspace.id | length > 0 + when: | + cv_deploy_results.workspace.id is not none and + cv_deploy_results.workspace.id | length > 0 and + cv_deploy_results.workspace.state | default('') != "abandoned" - - name: Cleanup + - name: "{{ test_id | upper }} Cleanup" + tags: ["{{ test_id }}"] run_once: true delegate_to: localhost ansible.builtin.import_role: name: arista.avd.cv_deploy vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_register_detailed_results: true cv_devices: "{{ ansible_play_hosts_all }}" eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" - cv_submit_workspace: true cv_submit_workspace_force: true cv_run_change_control: true # Clear failed state of failed hosts for next engaged playbook (no impact within running playbook) - name: Reset ansible_play_hosts for next playbook (no impact within running playbook) + tags: ["{{ test_id }}"] ansible.builtin.meta: clear_host_errors diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml index d81ae96176e..a6441e3423c 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml @@ -1,5 +1,5 @@ --- -- name: Converge - cv_deploy with cv_submit_workspace_force = true +- name: "{{ test_id | upper }} Converge - cv_deploy with cv_submit_workspace_force = true" hosts: SITE1_FABRIC:INACTIVE connection: local gather_facts: false @@ -12,50 +12,63 @@ structured_dir: "{{ playbook_dir }}/intended/structured_configs/test_configs" intended_tag_device: avd-ci-leaf1 intended_tags: "{{ lookup('file', structured_dir ~ '/' ~ intended_tag_device ~ '.yml')| from_yaml }}" + test_id: "inactive-device_force-ws-true" + cv_common_pattern: "avd-cv-deploy_{{ test_id }}" tasks: - - name: Generate random string - ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + - name: "{{ test_id | upper }} Banner" + tags: ["{{ test_id }}"] run_once: true + ansible.builtin.debug: + msg: + - "{{ ('#' * (31 + test_id | length))[:100] }}" + - "### STARTING MOLECULE TEST {{ test_id[:69] | upper }} ###" + - "{{ ('#' * (31 + test_id | length))[:100] }}" - - name: Set facts - ansible.builtin.set_fact: - cv_workspace_name: avd-cv-deploy-{{ r }} - cv_workspace_description: sample description - cv_change_control_name: cc_cv_deploy-{{ r }} - cv_change_control_description: sample description - cv_register_detailed_results: true + - name: "{{ test_id | upper }} Generate random string" + tags: ["{{ test_id }}"] run_once: true + ansible.builtin.set_fact: + r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - - name: Dynamically add inactive device avd-ci-core1 to group INACTIVE + - name: "{{ test_id | upper }} Dynamically add inactive device avd-ci-core1 to group INACTIVE" + tags: ["{{ test_id }}"] run_once: true ansible.legacy.add_host: name: avd-ci-core1 groups: INACTIVE - - name: Provision with cv_submit_workspace_force = true + - name: "{{ test_id | upper }} Provision with cv_submit_workspace_force = true" + tags: ["{{ test_id }}"] run_once: true delegate_to: localhost ansible.builtin.import_role: name: arista.avd.cv_deploy vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_register_detailed_results: true cv_devices: [ avd-ci-leaf1, avd-ci-core1 ] cv_submit_workspace_force: true - - name: Display CVP result + - name: "{{ test_id | upper }} Display CVP result" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.debug: msg: '{{ cv_deploy_results }}' - - name: Check CVP returns + - name: "{{ test_id | upper }} Check CVP returns" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.assert: that: # errors and warnings - cv_deploy_results.errors == [] - - name: Cleanup orphan CC + - name: "{{ test_id | upper }} Cleanup orphan CC" + tags: ["{{ test_id }}"] run_once: true ansible.legacy.uri: url: https://{{ cv_server }}/api/resources/changecontrol/v1/ChangeControlConfig?key.id={{ cv_deploy_results.change_control.id }} @@ -76,14 +89,19 @@ ignore_errors: true when: cv_deploy_results.change_control.state | lower in ['pending approval', 'approved'] - - name: Cleanup + - name: "{{ test_id | upper }} Cleanup" + tags: ["{{ test_id }}"] run_once: true delegate_to: localhost ansible.builtin.import_role: name: arista.avd.cv_deploy vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_register_detailed_results: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" - cv_submit_workspace: true cv_submit_workspace_force: true cv_run_change_control: true diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml index 5251c219c81..e76d0c732ad 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml @@ -12,39 +12,54 @@ structured_dir: "{{ playbook_dir }}/intended/structured_configs/test_configs" intended_tag_device: avd-ci-leaf1 intended_tags: "{{ lookup('file', structured_dir ~ '/' ~ intended_tag_device ~ '.yml')| from_yaml }}" + test_id: "submit-ws-false" + cv_common_pattern: "avd-cv-deploy_{{ test_id }}" tasks: - - name: Generate random string - ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + - name: "{{ test_id | upper }} Banner" + tags: ["{{ test_id }}"] run_once: true + ansible.builtin.debug: + msg: + - "{{ ('#' * (31 + test_id | length))[:100] }}" + - "### STARTING MOLECULE TEST {{ test_id[:69] | upper }} ###" + - "{{ ('#' * (31 + test_id | length))[:100] }}" - - name: Set facts - ansible.builtin.set_fact: - cv_workspace_name: avd-cv-deploy-{{ r }} - cv_workspace_description: sample description - cv_change_control_name: cc_cv_deploy-{{ r }} - cv_change_control_description: sample description - cv_register_detailed_results: true + - name: "{{ test_id | upper }} Generate random string" + tags: ["{{ test_id }}"] run_once: true + ansible.builtin.set_fact: + r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - - name: Provision with workspace "Pending" + - name: "{{ test_id | upper }} Provision with Workspace Pending" run_once: true delegate_to: localhost ansible.builtin.import_role: name: arista.avd.cv_deploy vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_converge" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_converge') | upper }}" + cv_register_detailed_results: true cv_submit_workspace: false - cv_submit_workspace_force: true - - name: Check CVP returns + - name: "{{ test_id | upper }} Display CVP result" + tags: ["{{ test_id }}"] + run_once: true + ansible.builtin.debug: + msg: '{{ cv_deploy_results }}' + + - name: "{{ test_id | upper }} Check CVP returns" + tags: ["{{ test_id }}"] run_once: true ansible.builtin.assert: that: # workspace - cv_deploy_results.workspace.state == cv_deploy_results.workspace.requested_state - - name: Cleanup orphan workspace + - name: "{{ test_id | upper }} Cleanup orphan workspace" + tags: ["{{ test_id }}"] run_once: true ansible.legacy.uri: url: https://{{ cv_server }}/api/resources/workspace/v1/WorkspaceConfig/some @@ -77,16 +92,24 @@ retries: 3 delay: 3 ignore_errors: true - when: cv_deploy_results.workspace.id is not none and cv_deploy_results.workspace.id | length > 0 + when: | + cv_deploy_results.workspace.id is not none and + cv_deploy_results.workspace.id | length > 0 and + cv_deploy_results.workspace.state | default('') != "abandoned" - - name: Cleanup + - name: "{{ test_id | upper }} Cleanup" + tags: ["{{ test_id }}"] run_once: true delegate_to: localhost ansible.builtin.import_role: name: arista.avd.cv_deploy vars: + cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" + cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_register_detailed_results: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" - cv_submit_workspace: true cv_submit_workspace_force: true cv_run_change_control: true From 3e03d1f9c7e2d6d92e880603c74239cae4ed4403 Mon Sep 17 00:00:00 2001 From: Alexey Gorbunov Date: Wed, 12 Feb 2025 15:38:28 -0800 Subject: [PATCH 2/5] Force global cleanup tasks to always run despite tagging --- .../arista/avd/molecule/cv_deploy/cleanup.yml | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml index 15e16527890..47d16df6b5f 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml @@ -14,12 +14,26 @@ cv_common_pattern: "avd-cv-deploy_{{ test_id }}" tasks: + - name: "{{ test_id | upper }} Banner" + # Force task to run even if we used tags matching specific tests + tags: ["always"] + run_once: true + ansible.builtin.debug: + msg: + - "{{ ('#' * (17 + test_id | length))[:100] }}" + - "### STARTING {{ test_id[:83] | upper }} ###" + - "{{ ('#' * (17 + test_id | length))[:100] }}" + - name: "{{ test_id | upper }} Generate random string" + # Force task to run even if we used tags matching specific tests + tags: ["always"] run_once: true ansible.builtin.set_fact: r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - - name: Cleanup + - name: "{{ test_id | upper }} Cleanup" + # Force task to run even if we used tags matching specific tests + tags: ["always"] run_once: true delegate_to: localhost ansible.builtin.import_role: @@ -34,3 +48,10 @@ cv_submit_workspace_force: true cv_run_change_control: true cv_strict_tags: true + + - name: "{{ test_id | upper }} Display CVP result" + # Force task to run even if we used tags matching specific tests + tags: ["always"] + run_once: true + ansible.builtin.debug: + msg: '{{ cv_deploy_results }}' From fa78ee6ccc4ab942895b74cd9476d19d8f87f83d Mon Sep 17 00:00:00 2001 From: Alexey Gorbunov Date: Wed, 12 Feb 2025 15:45:56 -0800 Subject: [PATCH 3/5] Fix description case in cleanup tasks --- .../arista/avd/molecule/cv_deploy/cc_false.yml | 4 ++-- ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml | 4 ++-- .../arista/avd/molecule/cv_deploy/cv_deploy.yml | 4 ++-- .../arista/avd/molecule/cv_deploy/workspace_force_false.yml | 4 ++-- .../arista/avd/molecule/cv_deploy/workspace_force_true.yml | 4 ++-- .../arista/avd/molecule/cv_deploy/workspace_pending.yml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml index 2e6ec174858..0057eec9fdf 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml @@ -90,9 +90,9 @@ name: arista.avd.cv_deploy vars: cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_register_detailed_results: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml index 47d16df6b5f..32c7471e9fc 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml @@ -40,9 +40,9 @@ name: arista.avd.cv_deploy vars: cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_register_detailed_results: true cv_submit_workspace: true cv_submit_workspace_force: true diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml index 808f8187f7d..43cf62bdfd0 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml @@ -158,9 +158,9 @@ name: arista.avd.cv_deploy vars: cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_register_detailed_results: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml index b48a99b08c4..d3d0b8d17d4 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml @@ -118,9 +118,9 @@ name: arista.avd.cv_deploy vars: cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_register_detailed_results: true cv_devices: "{{ ansible_play_hosts_all }}" eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml index a6441e3423c..8417f340225 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml @@ -97,9 +97,9 @@ name: arista.avd.cv_deploy vars: cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_register_detailed_results: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml index e76d0c732ad..c6c2997bd35 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml @@ -105,9 +105,9 @@ name: arista.avd.cv_deploy vars: cv_workspace_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_workspace_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_workspace_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_change_control_name: "{{ cv_common_pattern }}_{{ r }}_cleanup" - cv_change_control_description: "{{ cv_common_pattern + '_' + r + '_cleanup' | upper }}" + cv_change_control_description: "{{ (cv_common_pattern + '_' + r + '_cleanup') | upper }}" cv_register_detailed_results: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" From eeeb862b6be0774504d12577a59cba58f87b3dc5 Mon Sep 17 00:00:00 2001 From: Alexey Gorbunov Date: Fri, 14 Feb 2025 14:52:34 -0800 Subject: [PATCH 4/5] Add feature to read cv_deploy execution ID from env --- ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml | 2 +- ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml | 2 +- ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml | 2 +- .../arista/avd/molecule/cv_deploy/workspace_force_false.yml | 2 +- .../arista/avd/molecule/cv_deploy/workspace_force_true.yml | 2 +- .../arista/avd/molecule/cv_deploy/workspace_pending.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml index 0057eec9fdf..39c869998f5 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml @@ -29,7 +29,7 @@ tags: ["{{ test_id }}"] run_once: true ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - name: "{{ test_id | upper }} Provision with cv_run_change_control = false" tags: ["{{ test_id }}"] diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml index 32c7471e9fc..47decb24a26 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml @@ -29,7 +29,7 @@ tags: ["always"] run_once: true ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - name: "{{ test_id | upper }} Cleanup" # Force task to run even if we used tags matching specific tests diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml index 43cf62bdfd0..f16a525fc83 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml @@ -29,7 +29,7 @@ tags: ["{{ test_id }}"] run_once: true ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - name: "{{ test_id | upper }} Provision CVP with AVD configuration" tags: ["{{ test_id }}"] diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml index d3d0b8d17d4..076916ffc25 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml @@ -28,7 +28,7 @@ - name: "{{ test_id | upper }} Generate random string" tags: ["{{ test_id }}"] ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" run_once: true - name: "{{ test_id | upper }} Dynamically add inactive device avd-ci-core1 to group INACTIVE" diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml index 8417f340225..04db081505d 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml @@ -29,7 +29,7 @@ tags: ["{{ test_id }}"] run_once: true ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - name: "{{ test_id | upper }} Dynamically add inactive device avd-ci-core1 to group INACTIVE" tags: ["{{ test_id }}"] diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml index c6c2997bd35..d84ef1e6a04 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_pending.yml @@ -29,7 +29,7 @@ tags: ["{{ test_id }}"] run_once: true ansible.builtin.set_fact: - r: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" + r: "{{ lookup('env', 'MOLECULE_EXECUTION_ID') or lookup('password', '/dev/null chars=ascii_lowercase,digits length=4') }}" - name: "{{ test_id | upper }} Provision with Workspace Pending" run_once: true From aee8c3492a497cad72c98735b67e5dcfd375d4e2 Mon Sep 17 00:00:00 2001 From: Alexey Gorbunov Date: Fri, 14 Feb 2025 16:25:02 -0800 Subject: [PATCH 5/5] Normalize cv_common_pattern for cv_deploy --- .../arista/avd/molecule/cv_deploy/cc_false.yml | 2 +- ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml | 4 ++-- .../arista/avd/molecule/cv_deploy/cv_deploy.yml | 2 +- .../arista/avd/molecule/cv_deploy/workspace_force_false.yml | 2 +- .../arista/avd/molecule/cv_deploy/workspace_force_true.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml index 39c869998f5..a488047c924 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cc_false.yml @@ -13,7 +13,7 @@ intended_tag_device: avd-ci-leaf1 intended_tags: "{{ lookup('file', structured_dir ~ '/' ~ intended_tag_device ~ '.yml')| from_yaml }}" test_id: "force-ws-true_run-cc-false" - cv_common_pattern: "avd-cv-deploy_{{ test_id }}" + cv_common_pattern: "avd_cv-deploy_{{ test_id }}" tasks: - name: "{{ test_id | upper }} Banner" diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml index 47decb24a26..b63e01712e6 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cleanup.yml @@ -10,8 +10,8 @@ cv_skip_missing_devices: true eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs" structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs" - test_id: "global-scenario-cleanup" - cv_common_pattern: "avd-cv-deploy_{{ test_id }}" + test_id: "scenario-cleanup" + cv_common_pattern: "avd_cv-deploy_{{ test_id }}" tasks: - name: "{{ test_id | upper }} Banner" diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml b/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml index f16a525fc83..d4c74c47e1d 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/cv_deploy.yml @@ -13,7 +13,7 @@ intended_tag_device: avd-ci-leaf1 intended_tags: "{{ lookup('file', structured_dir ~ '/' ~ intended_tag_device ~ '.yml')| from_yaml }}" test_id: "force-ws-true_run-cc-true" - cv_common_pattern: "avd-cv-deploy_{{ test_id }}" + cv_common_pattern: "avd_cv-deploy_{{ test_id }}" tasks: - name: "{{ test_id | upper }} Banner" diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml index 076916ffc25..eccf19a656c 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_false.yml @@ -13,7 +13,7 @@ intended_tag_device: avd-ci-leaf1 intended_tags: "{{ lookup('file', structured_dir ~ '/' ~ intended_tag_device ~ '.yml')| from_yaml }}" test_id: "inactive-device_force-ws-false" - cv_common_pattern: "avd-cv-deploy_{{ test_id }}" + cv_common_pattern: "avd_cv-deploy_{{ test_id }}" tasks: - name: "{{ test_id | upper }} Banner" diff --git a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml index 04db081505d..013af936f4c 100644 --- a/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml +++ b/ansible_collections/arista/avd/molecule/cv_deploy/workspace_force_true.yml @@ -13,7 +13,7 @@ intended_tag_device: avd-ci-leaf1 intended_tags: "{{ lookup('file', structured_dir ~ '/' ~ intended_tag_device ~ '.yml')| from_yaml }}" test_id: "inactive-device_force-ws-true" - cv_common_pattern: "avd-cv-deploy_{{ test_id }}" + cv_common_pattern: "avd_cv-deploy_{{ test_id }}" tasks: - name: "{{ test_id | upper }} Banner"