Skip to content

Commit b0c1cfb

Browse files
author
William Graef
committed
add boot vol size instance var
1 parent 2ea88c4 commit b0c1cfb

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

ocne2/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
source_details:
1313
image_id: "{{ ol_image_id }}"
1414
source_type: image
15-
boot_volume_size_in_gbs: 128
15+
boot_volume_size_in_gbs: "{{ item.value.boot_volume_size_in_gbs | default(50) | int }}"
1616
shape: "{{ instance_shape }}"
1717
shape_config:
1818
ocpus: "{{ instance_ocpus }}"

ocne2/create_instance.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,11 @@
292292
- debug_enabled
293293
- inventory_hostname == ansible_play_hosts_all[0]
294294

295+
- name: Grow the root filesystem
296+
ansible.builtin.shell: |
297+
/usr/libexec/oci-growfs -y
298+
when: (boot_volume_size_in_gbs is defined) and (boot_volume_size_in_gbs > 50)
299+
295300
- name: Configure instance
296301
ansible.builtin.include_tasks: "host_setup.yml"
297302

ocne2/default_vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ compute_instances:
22
1:
33
instance_name: "ocne"
44
type: "server"
5+
boot_volume_size_in_gbs: 50
56
os: "Oracle Linux"
67
os_version: "8"
78
instance_shape: "VM.Standard.E4.Flex"

0 commit comments

Comments
 (0)