diff --git a/ocne2/build.yml b/ocne2/build.yml index f60a86d..410f528 100644 --- a/ocne2/build.yml +++ b/ocne2/build.yml @@ -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 }}" @@ -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: diff --git a/ocne2/default_vars.yml b/ocne2/default_vars.yml index fc94593..b74d3ae 100644 --- a/ocne2/default_vars.yml +++ b/ocne2/default_vars.yml @@ -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" diff --git a/ocne2/host_setup.yml b/ocne2/host_setup.yml index c77d367..9057c1f 100644 --- a/ocne2/host_setup.yml +++ b/ocne2/host_setup.yml @@ -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 }}"