summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/dnf.py
diff options
context:
space:
mode:
authorAdam Miller <admiller@redhat.com>2020-12-11 09:31:19 -0600
committerGitHub <noreply@github.com>2020-12-11 10:31:19 -0500
commit0044091a055dd9cd448f7639a65b7e8cc3dacbf1 (patch)
tree8ede6317ab91f9c89761ac3c96d3c480e9e22de2 /lib/ansible/modules/dnf.py
parente7dee73774b0b436551e4993ba917eec1e03af2d (diff)
downloadansible-0044091a055dd9cd448f7639a65b7e8cc3dacbf1.tar.gz
Update yum/dnf module docs to include version comp (#72763)
* Update yum/dnf module docs to include version comp Fixes #61234 Signed-off-by: Adam Miller <admiller@redhat.com> * fix up docs syntax to sanity tests are happy Signed-off-by: Adam Miller <admiller@redhat.com>
Diffstat (limited to 'lib/ansible/modules/dnf.py')
-rw-r--r--lib/ansible/modules/dnf.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ansible/modules/dnf.py b/lib/ansible/modules/dnf.py
index bfdd5544b0..38f8009481 100644
--- a/lib/ansible/modules/dnf.py
+++ b/lib/ansible/modules/dnf.py
@@ -25,6 +25,7 @@ options:
When using state=latest, this can be '*' which means run: dnf -y update.
You can also pass a url or a local path to a rpm file.
To operate on several packages this can accept a comma separated string of packages or a list of packages."
+ - Comparison operators for package version are valid here C(>), C(<), C(>=), C(<=). Example - C(name>=1.0)
required: true
aliases:
- pkg
@@ -250,6 +251,11 @@ EXAMPLES = '''
name: httpd
state: latest
+- name: Install Apache >= 2.4
+ dnf:
+ name: httpd>=2.4
+ state: present
+
- name: Install the latest version of Apache and MariaDB
dnf:
name: