From d6e88c662eaad0d0eeaf6e6bc0e1ff702697ace8 Mon Sep 17 00:00:00 2001 From: przsus <101723670+przsus@users.noreply.github.com> Date: Thu, 28 Nov 2024 12:49:17 +0100 Subject: [PATCH] fail ux2.0 playbooks if vmanage version is lower than required --- .ansible-lint | 1 + galaxy.yml | 2 +- playbooks/aws/ux2_full_deploy_and_configure.yml | 15 ++++++++++++--- playbooks/azure/ux2_full_deploy_and_configure.yml | 11 +++++++++++ requirements.yml | 2 +- 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 527d251..d1201aa 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -50,6 +50,7 @@ mock_roles: - cisco.catalystwan.sync_pnp_edges - cisco.catalystwan.activate_edges - cisco.catalystwan.vmanage_mode + - cisco.catalystwan.vmanage_version - cisco.catalystwan.health_checks - cisco.catalystwan.config_groups - cisco.catalystwan.feature_profile_builder diff --git a/galaxy.yml b/galaxy.yml index f3a8aa9..e281905 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: cisco name: sdwan -version: 0.3.4 +version: 0.3.5 readme: README.md authors: - Arkadiusz Cichon diff --git a/playbooks/aws/ux2_full_deploy_and_configure.yml b/playbooks/aws/ux2_full_deploy_and_configure.yml index 478572c..55ce4f8 100644 --- a/playbooks/aws/ux2_full_deploy_and_configure.yml +++ b/playbooks/aws/ux2_full_deploy_and_configure.yml @@ -63,17 +63,26 @@ # Attach templates with running-config for all devices -- name: Set vmanage mode for all devices +- name: Set vmanage mode for controllers hosts: localhost gather_facts: false vars_files: - ./dev_config_aws.yml - "{{ results_path_controllers }}" - vars: - edge_instances: "{{ deployed_edge_instances }}" roles: - cisco.catalystwan.vmanage_mode +- name: Check if vManage version matches requirements + hosts: localhost + gather_facts: false + vars_files: + - ./dev_config_aws.yml + - "{{ results_path_controllers }}" + vars: + min_version_required: "20.13.1" + roles: + - cisco.catalystwan.vmanage_version + - name: Build feature profile data hosts: localhost gather_facts: false diff --git a/playbooks/azure/ux2_full_deploy_and_configure.yml b/playbooks/azure/ux2_full_deploy_and_configure.yml index b47b7fc..d577d98 100644 --- a/playbooks/azure/ux2_full_deploy_and_configure.yml +++ b/playbooks/azure/ux2_full_deploy_and_configure.yml @@ -80,6 +80,17 @@ roles: - cisco.catalystwan.feature_profile_builder +- name: Check if vManage version matches requirements + hosts: localhost + gather_facts: false + vars_files: + - ./azure_sdwan_config.yml + - "{{ results_path_controllers }}" + vars: + min_version_required: "20.13.1" + roles: + - cisco.catalystwan.vmanage_version + - name: Create Config Groups hosts: localhost gather_facts: false diff --git a/requirements.yml b/requirements.yml index e8f033b..08b6a67 100644 --- a/requirements.yml +++ b/requirements.yml @@ -4,6 +4,6 @@ collections: - name: azure.azcollection version: 1.19.0 - name: cisco.catalystwan - version: 0.3.1 + version: 0.3.2 - name: cisco.sdwan_deployment version: 0.3.3