generated from oracle-devrel/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from bgraef/main
add podman and update to ol deployment
- Loading branch information
Showing
4 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
# 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: Install Podman and Container Tools | ||
hosts: server | ||
vars_files: | ||
- default_vars.yml | ||
become: true | ||
|
||
tasks: | ||
|
||
- name: Install Oracle Linux 8 container tools packages | ||
ansible.builtin.dnf: | ||
name: | ||
- "@container-tools:ol8" | ||
- conntrack | ||
- curl | ||
state: present | ||
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8' | ||
|
||
- name: Install Oracle Linux 9 container tools packages | ||
ansible.builtin.dnf: | ||
name: | ||
- podman | ||
- podman-docker | ||
- conntrack | ||
- curl | ||
state: present | ||
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
# 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: Install latest Oracle Linux packages | ||
hosts: server | ||
vars_files: | ||
- default_vars.yml | ||
become: true | ||
|
||
tasks: | ||
|
||
- name: Update all Oracle Linux packages | ||
ansible.builtin.dnf: | ||
name: "*" | ||
state: latest | ||
update_only: true | ||
when: ansible_distribution == 'OracleLinux' | ||
|
||
- name: Check if a reboot is required | ||
ansible.builtin.command: /usr/bin/needs-restarting -r | ||
register: reboot_required | ||
ignore_errors: true | ||
changed_when: false | ||
failed_when: reboot_required.rc == 2 | ||
when: ansible_distribution == 'OracleLinux' | ||
|
||
- name: Print reboot is required | ||
ansible.builtin.debug: | ||
var: reboot_required | ||
when: debug_enabled | ||
|
||
- name: Reboot (if needed) to apply latest kernel and updates | ||
ansible.builtin.reboot: | ||
when: ansible_distribution == 'OracleLinux' and reboot_required.rc == 1 |