Skip to content

Commit 45cb6c7

Browse files
committed
add oci config and profile to terminate playbook
1 parent aff0feb commit 45cb6c7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

olvm/terminate_instance.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,72 +27,96 @@
2727

2828
- name: Delete the instances
2929
oracle.oci.oci_compute_instance:
30+
config_file_location: "{{ oci_config_file | default(omit) }}"
31+
config_profile_name: "{{ oci_config_section | default(omit) }}"
3032
id: "{{ item.value }}"
3133
state: absent
3234
loop: "{{ ocid_state | dict2items | selectattr('key', 'match', '^instance.*') }}"
3335

3436
- name: Delete the storage volumes
3537
oracle.oci.oci_blockstorage_volume:
38+
config_file_location: "{{ oci_config_file | default(omit) }}"
39+
config_profile_name: "{{ oci_config_section | default(omit) }}"
3640
volume_id: "{{ item.value }}"
3741
state: absent
3842
loop: "{{ ocid_state | dict2items | selectattr('key', 'match', '^amd-storage.*') }}"
3943

4044
- name: Delete the vlan
4145
oracle.oci.oci_network_vlan:
46+
config_file_location: "{{ oci_config_file | default(omit) }}"
47+
config_profile_name: "{{ oci_config_section | default(omit) }}"
4248
vlan_id: "{{ ocid_state.vlan_ocid }}"
4349
state: absent
4450
when: ocid_state.vlan_ocid is defined and ocid_state.vlan_ocid != ''
4551

4652
- name: Delete network_security_group
4753
oracle.oci.oci_network_security_group:
54+
config_file_location: "{{ oci_config_file | default(omit) }}"
55+
config_profile_name: "{{ oci_config_section | default(omit) }}"
4856
network_security_group_id: "{{ ocid_state.l2_nsg_ocid }}"
4957
state: absent
5058
when: ocid_state.l2_nsg_ocid is defined and ocid_state.l2_nsg_ocid != ''
5159

5260
- name: Delete the subnet2
5361
oracle.oci.oci_network_subnet:
62+
config_file_location: "{{ oci_config_file | default(omit) }}"
63+
config_profile_name: "{{ oci_config_section | default(omit) }}"
5464
id: "{{ ocid_state.private_subnet_ocid }}"
5565
state: absent
5666
when: ocid_state.private_subnet_ocid is defined and ocid_state.private_subnet_ocid != ''
5767

5868
- name: Delete the subnet1
5969
oracle.oci.oci_network_subnet:
70+
config_file_location: "{{ oci_config_file | default(omit) }}"
71+
config_profile_name: "{{ oci_config_section | default(omit) }}"
6072
id: "{{ ocid_state.public_subnet_ocid }}"
6173
state: absent
6274
when: ocid_state.public_subnet_ocid is defined and ocid_state.public_subnet_ocid != ''
6375

6476
- name: Delete the security list
6577
oracle.oci.oci_network_security_list:
78+
config_file_location: "{{ oci_config_file | default(omit) }}"
79+
config_profile_name: "{{ oci_config_section | default(omit) }}"
6680
id: "{{ ocid_state.security_list_ocid }}"
6781
state: absent
6882
when: ocid_state.security_list_ocid is defined and ocid_state.security_list_ocid != ''
6983

7084
- name: Delete the private route table
7185
oracle.oci.oci_network_route_table:
86+
config_file_location: "{{ oci_config_file | default(omit) }}"
87+
config_profile_name: "{{ oci_config_section | default(omit) }}"
7288
id: "{{ ocid_state.private_route_table_ocid }}"
7389
state: absent
7490
when: ocid_state.private_route_table_ocid is defined and ocid_state.private_route_table_ocid != ''
7591

7692
- name: Delete the public route table
7793
oracle.oci.oci_network_route_table:
94+
config_file_location: "{{ oci_config_file | default(omit) }}"
95+
config_profile_name: "{{ oci_config_section | default(omit) }}"
7896
id: "{{ ocid_state.public_route_table_ocid }}"
7997
state: absent
8098
when: ocid_state.public_route_table_ocid is defined and ocid_state.public_route_table_ocid != ''
8199

82100
- name: Delete the Service Gateway
83101
oracle.oci.oci_network_service_gateway:
102+
config_file_location: "{{ oci_config_file | default(omit) }}"
103+
config_profile_name: "{{ oci_config_section | default(omit) }}"
84104
id: "{{ ocid_state.service_gateway_ocid }}"
85105
state: absent
86106
when: ocid_state.service_gateway_ocid is defined and ocid_state.service_gateway_ocid != ''
87107

88108
- name: Delete the Internet Gateway
89109
oracle.oci.oci_network_internet_gateway:
110+
config_file_location: "{{ oci_config_file | default(omit) }}"
111+
config_profile_name: "{{ oci_config_section | default(omit) }}"
90112
id: "{{ ocid_state.internet_gateway_ocid }}"
91113
state: absent
92114
when: ocid_state.internet_gateway_ocid is defined and ocid_state.internet_gateway_ocid != ''
93115

94116
- name: Delete the VCN
95117
oracle.oci.oci_network_vcn:
118+
config_file_location: "{{ oci_config_file | default(omit) }}"
119+
config_profile_name: "{{ oci_config_section | default(omit) }}"
96120
vcn_id: "{{ ocid_state.vcn_ocid }}"
97121
state: absent
98122
when: ocid_state.vcn_ocid is defined and ocid_state.vcn_ocid != ''

0 commit comments

Comments
 (0)