[PR #9280/afa5716e backport][stable-9] yum_versionlock: adjust docs (#9302)
yum_versionlock: adjust docs (#9280)
* yum_versionlock: adjust docs
* fix examples indentation
(cherry picked from commit afa5716e0b
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
pull/9304/head
parent
f9ee387f68
commit
3f5445274c
|
@ -8,8 +8,7 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r"""
|
||||||
---
|
|
||||||
module: yum_versionlock
|
module: yum_versionlock
|
||||||
version_added: 2.0.0
|
version_added: 2.0.0
|
||||||
short_description: Locks / unlocks a installed package(s) from being updated by yum package manager
|
short_description: Locks / unlocks a installed package(s) from being updated by yum package manager
|
||||||
|
@ -32,62 +31,62 @@ options:
|
||||||
elements: str
|
elements: str
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- If state is V(present), package(s) will be added to yum versionlock list.
|
- 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.
|
- If state is V(absent), package(s) will be removed from yum versionlock list.
|
||||||
choices: [ 'absent', 'present' ]
|
choices: ['absent', 'present']
|
||||||
type: str
|
type: str
|
||||||
default: present
|
default: present
|
||||||
notes:
|
notes:
|
||||||
- Requires yum-plugin-versionlock package on the remote node.
|
- Requires yum-plugin-versionlock package on the remote node.
|
||||||
requirements:
|
requirements:
|
||||||
- yum
|
- yum
|
||||||
- yum-versionlock
|
- yum-versionlock
|
||||||
author:
|
author:
|
||||||
- Florian Paul Azim Hoberg (@gyptazy)
|
- Florian Paul Azim Hoberg (@gyptazy)
|
||||||
- Amin Vakil (@aminvakil)
|
- Amin Vakil (@aminvakil)
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r"""
|
||||||
- name: Prevent Apache / httpd from being updated
|
- name: Prevent Apache / httpd from being updated
|
||||||
community.general.yum_versionlock:
|
community.general.yum_versionlock:
|
||||||
state: present
|
state: present
|
||||||
name:
|
name:
|
||||||
- httpd
|
- httpd
|
||||||
|
|
||||||
- name: Prevent Apache / httpd version 2.4.57-2 from being updated
|
- name: Prevent Apache / httpd version 2.4.57-2 from being updated
|
||||||
community.general.yum_versionlock:
|
community.general.yum_versionlock:
|
||||||
state: present
|
state: present
|
||||||
name:
|
name:
|
||||||
- httpd-0:2.4.57-2.el9
|
- httpd-0:2.4.57-2.el9
|
||||||
|
|
||||||
- name: Prevent multiple packages from being updated
|
- name: Prevent multiple packages from being updated
|
||||||
community.general.yum_versionlock:
|
community.general.yum_versionlock:
|
||||||
state: present
|
state: present
|
||||||
name:
|
name:
|
||||||
- httpd
|
- httpd
|
||||||
- nginx
|
- nginx
|
||||||
- haproxy
|
- haproxy
|
||||||
- curl
|
- curl
|
||||||
|
|
||||||
- name: Remove lock from Apache / httpd to be updated again
|
- name: Remove lock from Apache / httpd to be updated again
|
||||||
community.general.yum_versionlock:
|
community.general.yum_versionlock:
|
||||||
state: absent
|
state: absent
|
||||||
name: httpd
|
name: httpd
|
||||||
'''
|
"""
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r"""
|
||||||
packages:
|
packages:
|
||||||
description: A list of package(s) in versionlock list.
|
description: A list of package(s) in versionlock list.
|
||||||
returned: success
|
returned: success
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
sample: [ 'httpd' ]
|
sample: ['httpd']
|
||||||
state:
|
state:
|
||||||
description: State of package(s).
|
description: State of package(s).
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
sample: present
|
sample: present
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
Loading…
Reference in New Issue