Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions ol/block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
# See LICENSE.TXT for details.

- name: Add block volumes to the instance
when:
- add_block_storage
when: add_block_storage
block:
- name: Create block volume
oracle.oci.oci_blockstorage_volume:
Expand Down Expand Up @@ -40,3 +39,39 @@
retries: 10
delay: 30
until: result is not failed

- name: Add block volumes to the instance
when: item.value.add_bv | default('false') | bool
block:
- name: Create block volume
oracle.oci.oci_blockstorage_volume:
compartment_id: "{{ my_compartment_id }}"
availability_domain: "{{ my_availability_domain }}"
display_name: "blockvolume-vd{{ block_devices[ansible_loop.index0] }}"
size_in_gbs: "{{ block_volume_size_in_gbs }}"
key_by: [compartment_id, display_name]
register: result
vars:
timestamp: "{{ now().strftime('%Y%m%d-%H%M%S') }}"
retries: 10
delay: 30
until: result is not failed

- name: Set the block volume id
ansible.builtin.set_fact:
volume_id: "{{ result.volume.id }}"

- name: Attach the block volume
oracle.oci.oci_compute_volume_attachment:
instance_id: "{{ instance_id }}"
type: "{{ volume_type }}"
volume_id: "{{ volume_id }}"
compartment_id: "{{ my_compartment_id }}"
device: "/dev/oracleoci/oraclevd{{ block_devices[ansible_loop.index0] }}"
display_name: "blockvolume-vd{{ block_devices[ansible_loop.index0] }}"
is_read_only: false
is_shareable: false
key_by: [compartment_id, display_name]
retries: 10
delay: 30
until: result is not failed
1 change: 1 addition & 0 deletions ol/default_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ use_nfs: false
use_quay_ha: false
use_pcp: false
use_ocfs2: false
use_iscsi: false

use_vbox: false
virtualbox_version: "7.1"
Expand Down
2 changes: 2 additions & 0 deletions ol/templates/ingress_security_rules.j2
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ instance_ingress_security_rules:
destination_port_range:
max: 7777
min: 7777
{% endif %}
{% if use_iscsi %}
- source: "10.0.0.0/24"
protocol: 6
tcp_options:
Expand Down