dnf5
Collection: builtin
Full Name: parallax.builtin.dnf5
Aliases: ansible.builtin.dnf5, dnf5
Synopsis
Manage dnf5
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| name | list | Package names, specs with versions, URLs, or paths to local RPM files (alias: pkg) | ||
| state | string | present | Desired package state Choices: absent, present, installed, removed, latest | |
| list | string | Various non-idempotent commands for querying packages | ||
| allow_downgrade | bool | false | Allow downgrading packages to older versions | |
| allowerasing | bool | false | Allow erasing installed packages to resolve dependencies | |
| autoremove | bool | false | Remove leaf packages no longer needed by other packages | |
| best | bool | true | Use package with highest version available or fail | |
| nobest | bool | false | Set best option to false | |
| update_only | bool | false | Only update already installed packages when state=latest | |
| update_cache | bool | false | Force refresh of cache before operation (alias: expire-cache) | |
| security | bool | false | Install only security updates | |
| bugfix | bool | false | Install only bugfix updates | |
| enablerepo | list | Repository IDs to enable temporarily | ||
| disablerepo | list | Repository IDs to disable temporarily | ||
| disable_excludes | string | Disable excludes defined in DNF config files | ||
| download_only | bool | false | Only download packages without installing | |
| download_dir | string | Directory to store downloaded packages | ||
| enable_plugin | list | DNF plugin names to enable | ||
| disable_plugin | list | DNF plugin names to disable | ||
| conf_file | string | Alternative DNF configuration file path | ||
| disable_gpg_check | bool | false | Disable GPG signature checking | |
| sslverify | bool | true | Verify SSL certificates for repos | |
| validate_certs | bool | true | Validate SSL certificates | |
| installroot | string | / | Alternative root directory for installation | |
| releasever | string | Override detected release version | ||
| install_weak_deps | bool | true | Install weak dependencies (recommends/suggests) | |
| skip_broken | bool | false | Skip packages with broken dependencies | |
| exclude | list | Package names/patterns to exclude | ||
| cacheonly | bool | false | Run entirely from cache, don’t update metadata | |
| lock_timeout | int | 30 | Seconds to wait for DNF lock | |
| install_repoquery | bool | true | Install repoquery if needed | |
| pkg | list | Alias for name parameter | ||
| expire-cache | bool | Alias for update_cache parameter |
Example
- name: Example dnf5 task
dnf5:
name: <your_name>
state: absent