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
10 changes: 10 additions & 0 deletions ocne2/deploy_ocne_libvirt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
- cockpit
- cockpit-machines
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'

- name: Install Oracle Linux 9 virtualization packages
Expand All @@ -35,6 +37,8 @@
- cockpit
- cockpit-machines
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'

- name: Start and enable Oracle Linux 8 monolithic virtualization services
Expand Down Expand Up @@ -110,6 +114,8 @@
ansible.builtin.dnf:
name: oracle-olcne-release-el8
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'

- name: Enable ocne repository
Expand All @@ -123,6 +129,8 @@
ansible.builtin.dnf:
name: oracle-olcne-release-el9
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'

- name: Enable ocne repository
Expand All @@ -138,6 +146,8 @@
- ocne
- kubectl
state: present
retries: 5
delay: 10

- name: Create an ocne cluster
when:
Expand Down
34 changes: 31 additions & 3 deletions ocne2/deploy_ocne_oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
- cockpit
- cockpit-machines
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'

- name: Install Oracle Linux 9 virtualization packages
Expand All @@ -36,6 +38,8 @@
- cockpit
- cockpit-machines
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'

- name: Start and enable Oracle Linux 8 monolithic virtualization services
Expand Down Expand Up @@ -111,6 +115,8 @@
ansible.builtin.dnf:
name: oracle-olcne-release-el8
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'

- name: Enable ocne repository
Expand All @@ -124,6 +130,8 @@
ansible.builtin.dnf:
name: oracle-olcne-release-el9
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'

- name: Enable ocne repository
Expand All @@ -139,6 +147,8 @@
- ocne
- kubectl
state: present
retries: 5
delay: 10

- name: Create an ocne cluster
when:
Expand Down Expand Up @@ -170,6 +180,8 @@
ansible.builtin.dnf:
name: oraclelinux-developer-release-el8
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'

- name: Enable ol developer repository
Expand All @@ -184,12 +196,16 @@
name:
- python36-oci-cli
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'

- name: Install ol developer repository
ansible.builtin.dnf:
name: oraclelinux-developer-release-el9
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'

- name: Enable ol developer repository
Expand All @@ -204,6 +220,8 @@
name:
- python36-oci-cli
state: present
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'

- name: Generate random hex string
Expand Down Expand Up @@ -273,14 +291,24 @@
chdir: ~/
become: true
become_user: "{{ username }}"
register: provision_cluster
changed_when: provision_cluster.rc == 0
async: 3600
poll: 10
register: cluster_sleeper
changed_when: cluster_sleeper.rc == 0

- name: Print cluster provision output
ansible.builtin.debug:
var: provision_cluster
var: cluster_sleeper
when: debug_enabled

# - name: Check on cluster provisioning
# ansible.builtin.async_status:
# jid: "{{ cluster_sleeper.ansible_job_id }}"
# register: job_result
# until: job_result.finished
# retries: 360
# delay: 10

- name: Add kubeconfig to .bashrc file
ansible.builtin.lineinfile:
path: ~/.bashrc
Expand Down
30 changes: 7 additions & 23 deletions ocne2/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,10 @@
# roles:

collections:
- name: https://github.com/ansible-collections/community.general.git
type: git
version: main

- name: https://github.com/ansible-collections/ansible.posix.git
type: git
version: main

- name: https://github.com/oracle/oci-ansible-collection.git
type: git
version: master

- name: https://github.com/ansible-collections/community.postgresql.git
type: git
version: main

- name: https://github.com/ansible-collections/community.crypto.git
type: git
version: main

- name: https://github.com/ansible-collections/community.libvirt.git
type: git
version: main
- ansible.posix
- community.general
- community.postgresql
- community.crypto
- freeipa.ansible_freeipa
- community.libvirt
- oracle.oci
2 changes: 2 additions & 0 deletions ocne2/update_all_rpms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
name: "*"
state: latest
update_only: true
retries: 5
delay: 10
when: ansible_distribution == 'OracleLinux'

- name: Check if a reboot is required
Expand Down