|
168 | 168 | ansible.builtin.set_fact:
|
169 | 169 | my_service_gateway_id: "{{ result.service_gateway.id }}"
|
170 | 170 |
|
| 171 | + - name: Create route table for public subnet |
| 172 | + oracle.oci.oci_network_route_table: |
| 173 | + compartment_id: "{{ my_compartment_id }}" |
| 174 | + vcn_id: "{{ my_vcn_id }}" |
| 175 | + display_name: "Default Route Table for OLV-VCN" |
| 176 | + route_rules: |
| 177 | + - |
| 178 | + network_entity_id: "{{ my_internet_gateway_id }}" |
| 179 | + destination: "0.0.0.0/0" |
| 180 | + destination_type: CIDR_BLOCK |
| 181 | + state: 'present' |
| 182 | + register: result |
| 183 | + retries: 10 |
| 184 | + delay: 30 |
| 185 | + until: result is not failed |
| 186 | + |
| 187 | + - name: Set private subnet route table id |
| 188 | + ansible.builtin.set_fact: |
| 189 | + my_public_rt_id: "{{ result.route_table.id }}" |
| 190 | + |
171 | 191 | - name: Create route table for private subnet
|
172 | 192 | oracle.oci.oci_network_route_table:
|
173 | 193 | compartment_id: "{{ my_compartment_id }}"
|
|
222 | 242 |
|
223 | 243 | - name: Create security_list
|
224 | 244 | oracle.oci.oci_network_security_list:
|
225 |
| - display_name: "Security List for OLV-VCN" |
| 245 | + display_name: "Default Security List for OLV-VCN" |
226 | 246 | compartment_id: "{{ my_compartment_id }}"
|
227 | 247 | vcn_id: "{{ my_vcn_id }}"
|
228 | 248 | ingress_security_rules: "{{ loaded_ingress.instance_ingress_security_rules }}"
|
|
243 | 263 | cidr_block: "{{ subnet1_cidr_block }}"
|
244 | 264 | display_name: "Public Subnet-OLV-VCN"
|
245 | 265 | prohibit_public_ip_on_vnic: false
|
| 266 | + route_table_id: "{{ my_public_rt_id }}" |
| 267 | + security_list_ids: "{{ my_security_list_id }}" |
246 | 268 | dns_label: "pub"
|
247 | 269 | register: result
|
248 | 270 | retries: 10
|
|
0 commit comments