Skip to content

Commit

Permalink
Merge pull request #36 from bgraef/main
Browse files Browse the repository at this point in the history
add code for increase boot vol size in ocne 2
  • Loading branch information
bgraef authored Oct 2, 2024
2 parents dabac4b + 206198b commit d170403
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ocne2/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
availability_domain: "{{ my_availability_domain }}"
compartment_id: "{{ my_compartment_id }}"
name: "{{ item.value.instance_name | default('instance-'~timestamp) }}"
image_id: "{{ ol_image_id }}"
source_details:
image_id: "{{ ol_image_id }}"
source_type: image
boot_volume_size_in_gbs: "{{ item.value.boot_volume_size_in_gbs | default(50) | int }}"
shape: "{{ instance_shape }}"
shape_config:
ocpus: "{{ instance_ocpus }}"
Expand Down Expand Up @@ -77,7 +80,7 @@

- name: Add block storage to an instance
ansible.builtin.include_tasks: "block.yml"
loop: "{{ query('sequence', 'start=1 end='+(block_count)|string) }}"
loop: "{{ query('sequence', 'start=1 end=' + (block_count) | string) }}"
loop_control:
extended: true
vars:
Expand Down
1 change: 1 addition & 0 deletions ocne2/default_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ compute_instances:
1:
instance_name: "ocne"
type: "server"
boot_volume_size_in_gbs: 50
os: "Oracle Linux"
os_version: "8"
instance_shape: "VM.Standard.E4.Flex"
Expand Down
7 changes: 7 additions & 0 deletions ocne2/host_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
- name: Run facts module to get latest information
ansible.builtin.setup:

- name: Grow the root filesystem
ansible.builtin.shell: |
/usr/libexec/oci-growfs -y
become: true
register: result
changed_when: result.rc == 0

- name: Add user account with access to sudo
ansible.builtin.user:
name: "{{ username }}"
Expand Down

0 comments on commit d170403

Please sign in to comment.