Skip to content

Commit

Permalink
Initialize shared dict vars
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewiebe committed Dec 22, 2024
1 parent e7ee3ff commit 7c31491
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
32 changes: 32 additions & 0 deletions roles/dtc/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,38 @@

---

# --------------------------------------------------------------------
# Initialize NameSpace Dicts For Variable Sharing
# --------------------------------------------------------------------
- name: Initialize NameSpace Dict For Sharing Variables
ansible.builtin.set_fact:
vars_common_vxlan:
changes_detected_fabric: false
changes_detected_fabric_links: false
changes_detected_interface_access_po: false
changes_detected_interface_access: false
changes_detected_interfaces: false
changes_detected_interface_loopback: false
changes_detected_interface_po_routed: false
changes_detected_interface_routed: false
changes_detected_interface_trunk_po: false
changes_detected_interface_trunk: false
changes_detected_interface_vpc: false
changes_detected_inventory: false
changes_detected_link_vpc_peering: false
changes_detected_networks: false
changes_detected_policy: false
changes_detected_sub_interface_routed: false
changes_detected_vpc_peering: false
changes_detected_vrfs: false
vars_common_isn:
changes_detected_fabric: false
changes_detected_inventory: false
vars_common_msd:
changes_detected_fabric: false
changes_detected_vrfs: false
changes_detected_networks: false

- name: Import Role Tasks for VXLAN Fabric
ansible.builtin.import_tasks: sub_main_vxlan.yml
tags: "{{ nac_tags.common_role }}" # Tags defined in roles/common_global/vars/main.yml
Expand Down
1 change: 1 addition & 0 deletions roles/dtc/common/tasks/sub_main_vxlan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
changes_detected_interface_trunk_po: "{{ changes_detected_interface_trunk_po }}"
changes_detected_interface_trunk: "{{ changes_detected_interface_trunk }}"
changes_detected_interface_vpc: "{{ changes_detected_interface_vpc }}"
changes_detected_inventory: "{{ changes_detected_inventory }}"
changes_detected_link_vpc_peering: "{{ changes_detected_link_vpc_peering }}"
changes_detected_networks: "{{ changes_detected_networks }}"
changes_detected_policy: "{{ changes_detected_policy }}"
Expand Down
14 changes: 7 additions & 7 deletions roles/dtc/create/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
(vars_common_msd.changes_detected_networks)
# Check with Matt and Pete on External Fabrics
- name: Import Role Tasks External Fabric
ansible.builtin.import_tasks: sub_main_external.yml
when: >
(MD_Extended.vxlan.global.fabric_type == 'External') and
(changes_detected_inventory) or
(changes_detected_interfaces) or
(changes_detected_policy)
# - name: Import Role Tasks External Fabric
# ansible.builtin.import_tasks: sub_main_external.yml
# when: >
# (MD_Extended.vxlan.global.fabric_type == 'External') and
# (changes_detected_inventory) or
# (changes_detected_interfaces) or
# (changes_detected_policy)

- name: Mark Stage Role Create Completed
cisco.nac_dc_vxlan.common.run_map:
Expand Down

0 comments on commit 7c31491

Please sign in to comment.