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>
This commit is contained in:
parent
e7dee73774
commit
0044091a05
3 changed files with 14 additions and 0 deletions
2
changelogs/fragments/61234-yum-dnf-version-comp-doc.yml
Normal file
2
changelogs/fragments/61234-yum-dnf-version-comp-doc.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- Add yum/dnf version comparison documentation for package install
|
|
@ -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:
|
||||
|
|
|
@ -33,6 +33,7 @@ options:
|
|||
name:
|
||||
description:
|
||||
- A package name or package specifier with version, like C(name-1.0).
|
||||
- Comparison operators for package version are valid here C(>), C(<), C(>=), C(<=). Example - C(name>=1.0)
|
||||
- If a previous version is specified, the task also needs to turn C(allow_downgrade) on.
|
||||
See the C(allow_downgrade) documentation for caveats with downgrading packages.
|
||||
- When using state=latest, this can be C('*') which means run C(yum -y update).
|
||||
|
@ -277,6 +278,11 @@ EXAMPLES = '''
|
|||
name: httpd
|
||||
state: latest
|
||||
|
||||
- name: Install Apache >= 2.4
|
||||
yum:
|
||||
name: httpd>=2.4
|
||||
state: present
|
||||
|
||||
- name: Install a list of packages (suitable replacement for 2.11 loop deprecation warning)
|
||||
yum:
|
||||
name:
|
||||
|
|
Loading…
Reference in a new issue