File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ exclude_paths:
2121 - playbooks/template_cloudinit_config.yml
2222 - playbooks/specific_edges_to_teardown.yml
2323 - roles/aws_teardown/tasks/main.yml
24+ - .ansible
2425# parseable: true
2526# quiet: true
2627# strict: true
Original file line number Diff line number Diff line change 3838
3939- name : Set aws_network_interfaces fact with a list of interfaces for cEdge device
4040 ansible.builtin.set_fact :
41- aws_network_interfaces : " {{ network_interfaces_cedge.results | map(attribute='interface') | list }}"
41+ aws_network_interfaces : " {{ network_interfaces_cedge.results | selectattr('interface', 'defined') | map(attribute='interface') | list }}"
4242
4343- name : Filter aws_network_interfaces for instance creation. Set aws_mgmt_nic and aws_transport_nic facts
4444 ansible.builtin.set_fact :
Original file line number Diff line number Diff line change 107107 - cluster_subnet is defined
108108 - cluster_subnet != ""
109109
110+ - name : " Get info about NSG: {{ az_network_security_group }}"
111+ azure.azcollection.azure_rm_securitygroup_info :
112+ resource_group : " {{ az_resource_group }}"
113+ name : " {{ az_network_security_group }}"
114+ register : az_res_gr
115+ when :
116+ - cluster_subnet is defined
117+ - cluster_subnet != ""
118+
119+ - name : " Extend Network Security Group for cluster deployment. NSG: {{ az_network_security_group }}"
120+ azure.azcollection.azure_rm_securitygroup :
121+ resource_group : " {{ az_resource_group }}"
122+ name : " {{ az_network_security_group }}"
123+ rules :
124+ - name : " {{ cluster_vmanage_nic.state.name }}"
125+ protocol : " *"
126+ destination_port_range : " *"
127+ source_port_range : " *"
128+ source_address_prefix : " {{ cluster_vmanage_nic.state.ip_configuration.private_ip_address }}"
129+ access : Allow
130+ priority : " {{ 2500 + ((az_res_gr.securitygroups | first).rules | length) + 1 }}"
131+ direction : Inbound
132+ tags :
133+ Name : " {{ az_network_security_group }}"
134+ Creator : " {{ az_tag_creator }}"
135+ Organization : " {{ organization_name }}"
136+ when :
137+ - cluster_subnet is defined
138+ - cluster_subnet != ""
139+
110140- name : Set az_network_interfaces_vmanage fact with a list of interfaces for vmanage
111141 ansible.builtin.set_fact :
112142 az_network_interfaces_vmanage : " {{ (vmanage_nics.results + [cluster_vmanage_nic]) | selectattr('state', 'defined') | map(attribute='state') | list }}"
You can’t perform that action at this time.
0 commit comments