Skip to content

Commit c22ece4

Browse files
committed
add config file and profile to each oci sdk play
1 parent 0a21eb9 commit c22ece4

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

olvm/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
- name: Launch an instance
88
oracle.oci.oci_compute_instance:
9+
config_file_location: "{{ oci_config_file | default(omit) }}"
10+
config_profile_name: "{{ oci_config_section | default(omit) }}"
911
availability_domain: "{{ my_availability_domain }}"
1012
compartment_id: "{{ my_compartment_id }}"
1113
name: "{{ item.value.instance_name | default('instance-'~timestamp) }}"
@@ -88,6 +90,8 @@
8890
block:
8991
- name: Create subnet2 vnic_attachment
9092
oracle.oci.oci_compute_vnic_attachment:
93+
config_file_location: "{{ oci_config_file | default(omit) }}"
94+
config_profile_name: "{{ oci_config_section | default(omit) }}"
9195
compartment_id: "{{ my_compartment_id }}"
9296
create_vnic_details:
9397
assign_public_ip: false
@@ -113,6 +117,8 @@
113117
block:
114118
- name: Create subnet2 vnic_attachment
115119
oracle.oci.oci_compute_vnic_attachment:
120+
config_file_location: "{{ oci_config_file | default(omit) }}"
121+
config_profile_name: "{{ oci_config_section | default(omit) }}"
116122
compartment_id: "{{ my_compartment_id }}"
117123
create_vnic_details:
118124
assign_public_ip: false
@@ -138,6 +144,8 @@
138144
block:
139145
- name: Create vlan vnic_attachment
140146
oracle.oci.oci_compute_vnic_attachment:
147+
config_file_location: "{{ oci_config_file | default(omit) }}"
148+
config_profile_name: "{{ oci_config_section | default(omit) }}"
141149
compartment_id: "{{ my_compartment_id }}"
142150
create_vnic_details:
143151
assign_public_ip: false

olvm/create_block_storage.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
- name: Create block volume for vm storage
88
oracle.oci.oci_blockstorage_volume:
9+
config_file_location: "{{ oci_config_file | default(omit) }}"
10+
config_profile_name: "{{ oci_config_section | default(omit) }}"
911
compartment_id: "{{ my_compartment_id }}"
1012
availability_domain: "{{ my_availability_domain }}"
1113
display_name: "{{ storage_name }}"
@@ -28,6 +30,8 @@
2830

2931
- name: Attach shared block volume for vm storage
3032
oracle.oci.oci_compute_volume_attachment:
33+
config_file_location: "{{ oci_config_file | default(omit) }}"
34+
config_profile_name: "{{ oci_config_section | default(omit) }}"
3135
instance_id: "{{ my_instance_id }}"
3236
type: paravirtualized
3337
volume_id: "{{ volume_id }}"

olvm/create_instance.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
- name: Get list availbility domains
5656
oracle.oci.oci_identity_availability_domain_facts:
57-
config_file_location: "{{ coi_config_file | default(omit) }}"
57+
config_file_location: "{{ oci_config_file | default(omit) }}"
5858
config_profile_name: "{{ oci_config_section | default(omit) }}"
5959
compartment_id: "{{ my_tenancy_id }}"
6060
region: "{{ my_region_id }}"
@@ -118,6 +118,8 @@
118118

119119
- name: Create a virtual cloud network
120120
oracle.oci.oci_network_vcn:
121+
config_file_location: "{{ oci_config_file | default(omit) }}"
122+
config_profile_name: "{{ oci_config_section | default(omit) }}"
121123
compartment_id: "{{ my_compartment_id }}"
122124
display_name: "OLV-VCN"
123125
cidr_blocks: "10.0.0.0/16"
@@ -139,6 +141,8 @@
139141

140142
- name: Create internet gateway
141143
oracle.oci.oci_network_internet_gateway:
144+
config_file_location: "{{ oci_config_file | default(omit) }}"
145+
config_profile_name: "{{ oci_config_section | default(omit) }}"
142146
compartment_id: "{{ my_compartment_id }}"
143147
vcn_id: "{{ my_vcn_id }}"
144148
is_enabled: true
@@ -161,6 +165,8 @@
161165

162166
- name: Get list of services
163167
oracle.oci.oci_network_service_facts:
168+
config_file_location: "{{ oci_config_file | default(omit) }}"
169+
config_profile_name: "{{ oci_config_section | default(omit) }}"
164170
register: result
165171
retries: 10
166172
delay: 30
@@ -187,6 +193,8 @@
187193

