45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
---
|
|
# Install base system packages, Podman tooling, and keep everything patched.
|
|
|
|
- name: Install common system packages
|
|
ansible.builtin.dnf:
|
|
name: "{{ base_packages }}"
|
|
state: present
|
|
|
|
- name: Install Podman container tooling
|
|
ansible.builtin.dnf:
|
|
name: "{{ podman_packages }}"
|
|
state: present
|
|
|
|
- name: Install QEMU packages (optional - required for building images that need emulation)
|
|
ansible.builtin.dnf:
|
|
name: "{{ qemu_packages }}"
|
|
state: present
|
|
when: install_qemu | bool
|
|
|
|
- name: Apply all available package updates
|
|
ansible.builtin.dnf:
|
|
name: "*"
|
|
state: latest
|
|
update_only: true
|
|
|
|
- name: Enable automatic security updates
|
|
ansible.builtin.systemd:
|
|
name: dnf-automatic.timer
|
|
enabled: true
|
|
state: started
|
|
when: enable_dnf_automatic | bool
|
|
|
|
- name: Configure dnf-automatic to apply updates
|
|
ansible.builtin.ini_file:
|
|
path: /etc/dnf/automatic.conf
|
|
section: commands
|
|
option: apply_updates
|
|
value: "yes"
|
|
when: enable_dnf_automatic | bool
|
|
|
|
- name: Install container SELinux policy support
|
|
ansible.builtin.dnf:
|
|
name: container-selinux
|
|
state: present
|
|
when: ansible_selinux is defined and ansible_selinux.status == "enabled" |