File tree Expand file tree Collapse file tree 4 files changed +54
-1
lines changed Expand file tree Collapse file tree 4 files changed +54
-1
lines changed Original file line number Diff line number Diff line change 29
29
- name : Attach the block volume
30
30
oracle.oci.oci_compute_volume_attachment :
31
31
instance_id : " {{ instance_id }}"
32
- type : paravirtualized
32
+ type : " {{ volume_type }} "
33
33
volume_id : " {{ volume_id }}"
34
34
compartment_id : " {{ my_compartment_id }}"
35
35
device : " /dev/oracleoci/oraclevd{{ block_devices[ansible_loop.index0] }}"
Original file line number Diff line number Diff line change 96
96
- h
97
97
- i
98
98
99
+ - name : Add block volume for ocfs2
100
+ when :
101
+ - " {{ item.value.add_ocfs_block_storage | default('false') | bool }}"
102
+ block :
103
+ - name : Create block volume
104
+ oracle.oci.oci_blockstorage_volume :
105
+ compartment_id : " {{ my_compartment_id }}"
106
+ availability_domain : " {{ my_availability_domain }}"
107
+ display_name : " bv-ocfs2"
108
+ size_in_gbs : " {{ block_volume_size_in_gbs }}"
109
+ key_by : [compartment_id, display_name]
110
+ register : result
111
+ retries : 10
112
+ delay : 30
113
+ until : result is not failed
114
+
115
+ - name : Set the block volume id
116
+ ansible.builtin.set_fact :
117
+ volume_id : " {{ result.volume.id }}"
118
+
119
+ - name : Attach the block volume
120
+ oracle.oci.oci_compute_volume_attachment :
121
+ instance_id : " {{ instance_id }}"
122
+ type : " {{ volume_type }}"
123
+ volume_id : " {{ volume_id }}"
124
+ compartment_id : " {{ my_compartment_id }}"
125
+ device : " /dev/oracleoci/oraclevdo"
126
+ display_name : " blockvolume-vdo"
127
+ is_read_only : false
128
+ is_shareable : true
129
+ key_by : [compartment_id, display_name]
130
+ retries : 10
131
+ delay : 30
132
+ until : result is not failed
133
+
134
+
99
135
- name : Print the public and private ip of the newly created instance
100
136
ansible.builtin.debug :
101
137
msg :
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ compute_instances:
3
3
instance_name : " ol-node-01"
4
4
type : " server"
5
5
boot_volume_size_in_gbs : 50
6
+ add_ocfs_block_storage : false
6
7
os : " Oracle Linux"
7
8
os_version : " 8"
8
9
instance_shape : " VM.Standard.E4.Flex"
@@ -17,6 +18,7 @@ debug_enabled: false
17
18
add_block_storage : false
18
19
block_volume_size_in_gbs : 50
19
20
block_count : 1
21
+ volume_type : " paravirtualized"
20
22
21
23
use_vnc : false
22
24
vnc_port : " 1"
@@ -47,6 +49,7 @@ use_nginx: false
47
49
use_nfs : false
48
50
use_quay_ha : false
49
51
use_pcp : false
52
+ use_ocfs2 : false
50
53
51
54
use_vbox : false
52
55
virtualbox_version : " 7.1"
Original file line number Diff line number Diff line change @@ -93,4 +93,18 @@ instance_ingress_security_rules:
93
93
destination_port_range:
94
94
max: 44321
95
95
min: 44321
96
+ {% endif %}
97
+ {% if use_ocfs 2 %}
98
+ - source: "10.0.0.0/24"
99
+ protocol: 6
100
+ tcp_options:
101
+ destination_port_range:
102
+ max: 7777
103
+ min: 7777
104
+ - source: "10.0.0.0/24"
105
+ protocol: 17
106
+ udp_options:
107
+ destination_port_range:
108
+ max: 7777
109
+ min: 7777
96
110
{% endif %}
You can’t perform that action at this time.
0 commit comments