diff --git a/ocne2/default_vars.yml b/ocne2/default_vars.yml index b74d3ae..c0e2c7b 100644 --- a/ocne2/default_vars.yml +++ b/ocne2/default_vars.yml @@ -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 diff --git a/ocne2/templates/ingress_security_rules.j2 b/ocne2/templates/ingress_security_rules.j2 index db769f6..f95d626 100644 --- a/ocne2/templates/ingress_security_rules.j2 +++ b/ocne2/templates/ingress_security_rules.j2 @@ -11,4 +11,18 @@ instance_ingress_security_rules: tcp_options: destination_port_range: max: 22 - min: 22 \ No newline at end of file + 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 %} \ No newline at end of file diff --git a/ol/create_instance.yml b/ol/create_instance.yml index 0606e6a..b2215b1 100644 --- a/ol/create_instance.yml +++ b/ol/create_instance.yml @@ -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 diff --git a/ol/default_vars.yml b/ol/default_vars.yml index 7d24e1f..bb89e82 100644 --- a/ol/default_vars.yml +++ b/ol/default_vars.yml @@ -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 diff --git a/ol/download_ol_iso.yml b/ol/download_ol_iso.yml new file mode 100644 index 0000000..0c0d455 --- /dev/null +++ b/ol/download_ol_iso.yml @@ -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" diff --git a/ol/provision_vbox.yml b/ol/provision_vbox.yml index 7155a2c..ce0354a 100644 --- a/ol/provision_vbox.yml +++ b/ol/provision_vbox.yml @@ -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 @@ -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"