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
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