Skip to content

Commit

Permalink
Merge pull request #37 from bgraef/main
Browse files Browse the repository at this point in the history
split out iso download from vbox install for ol types
  • Loading branch information
bgraef authored Oct 9, 2024
2 parents d170403 + 0c91a9f commit 942d336
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 16 deletions.
1 change: 1 addition & 0 deletions ocne2/default_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ debug_enabled: false
add_block_storage: false
block_volume_size_in_gbs: 50
block_count: 1
use_ingress_lb: false

ocne_type: libvirt
install_ocne_rpm: false
Expand Down
16 changes: 15 additions & 1 deletion ocne2/templates/ingress_security_rules.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,18 @@ instance_ingress_security_rules:
tcp_options:
destination_port_range:
max: 22
min: 22
min: 22
{% if use_ingress_lb %}
- source: "0.0.0.0/0"
protocol: 6
tcp_options:
destination_port_range:
max: 80
min: 80
- source: "0.0.0.0/0"
protocol: 6
tcp_options:
destination_port_range:
max: 443
min: 443
{% endif %}
4 changes: 4 additions & 0 deletions ol/create_instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@
ansible.builtin.import_playbook: provision_vbox.yml
when: use_vbox

- name: Download OL ISO
ansible.builtin.import_playbook: download_ol_iso.yml
when: dwnld_ol_iso

- name: Print instances
hosts: all
become: true
Expand Down
2 changes: 1 addition & 1 deletion ol/default_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ virtualbox_version: "7.1"
virtualbox_extpack_version: "7.1.2"
ol_iso_version: "9"
ol_update: "4"

dwnld_ol_iso: false
26 changes: 26 additions & 0 deletions ol/download_ol_iso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
# Copyright (c) 2024 Oracle and/or its affiliates.
# This software is made available to you under the terms of the Universal Permissive License (UPL), Version 1.0.
# The Universal Permissive License (UPL), Version 1.0 (see COPYING or https://oss.oracle.com/licenses/upl)
# See LICENSE.TXT for details.

- name: Download Oracle Linux iso file
hosts: server,vbox
vars_files:
- default_vars.yml
become: true

tasks:

- name: Download the Oracle Linux iso file
ansible.builtin.get_url:
url: "{{ base_url }}/OL{{ ol_iso_version }}/u{{ ol_update }}/x86_64/OracleLinux-R{{ ol_iso_version }}-U{{ ol_update }}-x86_64-dvd.iso"
dest: /home/{{ username }}
force: true
mode: "0644"
register: download_iso_result
until: "'OK' in download_iso_result.msg"
retries: 5
delay: 10
vars:
base_url: "https://yum.oracle.com/ISOS/OracleLinux"
15 changes: 1 addition & 14 deletions ol/provision_vbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# The Universal Permissive License (UPL), Version 1.0 (see COPYING or https://oss.oracle.com/licenses/upl)
# See LICENSE.TXT for details.

- name: Install VNC Server and GNOME Desktop
- name: Install VirtualBox
hosts: vbox
vars_files:
- default_vars.yml
Expand Down Expand Up @@ -87,16 +87,3 @@
register: install_extpack
changed_when: install_extpack != 0
when: 'extpack_list.stdout == "Extension Packs: 0"'

- name: Download the Oracle Linux iso file
ansible.builtin.get_url:
url: "{{ base_url }}/OL{{ ol_iso_version }}/u{{ ol_update }}/x86_64/OracleLinux-R{{ ol_iso_version }}-U{{ ol_update }}-x86_64-dvd.iso"
dest: /home/{{ username }}
force: true
mode: "0644"
register: download_iso_result
until: "'OK' in download_iso_result.msg"
retries: 5
delay: 10
vars:
base_url: "https://yum.oracle.com/ISOS/OracleLinux"

0 comments on commit 942d336

Please sign in to comment.