Skip to content

Commit d170403

Browse files
authored
Merge pull request #36 from bgraef/main
add code for increase boot vol size in ocne 2
2 parents dabac4b + 206198b commit d170403

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

ocne2/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
availability_domain: "{{ my_availability_domain }}"
1010
compartment_id: "{{ my_compartment_id }}"
1111
name: "{{ item.value.instance_name | default('instance-'~timestamp) }}"
12-
image_id: "{{ ol_image_id }}"
12+
source_details:
13+
image_id: "{{ ol_image_id }}"
14+
source_type: image
15+
boot_volume_size_in_gbs: "{{ item.value.boot_volume_size_in_gbs | default(50) | int }}"
1316
shape: "{{ instance_shape }}"
1417
shape_config:
1518
ocpus: "{{ instance_ocpus }}"
@@ -77,7 +80,7 @@
7780

7881
- name: Add block storage to an instance
7982
ansible.builtin.include_tasks: "block.yml"
80-
loop: "{{ query('sequence', 'start=1 end='+(block_count)|string) }}"
83+
loop: "{{ query('sequence', 'start=1 end=' + (block_count) | string) }}"
8184
loop_control:
8285
extended: true
8386
vars:

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"

ocne2/host_setup.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
- name: Run facts module to get latest information
3838
ansible.builtin.setup:
3939

40+
- name: Grow the root filesystem
41+
ansible.builtin.shell: |
42+
/usr/libexec/oci-growfs -y
43+
become: true
44+
register: result
45+
changed_when: result.rc == 0
46+
4047
- name: Add user account with access to sudo
4148
ansible.builtin.user:
4249
name: "{{ username }}"

0 commit comments

Comments
 (0)