ansible all -m dnf -a 'name=nginx state=latest' -b
Ensure nginx is at the latest version on RHEL hosts
The dnf module plays the role of apt on Fedora and Red Hat family distributions, ensuring nginx is installed at the newest version with -b for root rights. Idempotent, so it only acts when the package state differs. Related: ansible all -m apt.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.