From ea6da5383ccfa422ef19234880a37c3acb5f5e67 Mon Sep 17 00:00:00 2001 From: przsus <101723670+przsus@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:07:07 +0100 Subject: [PATCH 1/2] AWS: add playbook for cedge adoption --- .ansible-lint | 2 ++ galaxy.yml | 2 +- playbooks/aws/ux2_cedge_adoption.yml | 42 ++++++++++++++++++++++++++++ requirements.yml | 4 +-- 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 playbooks/aws/ux2_cedge_adoption.yml diff --git a/.ansible-lint b/.ansible-lint index d1201aa..18db965 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -34,6 +34,7 @@ mock_modules: # - fake_namespace.fake_collection.fake_module # - fake_namespace.fake_collection.fake_module.fake_submodule mock_roles: + - cisco.sdwan_deployment.aws_device_params - cisco.sdwan_deployment.aws_network_infrastructure - cisco.sdwan_deployment.aws_teardown - cisco.sdwan_deployment.aws_controllers @@ -42,6 +43,7 @@ mock_roles: - cisco.sdwan_deployment.azure_teardown - cisco.sdwan_deployment.azure_controllers - cisco.sdwan_deployment.azure_edges + - cisco.catalystwan.edge_params - cisco.catalystwan.software_upgrades_remote - cisco.catalystwan.api_ready - cisco.catalystwan.administration_settings diff --git a/galaxy.yml b/galaxy.yml index b8d2974..5dadba1 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: cisco name: sdwan -version: 0.3.5 +version: 0.3.6 readme: README.md authors: - Arkadiusz Cichon diff --git a/playbooks/aws/ux2_cedge_adoption.yml b/playbooks/aws/ux2_cedge_adoption.yml new file mode 100644 index 0000000..64e2ae0 --- /dev/null +++ b/playbooks/aws/ux2_cedge_adoption.yml @@ -0,0 +1,42 @@ +# Copyright 2024 Cisco Systems, Inc. and its affiliates +# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) + +- name: Read deployed cEdge parameters + hosts: localhost + gather_facts: false + vars: + - aws_tag_creator: "{{ organization_name }}" + vars_files: + - aws_sdwan_config.yml + roles: + - cisco.sdwan_deployment.aws_device_params + - cisco.catalystwan.edge_params + +- name: Extract deployment facts + hosts: localhost + gather_facts: false + vars_files: + - aws_sdwan_config.yml + tasks: + - name: Generate deployment facts file for cEdges + ansible.builtin.include_role: + name: cisco.sdwan_deployment.common + tasks_from: generate_deployment_facts_edges.yml + +- name: Build feature profile data + hosts: localhost + gather_facts: false + vars_files: + - ./feature_profile_config.yml + roles: + - cisco.catalystwan.feature_profile_builder + +- name: Create Config Groups + hosts: localhost + gather_facts: false + vars_files: + - aws_sdwan_config.yml + - "{{ playbook_dir }}/results/generated_feature_profiles.yml" + - "{{ results_path_edges }}" + roles: + - cisco.catalystwan.config_groups diff --git a/requirements.yml b/requirements.yml index 08b6a67..ab3f72f 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.2 - - name: cisco.sdwan_deployment version: 0.3.3 + - name: cisco.sdwan_deployment + version: 0.3.4 From 517e266deea8435860e438ac040cded1f6db18bd Mon Sep 17 00:00:00 2001 From: przsus <101723670+przsus@users.noreply.github.com> Date: Fri, 13 Dec 2024 08:42:01 +0100 Subject: [PATCH 2/2] Azure: add playbook for cedge adoption --- .ansible-lint | 1 + playbooks/aws/ux2_cedge_adoption.yml | 2 +- playbooks/azure/ux2_cedge_adoption.yml | 43 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 playbooks/azure/ux2_cedge_adoption.yml diff --git a/.ansible-lint b/.ansible-lint index 18db965..468c93a 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -39,6 +39,7 @@ mock_roles: - cisco.sdwan_deployment.aws_teardown - cisco.sdwan_deployment.aws_controllers - cisco.sdwan_deployment.aws_edges + - cisco.sdwan_deployment.azure_device_params - cisco.sdwan_deployment.azure_network_infrastructure - cisco.sdwan_deployment.azure_teardown - cisco.sdwan_deployment.azure_controllers diff --git a/playbooks/aws/ux2_cedge_adoption.yml b/playbooks/aws/ux2_cedge_adoption.yml index 64e2ae0..3f9547e 100644 --- a/playbooks/aws/ux2_cedge_adoption.yml +++ b/playbooks/aws/ux2_cedge_adoption.yml @@ -5,7 +5,7 @@ hosts: localhost gather_facts: false vars: - - aws_tag_creator: "{{ organization_name }}" + aws_tag_creator: "{{ organization_name }}" vars_files: - aws_sdwan_config.yml roles: diff --git a/playbooks/azure/ux2_cedge_adoption.yml b/playbooks/azure/ux2_cedge_adoption.yml new file mode 100644 index 0000000..bc5848a --- /dev/null +++ b/playbooks/azure/ux2_cedge_adoption.yml @@ -0,0 +1,43 @@ +# Copyright 2024 Cisco Systems, Inc. and its affiliates +# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) + +- name: Read deployed cEdge parameters + hosts: localhost + gather_facts: false + vars: + az_tag_creator: "{{ organization_name }}" + az_resource_group: "{{ az_resources_prefix }}-rg" + vars_files: + - azure_sdwan_config.yml + roles: + - cisco.sdwan_deployment.azure_device_params + - cisco.catalystwan.edge_params + +- name: Extract deployment facts + hosts: localhost + gather_facts: false + vars_files: + - azure_sdwan_config.yml + tasks: + - name: Generate deployment facts file for cEdges + ansible.builtin.include_role: + name: cisco.sdwan_deployment.common + tasks_from: generate_deployment_facts_edges.yml + +- name: Build feature profile data + hosts: localhost + gather_facts: false + vars_files: + - feature_profile_config.yml + roles: + - cisco.catalystwan.feature_profile_builder + +- name: Create Config Groups + hosts: localhost + gather_facts: false + vars_files: + - azure_sdwan_config.yml + - "{{ playbook_dir }}/results/generated_feature_profiles.yml" + - "{{ results_path_edges }}" + roles: + - cisco.catalystwan.config_groups