Skip to content

Commit

Permalink
Update AlmaLinux 8 GPG key
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslavic committed Apr 24, 2024
1 parent e9ff9b9 commit 3e82c12
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from src.command.command import Command
from src.config.config import Config
from src.config.os_type import OSArch
from src.config.os_type import OSType
from src.mode.base_mode import BaseMode, load_yaml_file


Expand Down Expand Up @@ -81,6 +82,11 @@ def _install_base_packages(self):
# Ensure ca-certificates package is in the latest version
self._tools.dnf.install('ca-certificates', ignore_already_installed_error=True)

# Update AlmaLinux 8 GPG key
# https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
if self._cfg.os_type == OSType.Almalinux:
self._tools.dnf.install('almalinux-release', ignore_already_installed_error=True)

for package in self.__base_packages:
if not self._tools.rpm.is_package_installed(package):
self._tools.dnf.install(package)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,17 @@
retries: 3
delay: 1
until: result is succeeded

# https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
- name: Update AlmaLinux 8 GPG key
yum:
name:
- almalinux-release
state: present
register: result
retries: 3
delay: 1
until: result is succeeded
when:
- ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '8'

0 comments on commit 3e82c12

Please sign in to comment.