Skip to content

Commit f9bfe4e

Browse files
russozfelixfontein
andauthored
x*: adjust docs (#9308)
* adjust docs * Update plugins/modules/xml.py Co-authored-by: Felix Fontein <[email protected]> * fix capitalisation * add markup to references of the xe command (xenserver) * add missing markup * Update plugins/modules/xml.py Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]>
1 parent 005c8f5 commit f9bfe4e

11 files changed

+843
-879
lines changed

plugins/modules/xattr.py

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
from __future__ import absolute_import, division, print_function
99
__metaclass__ = type
1010

11-
DOCUMENTATION = '''
12-
---
11+
DOCUMENTATION = r"""
1312
module: xattr
1413
short_description: Manage user defined extended attributes
1514
description:
1615
- Manages filesystem user defined extended attributes.
17-
- Requires that extended attributes are enabled on the target filesystem
18-
and that the setfattr/getfattr utilities are present.
16+
- Requires that extended attributes are enabled on the target filesystem and that the C(setfattr)/C(getfattr) utilities are present.
1917
extends_documentation_fragment:
2018
- community.general.attributes
2119
attributes:
@@ -29,7 +27,7 @@
2927
- The full path of the file/object to get the facts of.
3028
type: path
3129
required: true
32-
aliases: [ name ]
30+
aliases: [name]
3331
namespace:
3432
description:
3533
- Namespace of the named name/key.
@@ -45,27 +43,26 @@
4543
type: str
4644
state:
4745
description:
48-
- defines which state you want to do.
49-
V(read) retrieves the current value for a O(key) (default)
50-
V(present) sets O(path) to O(value), default if value is set
51-
V(all) dumps all data
52-
V(keys) retrieves all keys
53-
V(absent) deletes the key
46+
- Defines which state you want to do.
47+
- V(read) retrieves the current value for a O(key).
48+
- V(present) sets O(path) to O(value), default if value is set.
49+
- V(all) dumps all data.
50+
- V(keys) retrieves all keys.
51+
- V(absent) deletes the key.
5452
type: str
55-
choices: [ absent, all, keys, present, read ]
53+
choices: [absent, all, keys, present, read]
5654
default: read
5755
follow:
5856
description:
59-
- If V(true), dereferences symlinks and sets/gets attributes on symlink target,
60-
otherwise acts on symlink itself.
57+
- If V(true), dereferences symlinks and sets/gets attributes on symlink target, otherwise acts on symlink itself.
6158
type: bool
6259
default: true
6360
author:
6461
- Brian Coca (@bcoca)
65-
'''
62+
"""
6663

67-
EXAMPLES = '''
68-
- name: Obtain the extended attributes of /etc/foo.conf
64+
EXAMPLES = r"""
65+
- name: Obtain the extended attributes of /etc/foo.conf
6966
community.general.xattr:
7067
path: /etc/foo.conf
7168
@@ -94,7 +91,7 @@
9491
namespace: trusted
9592
key: glusterfs.volume-id
9693
state: absent
97-
'''
94+
"""
9895

9996
import os
10097

plugins/modules/xbps.py

Lines changed: 76 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -10,86 +10,78 @@
1010
__metaclass__ = type
1111

1212

13-
DOCUMENTATION = '''
14-
---
13+
DOCUMENTATION = r"""
1514
module: xbps
1615
short_description: Manage packages with XBPS
1716
description:
18-
- Manage packages with the XBPS package manager.
17+
- Manage packages with the XBPS package manager.
1918
author:
20-
- "Dino Occhialini (@dinoocch)"
21-
- "Michael Aldridge (@the-maldridge)"
19+
- "Dino Occhialini (@dinoocch)"
20+
- "Michael Aldridge (@the-maldridge)"
2221
extends_documentation_fragment:
23-
- community.general.attributes
22+
- community.general.attributes
2423
attributes:
25-
check_mode:
26-
support: full
27-
diff_mode:
28-
support: none
24+
check_mode:
25+
support: full
26+
diff_mode:
27+
support: none
2928
options:
30-
name:
31-
description:
32-
- Name of the package to install, upgrade, or remove.
33-
aliases: [pkg,package]
34-
type: list
35-
elements: str
36-
state:
37-
description:
38-
- Desired state of the package.
39-
default: "present"
40-
choices: ["present", "absent", "latest", "installed", "removed"]
41-
type: str
42-
recurse:
43-
description:
44-
- When removing a package, also remove its dependencies, provided
45-
that they are not required by other packages and were not
46-
explicitly installed by a user.
47-
type: bool
48-
default: false
49-
update_cache:
50-
description:
51-
- Whether or not to refresh the master package lists. This can be
52-
run as part of a package installation or as a separate step.
53-
type: bool
54-
default: true
55-
upgrade:
56-
description:
57-
- Whether or not to upgrade whole system
58-
type: bool
59-
default: false
60-
upgrade_xbps:
61-
description:
62-
- Whether or not to upgrade the xbps package when necessary.
63-
Before installing new packages,
64-
xbps requires the user to update the xbps package itself.
65-
Thus when this option is set to V(false),
66-
upgrades and installations will fail when xbps is not up to date.
67-
type: bool
68-
default: true
69-
version_added: '0.2.0'
70-
root:
71-
description:
72-
- The full path for the target root directory.
73-
type: path
74-
version_added: '10.2.0'
75-
repositories:
76-
description:
77-
- Repository URL(s) to prepend to the repository list for the
78-
package installation.
79-
The URL can be a URL to a repository for
80-
remote repositories or a path for local repositories.
81-
type: list
82-
elements: str
83-
version_added: '10.2.0'
84-
accept_pubkey:
85-
description:
86-
- Whether or not repository signing keys should be automatically accepted.
87-
type: bool
88-
default: false
89-
version_added: '10.2.0'
90-
'''
91-
92-
EXAMPLES = '''
29+
name:
30+
description:
31+
- Name of the package to install, upgrade, or remove.
32+
aliases: [pkg, package]
33+
type: list
34+
elements: str
35+
state:
36+
description:
37+
- Desired state of the package.
38+
default: "present"
39+
choices: ["present", "absent", "latest", "installed", "removed"]
40+
type: str
41+
recurse:
42+
description:
43+
- When removing a package, also remove its dependencies, provided that they are not required by other packages and were not explicitly installed
44+
by a user.
45+
type: bool
46+
default: false
47+
update_cache:
48+
description:
49+
- Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step.
50+
type: bool
51+
default: true
52+
upgrade:
53+
description:
54+
- Whether or not to upgrade whole system.
55+
type: bool
56+
default: false
57+
upgrade_xbps:
58+
description:
59+
- Whether or not to upgrade the xbps package when necessary. Before installing new packages, xbps requires the user to update the xbps package
60+
itself. Thus when this option is set to V(false), upgrades and installations will fail when xbps is not up to date.
61+
type: bool
62+
default: true
63+
version_added: '0.2.0'
64+
root:
65+
description:
66+
- The full path for the target root directory.
67+
type: path
68+
version_added: '10.2.0'
69+
repositories:
70+
description:
71+
- Repository URL(s) to prepend to the repository list for the package installation. The URL can be a URL to a repository for remote repositories
72+
or a path for local repositories.
73+
type: list
74+
elements: str
75+
version_added: '10.2.0'
76+
accept_pubkey:
77+
description:
78+
- Whether or not repository signing keys should be automatically accepted.
79+
type: bool
80+
default: false
81+
version_added: '10.2.0'
82+
"""
83+
84+
EXAMPLES = r"""
9385
- name: Install package foo (automatically updating the xbps package if needed)
9486
community.general.xbps:
9587
name: foo
@@ -151,20 +143,20 @@
151143
state: present
152144
repositories: https://repo-default.voidlinux.org/current
153145
root: /mnt
154-
'''
146+
"""
155147

156-
RETURN = '''
148+
RETURN = r"""
157149
msg:
158-
description: Message about results
159-
returned: success
160-
type: str
161-
sample: "System Upgraded"
150+
description: Message about results.
151+
returned: success
152+
type: str
153+
sample: "System Upgraded"
162154
packages:
163-
description: Packages that are affected/would be affected
164-
type: list
165-
sample: ["ansible"]
166-
returned: success
167-
'''
155+
description: Packages that are affected/would be affected.
156+
type: list
157+
sample: ["ansible"]
158+
returned: success
159+
"""
168160

169161

170162
import os

0 commit comments

Comments
 (0)