From 0ab53aefc94afa3829676d25f732526773d31d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kida?= Date: Thu, 2 Feb 2023 20:18:08 +0100 Subject: [PATCH] Update dnf.py (#79679) --- lib/ansible/modules/dnf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ansible/modules/dnf.py b/lib/ansible/modules/dnf.py index 0e79ec763da..8334ceff730 100644 --- a/lib/ansible/modules/dnf.py +++ b/lib/ansible/modules/dnf.py @@ -318,6 +318,14 @@ EXAMPLES = ''' name: "*" state: latest +- name: Update the webserver, depending on which is installed on the system. Do not install the other one + ansible.builtin.dnf: + name: + - httpd + - nginx + state: latest + update_only: yes + - name: Install the nginx rpm from a remote repo ansible.builtin.dnf: name: 'http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm'