New in version 1.9.
(added in 2.4)
The remote dnf configuration file to use for the transaction.
Whether to disable the GPG checking of signatures of packages being installed. Has an effect only if state is present or latest.
Repoid of repositories to disable for the install/update operation. These repos will not persist beyond the transaction. When specifying multiple repos, separate them with a ",".
Repoid of repositories to enable for the install/update operation. These repos will not persist beyond the transaction. When specifying multiple repos, separate them with a ",".
(added in 2.3)
Specifies an alternative installroot, relative to which all packages will be installed.
Various (non-idempotent) commands for usage with
Package name, or package specifier with version, like
Whether to install (
- name: install the latest version of Apache dnf: name: httpd state: latest - name: remove the Apache package dnf: name: httpd state: absent - name: install the latest version of Apache from the testing repo dnf: name: httpd enablerepo: testing state: present - name: upgrade all packages dnf: name: "*" state: latest - name: install the nginx rpm from a remote repo dnf: name: 'http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm' state: present - name: install nginx rpm from a local file dnf: name: /usr/local/src/nginx-release-centos-6-0.el6.ngx.noarch.rpm state: present - name: install the 'Development tools' package group dnf: name: '@Development tools' state: present - name: Autoremove unneeded packages installed as dependencies dnf: autoremove: yes - name: Uninstall httpd but keep its dependencies dnf: name: httpd state: absent autoremove: no
This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.