An Ansible role to apply system updates using the dnf
package manager.
Use this Ansible role to apply system updates or 'security only' updates to systems using the dnf
package manager.
This Ansible role:
- Applies the available system updates
- Remove obsolete packages
- Reboot the system
- Privilege escalation (
sudo
, learn more).
Set the role to only apply updates marked as security updates.
-
Type: bool
-
Default:
false
dnfupdate_security_only: true
(None)
- Create a
requirements.yml
file at the your project's top level directory and include the following:
---
- name: dnfupdate
src: https://github.com/rossijonas/ansible-role-dnf-update
- Use
ansible-galaxy
command to fetch dependencies:
$ ansible-galaxy install -r requirements.yml
- Apply all updates available:
---
- hosts: servers
roles:
- dnfupdate
- Apply security updates only:
---
- hosts: servers
roles:
- role: dnfupdate
vars:
dnfupdate_security_only: true
MIT
GitHub profile: https://github.com/rossijonas