Ansible on Oracle Linux 10 Automation Complete Guide
By Luca Berton · Published 2024-01-01 · Category: installation
Automate Oracle Linux 10 with Ansible: dnf, UEK 8, Ksplice live patching, OCI provisioning, image mode, SELinux, Podman 5.
Oracle Linux 10 ships RHEL 10 ABI plus Oracle's UEK 8 (kernel 6.12) and Ksplice zero-downtime live patching. It supports image mode (bootc), Podman 5, OpenSSH 9.9 with PQ KEX, and is supported through July 2035 (ELS).
Oracle Linux 10 release facts
| Item | Value | |---|---| | GA | 2025-07 | | Premier Support | until 2030-07 | | Extended Support | until 2032-07 | | ELS | until 2035-07 | | Default RHCK kernel | 6.12 | | UEK 8 kernel | 6.12 (Oracle build) | | Default Python | 3.12 |
See also: Ansible on Oracle Linux 9 Automation Complete Guide
Baseline playbook
- name: Oracle Linux 10 baseline
hosts: ol10
become: true
tasks:
- name: Update packages
ansible.builtin.dnf: { name: "*", state: latest, update_cache: true }
- name: Install baseline tools
ansible.builtin.dnf:
name: [vim-enhanced, chrony, firewalld, policycoreutils-python-utils, podman, cockpit, bootc, kernel-uek]
state: present
- name: Enable services
ansible.builtin.service:
name: "{{ item }}"
enabled: true
state: started
loop: [chronyd, firewalld, cockpit.socket]
- name: SELinux enforcing
ansible.posix.selinux: { policy: targeted, state: enforcing }
Ksplice on UEK 8
- name: Ksplice on Oracle Linux 10
hosts: ol10
become: true
tasks:
- name: Install uptrack
ansible.builtin.dnf: { name: uptrack, state: present }
- name: Run live updates
ansible.builtin.command: uptrack-upgrade -y
register: out
changed_when: "'Installing' in out.stdout"
See also: Ansible on AlmaLinux 10 Automation Complete Guide
Image mode with bootc
- name: Switch Oracle Linux 10 to bootc image
hosts: ol10
become: true
tasks:
- name: bootc switch
ansible.builtin.command: bootc switch container-registry.oracle.com/os/oraclelinux:10-bootc
register: bs
changed_when: "'Image' in bs.stdout"
- name: Reboot
ansible.builtin.reboot:
when: bs.changed
OCI provisioning with oracle.oci
- name: Launch OL10 instance in OCI
hosts: localhost
tasks:
- name: Provision instance
oracle.oci.oci_compute_instance:
compartment_id: "{{ compartment_ocid }}"
availability_domain: "{{ ad }}"
shape: VM.Standard.E5.Flex
image_id: "{{ ol10_image_ocid }}"
display_name: ol10-app-01
metadata:
ssh_authorized_keys: "{{ lookup('file','~/.ssh/id_ed25519.pub') }}"
state: present
See also: Ansible on Fedora 46 Automation Complete Guide
Best practices
• Combine Ksplice with image-mode rollouts: live-patch hot CVEs, schedule image swaps for monthly minor updates. • Pin theoracle.oci collection to a tested version; OCI APIs evolve quickly.
• Use OCI Bastion + dynamic inventory for ephemeral instances.
Conclusion
Oracle Linux 10 combines RHEL 10 features with UEK 8 and Ksplice. Ansible playbooks for RHEL 10 work as-is; the oracle.oci collection adds OCI-native provisioning and inventory.
Category: installation