File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ The `aws_edges` role is an essential component of the `cisco.sdwan_deployment` c
4545- ` results_dir ` : Directory where deployment results will be stored.
4646- ` aws_deployed_edges_data ` : File to store data of deployed edge devices.
4747- ` userdata_cedge_path ` : Path to the user data configuration for cEdge devices.
48+ - ` wan_edges ` : Optional list of edge devices that will be deployed. By default all missing devices are deployed.
4849
4950### Required variables
5051
Original file line number Diff line number Diff line change 1+ # Copyright 2024 Cisco Systems, Inc. and its affiliates
2+ # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
3+
4+ ---
5+
6+ - name : Allow traffic outside VPC for cEdge IP addresses
7+ amazon.aws.ec2_security_group :
8+ name : " {{ aws_discovered_security_group.group_name }}"
9+ description : " Security Group for SD-WAN instances"
10+ vpc_id : " {{ aws_vpc_config.id }}"
11+ region : " {{ aws_region }}"
12+ purge_rules : false
13+ purge_tags : false
14+ purge_rules_egress : false
15+ rules :
16+ - proto : all # proto all means: `ports: all`
17+ cidr_ip : " {{ instance_item['mgmt_public_ip'] }}/32"
18+ rule_desc : " {{ instance_item['hostname'] }} - mgmt (VPN 512)"
19+ - proto : all
20+ cidr_ip : " {{ instance_item['transport_public_ip'] }}/32"
21+ rule_desc : " {{ instance_item['hostname'] }} - transport (VPN 0)"
22+ rules_egress : []
23+ register : allow_traffic
24+ retries : 3
25+ delay : 3
26+ until : allow_traffic is succeeded
Original file line number Diff line number Diff line change 6666 loop : " {{ edge_instances }}"
6767 loop_control :
6868 loop_var : instance_item
69- when : edge_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname])
69+ when :
70+ - edge_instances is defined
71+ - instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]
72+ - >
73+ wan_edges is not defined
74+ or wan_edges | json_query('[?uuid==`'~instance_item['uuid']~'`] | [?!contains(keys(@), `foreign`) || !foreign]')
75+
76+ - name : Add NSG rules for foreign Edges
77+ ansible.builtin.include_tasks : aws_cedge_nsg.yml
78+ loop : " {{ wan_edges }}"
79+ loop_control :
80+ loop_var : instance_item
81+ when :
82+ - wan_edges is defined
83+ - instance_item['mgmt_public_ip'] is defined
84+ - instance_item['transport_public_ip'] is defined
7085
7186- name : Extract deployment facts
7287 ansible.builtin.include_role :
You can’t perform that action at this time.
0 commit comments