188194
- name: Create service gateway
189195
oracle.oci.oci_network_service_gateway:
196+
config_file_location: "{{ oci_config_file | default(omit) }}"
197+
config_profile_name: "{{ oci_config_section | default(omit) }}"
190198
compartment_id: "{{ my_compartment_id }}"
191199
services:
192200
- service_id: "{{ my_service_id }}"
@@ -210,6 +218,8 @@
210218

211219
- name: Create route table for public subnet
212220
oracle.oci.oci_network_route_table:
221+
config_file_location: "{{ oci_config_file | default(omit) }}"
222+
config_profile_name: "{{ oci_config_section | default(omit) }}"
213223
compartment_id: "{{ my_compartment_id }}"
214224
vcn_id: "{{ my_vcn_id }}"
215225
display_name: "Default Route Table for OLV-VCN"
@@ -236,6 +246,8 @@
236246

237247
- name: Create route table for private subnet
238248
oracle.oci.oci_network_route_table:
249+
config_file_location: "{{ oci_config_file | default(omit) }}"
250+
config_profile_name: "{{ oci_config_section | default(omit) }}"
239251
compartment_id: "{{ my_compartment_id }}"
240252
vcn_id: "{{ my_vcn_id }}"
241253
display_name: "Route Table for Private Subnet-OLV-VCN"
@@ -294,6 +306,8 @@
294306

295307
- name: Create security_list
296308
oracle.oci.oci_network_security_list:
309+
config_file_location: "{{ oci_config_file | default(omit) }}"
310+
config_profile_name: "{{ oci_config_section | default(omit) }}"
297311
display_name: "Default Security List for OLV-VCN"
298312
compartment_id: "{{ my_compartment_id }}"
299313
vcn_id: "{{ my_vcn_id }}"
@@ -316,6 +330,8 @@
316330

317331
- name: Create public subnet
318332
oracle.oci.oci_network_subnet:
333+
config_file_location: "{{ oci_config_file | default(omit) }}"
334+
config_profile_name: "{{ oci_config_section | default(omit) }}"
319335
compartment_id: "{{ my_compartment_id }}"
320336
vcn_id: "{{ my_vcn_id }}"
321337
cidr_block: "{{ subnet1_cidr_block }}"
@@ -345,6 +361,8 @@
345361

346362
- name: Create private subnet
347363
oracle.oci.oci_network_subnet:
364+
config_file_location: "{{ oci_config_file | default(omit) }}"
365+
config_profile_name: "{{ oci_config_section | default(omit) }}"
348366
compartment_id: "{{ my_compartment_id }}"
349367
vcn_id: "{{ my_vcn_id }}"
350368
cidr_block: "{{ subnet2_cidr_block }}"
@@ -383,6 +401,8 @@
383401

384402
- name: Get image
385403
oracle.oci.oci_compute_image_facts:
404+
config_file_location: "{{ oci_config_file | default(omit) }}"
405+
config_profile_name: "{{ oci_config_section | default(omit) }}"
386406
compartment_id: "{{ my_compartment_id }}"
387407
operating_system: "{{ os }}"
388408
operating_system_version: "{{ os_version }}"

olvm/create_vlan.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
- name: Create network_security_group
88
oracle.oci.oci_network_security_group:
9+
config_file_location: "{{ oci_config_file | default(omit) }}"
10+
config_profile_name: "{{ oci_config_section | default(omit) }}"
911
compartment_id: "{{ my_compartment_id }}"
1012
vcn_id: "{{ my_vcn_id }}"
1113
display_name: "L2 Network"
@@ -26,6 +28,8 @@
2628

2729
- name: Perform action add on network_security_group_security_rule
2830
oracle.oci.oci_network_security_group_security_rule_actions:
31+
config_file_location: "{{ oci_config_file | default(omit) }}"
32+
config_profile_name: "{{ oci_config_section | default(omit) }}"
2933
network_security_group_id: "{{ my_l2_vlan_nsg_id }}"
3034
action: add
3135
security_rules:
@@ -46,6 +50,8 @@
4650

4751
- name: Create a vlan
4852
oracle.oci.oci_network_vlan:
53+
config_file_location: "{{ oci_config_file | default(omit) }}"
54+
config_profile_name: "{{ oci_config_section | default(omit) }}"
4955
cidr_block: "{{ vlan_cidr_block }}"
5056
compartment_id: "{{ my_compartment_id }}"
5157
display_name: "VLAN-VMs"

0 commit comments

Comments
 (0)