AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

Ansible on Fedora 45 Automation Complete Guide

By Luca Berton · Published 2024-01-01 · Category: installation

Automate Fedora 45 with Ansible: dnf5, kernel 6.16, Python 3.14, Podman 5.5, GNOME 49, Wayland, Cockpit, soft-reboot.

Fedora 45 is scheduled for late 2026 and previews kernel 6.16, Python 3.14, GNOME 49, Podman 5.5, OpenSSH 10.0, and dnf5. It is the upstream baseline for RHEL 11 features. This guide covers the Ansible automation patterns that work today on Fedora 45 lab and developer systems.

Fedora 45 release facts

| Item | Value | |---|---| | GA | 2026-10 (target) | | EOL | ~2027-11 | | Default kernel | 6.16 | | Default Python | 3.14 | | Default package manager | dnf5 | | Container engine | Podman 5.5 | | Default shell on workstation | bash 5.3 |

See also: Ansible on Fedora 44 Automation Complete Guide

Ansible-core compatibility

Use ansible-core 2.20 or later. Python 3.14 on managed nodes requires ansible-core ≥ 2.19.

Inventory

[fedora45]
f45-01.lab.example.com

[fedora45:vars] ansible_user=fedora ansible_python_interpreter=/usr/bin/python3

See also: Ansible on Fedora 46 Automation Complete Guide

Baseline playbook

- name: Fedora 45 baseline
  hosts: fedora45
  become: true
  tasks:
    - name: Update packages
      ansible.builtin.dnf5: { name: "*", state: latest, update_cache: true }

- name: Install baseline tools ansible.builtin.dnf5: name: [vim-enhanced, chrony, firewalld, podman, cockpit, policycoreutils-python-utils] state: present

- name: SELinux enforcing ansible.posix.selinux: { policy: targeted, state: enforcing }

- name: Enable services ansible.builtin.service: name: "{{ item }}" enabled: true state: started loop: [chronyd, firewalld, cockpit.socket]

GNOME 49 / Wayland defaults

- name: Force Wayland session
  hosts: fedora45_desktop
  become: true
  tasks:
    - name: Set GDM default to Wayland
      ansible.builtin.lineinfile:
        path: /etc/gdm/custom.conf
        regexp: '^#?WaylandEnable'
        line: 'WaylandEnable=true'

- name: Disable Xorg fallback ansible.builtin.copy: dest: /etc/gdm/custom.conf.d/no-x11.conf content: | [daemon] PreferredDisplayServer=wayland mode: "0644"

See also: Ansible on AlmaLinux 10 Automation Complete Guide

Podman 5.5 with Quadlet

- name: Quadlet rollout on F45
  hosts: fedora45
  become: true
  tasks:
    - name: Drop quadlet
      ansible.builtin.copy:
        dest: /etc/containers/systemd/api.container
        mode: "0644"
        content: |
          [Container]
          Image=quay.io/corp/api:1.4.2
          PublishPort=8443:8443
          Volume=api-data.volume:/var/lib/api
          [Install]
          WantedBy=default.target
    - ansible.builtin.systemd: { daemon_reload: true }
    - ansible.builtin.systemd: { name: api, enabled: true, state: started }

systemd-soft-reboot patching

- name: Soft-reboot patch loop
  hosts: fedora45
  become: true
  tasks:
    - name: Updates
      ansible.builtin.dnf5: { name: "*", state: latest }
    - name: Soft reboot
      ansible.builtin.command: systemctl soft-reboot
      async: 30
      poll: 0
    - name: Wait for SSH
      ansible.builtin.wait_for_connection: { delay: 10, timeout: 120 }

Best practices

• Validate playbooks against Python 3.14 deprecations (python -W error). • Use Quadlet over docker-compose — the unit files survive reboots and integrate with systemctl. • Pin GNOME extension versions if managing developer desktops fleet-wide.

Conclusion

Fedora 45 is a small but meaningful step from F44: kernel 6.16, Podman 5.5, Python 3.14. Ansible playbooks that use dnf5 and Quadlet on F44 work unchanged.

Installing Ansible on Fedora 45

# Install via DNF
sudo dnf install ansible-core -y

# Or the full package sudo dnf install ansible -y

# Verify ansible --version

Fedora 45 Automation Tasks

- name: Configure Fedora 45 workstation
  hosts: fedora
  become: true
  tasks:
    - name: Install development tools
      ansible.builtin.dnf:
        name:
          - gcc
          - make
          - python3-devel
          - git
          - podman
          - buildah
        state: present

- name: Configure firewalld ansible.posix.firewalld: service: "{{ item }}" permanent: true immediate: true state: enabled loop: - ssh - http - https

- name: Set SELinux enforcing ansible.posix.selinux: policy: targeted state: enforcing

- name: Install Flatpak apps community.general.flatpak: name: "{{ item }}" state: present loop: - com.visualstudio.code - org.mozilla.firefox - org.gnome.Extensions

- name: Enable automatic updates ansible.builtin.systemd: name: dnf-automatic-install.timer state: started enabled: true

FAQ

What is the difference between Fedora 45 and Fedora 46?

Fedora releases every ~6 months. Fedora 46 includes newer kernel, updated packages, and potentially new default tools. Ansible playbooks generally work across Fedora versions with minimal changes.

Should I use Podman or Docker on Fedora?

Fedora ships Podman by default as a rootless, daemonless container engine. Podman is recommended for Fedora. Use containers.podman.podman_container for Ansible automation.

Category: installation

Browse all Ansible tutorials · AnsiblePilot Home