yum_versionlock: adjust docs (#9280)

* yum_versionlock: adjust docs

* fix examples indentation
pull/9309/head
Alexei Znamensky 2024-12-22 05:03:23 +13:00 committed by GitHub
parent 1ee244f02d
commit afa5716e0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 29 additions and 30 deletions

View File

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: yum_versionlock
version_added: 2.0.0
short_description: Locks / unlocks a installed package(s) from being updated by yum package manager
@ -34,20 +33,20 @@ options:
description:
- If state is V(present), package(s) will be added to yum versionlock list.
- If state is V(absent), package(s) will be removed from yum versionlock list.
choices: [ 'absent', 'present' ]
choices: ['absent', 'present']
type: str
default: present
notes:
- Requires yum-plugin-versionlock package on the remote node.
requirements:
- yum
- yum-versionlock
- yum
- yum-versionlock
author:
- Florian Paul Azim Hoberg (@gyptazy)
- Amin Vakil (@aminvakil)
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Prevent Apache / httpd from being updated
community.general.yum_versionlock:
state: present
@ -73,21 +72,21 @@ EXAMPLES = r'''
community.general.yum_versionlock:
state: absent
name: httpd
'''
"""
RETURN = r'''
RETURN = r"""
packages:
description: A list of package(s) in versionlock list.
returned: success
type: list
elements: str
sample: [ 'httpd' ]
sample: ['httpd']
state:
description: State of package(s).
returned: success
type: str
sample: present
'''
"""
import re
from ansible.module_utils.basic import AnsibleModule