|
27 | 27 |
|
28 | 28 | - name: Delete the instances
|
29 | 29 | oracle.oci.oci_compute_instance:
|
| 30 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 31 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
30 | 32 | id: "{{ item.value }}"
|
31 | 33 | state: absent
|
32 | 34 | loop: "{{ ocid_state | dict2items | selectattr('key', 'match', '^instance.*') }}"
|
33 | 35 |
|
34 | 36 | - name: Delete the storage volumes
|
35 | 37 | oracle.oci.oci_blockstorage_volume:
|
| 38 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 39 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
36 | 40 | volume_id: "{{ item.value }}"
|
37 | 41 | state: absent
|
38 | 42 | loop: "{{ ocid_state | dict2items | selectattr('key', 'match', '^amd-storage.*') }}"
|
39 | 43 |
|
40 | 44 | - name: Delete the vlan
|
41 | 45 | oracle.oci.oci_network_vlan:
|
| 46 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 47 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
42 | 48 | vlan_id: "{{ ocid_state.vlan_ocid }}"
|
43 | 49 | state: absent
|
44 | 50 | when: ocid_state.vlan_ocid is defined and ocid_state.vlan_ocid != ''
|
45 | 51 |
|
46 | 52 | - name: Delete network_security_group
|
47 | 53 | oracle.oci.oci_network_security_group:
|
| 54 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 55 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
48 | 56 | network_security_group_id: "{{ ocid_state.l2_nsg_ocid }}"
|
49 | 57 | state: absent
|
50 | 58 | when: ocid_state.l2_nsg_ocid is defined and ocid_state.l2_nsg_ocid != ''
|
51 | 59 |
|
52 | 60 | - name: Delete the subnet2
|
53 | 61 | oracle.oci.oci_network_subnet:
|
| 62 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 63 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
54 | 64 | id: "{{ ocid_state.private_subnet_ocid }}"
|
55 | 65 | state: absent
|
56 | 66 | when: ocid_state.private_subnet_ocid is defined and ocid_state.private_subnet_ocid != ''
|
57 | 67 |
|
58 | 68 | - name: Delete the subnet1
|
59 | 69 | oracle.oci.oci_network_subnet:
|
| 70 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 71 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
60 | 72 | id: "{{ ocid_state.public_subnet_ocid }}"
|
61 | 73 | state: absent
|
62 | 74 | when: ocid_state.public_subnet_ocid is defined and ocid_state.public_subnet_ocid != ''
|
63 | 75 |
|
64 | 76 | - name: Delete the security list
|
65 | 77 | oracle.oci.oci_network_security_list:
|
| 78 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 79 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
66 | 80 | id: "{{ ocid_state.security_list_ocid }}"
|
67 | 81 | state: absent
|
68 | 82 | when: ocid_state.security_list_ocid is defined and ocid_state.security_list_ocid != ''
|
69 | 83 |
|
70 | 84 | - name: Delete the private route table
|
71 | 85 | oracle.oci.oci_network_route_table:
|
| 86 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 87 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
72 | 88 | id: "{{ ocid_state.private_route_table_ocid }}"
|
73 | 89 | state: absent
|
74 | 90 | when: ocid_state.private_route_table_ocid is defined and ocid_state.private_route_table_ocid != ''
|
75 | 91 |
|
76 | 92 | - name: Delete the public route table
|
77 | 93 | oracle.oci.oci_network_route_table:
|
| 94 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 95 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
78 | 96 | id: "{{ ocid_state.public_route_table_ocid }}"
|
79 | 97 | state: absent
|
80 | 98 | when: ocid_state.public_route_table_ocid is defined and ocid_state.public_route_table_ocid != ''
|
81 | 99 |
|
82 | 100 | - name: Delete the Service Gateway
|
83 | 101 | oracle.oci.oci_network_service_gateway:
|
| 102 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 103 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
84 | 104 | id: "{{ ocid_state.service_gateway_ocid }}"
|
85 | 105 | state: absent
|
86 | 106 | when: ocid_state.service_gateway_ocid is defined and ocid_state.service_gateway_ocid != ''
|
87 | 107 |
|
88 | 108 | - name: Delete the Internet Gateway
|
89 | 109 | oracle.oci.oci_network_internet_gateway:
|
| 110 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 111 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
90 | 112 | id: "{{ ocid_state.internet_gateway_ocid }}"
|
91 | 113 | state: absent
|
92 | 114 | when: ocid_state.internet_gateway_ocid is defined and ocid_state.internet_gateway_ocid != ''
|
93 | 115 |
|
94 | 116 | - name: Delete the VCN
|
95 | 117 | oracle.oci.oci_network_vcn:
|
| 118 | + config_file_location: "{{ oci_config_file | default(omit) }}" |
| 119 | + config_profile_name: "{{ oci_config_section | default(omit) }}" |
96 | 120 | vcn_id: "{{ ocid_state.vcn_ocid }}"
|
97 | 121 | state: absent
|
98 | 122 | when: ocid_state.vcn_ocid is defined and ocid_state.vcn_ocid != ''
|
|
0 commit comments