Skip to content

Commit

Permalink
defghi*: style adjustments (#9532)
Browse files Browse the repository at this point in the history
* defghi*: style adjustments

* Apply suggestions from code review

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
russoz and felixfontein authored Jan 7, 2025
1 parent 838cdaa commit 8cef0ee
Show file tree
Hide file tree
Showing 26 changed files with 69 additions and 73 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/dconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
present everywhere. When it is missing, a simple string comparison between values is used, and there may be false positives,
that is, Ansible may think that a value is being changed when it is not. This fallback will be removed in a future version
of this module, at which point the module will stop working on hosts without C(gi.repository).
- Detection of existing, running D-Bus session, required to change settings using C(dconf), is not 100% reliable due to implementation
details of D-Bus daemon itself. This might lead to running applications not picking-up changes on-the-fly if options are
changed using Ansible and C(dbus-run-session).
- Detection of existing, running D-Bus session, required to change settings using C(dconf), is not 100% reliable due to
implementation details of D-Bus daemon itself. This might lead to running applications not picking-up changes on-the-fly
if options are changed using Ansible and C(dbus-run-session).
- Keep in mind that the C(dconf) CLI tool, which this module wraps around, utilises an unusual syntax for the values (GVariant).
For example, if you wanted to provide a string value, the correct syntax would be O(value="'myvalue'") - with single quotes
as part of the Ansible parameter value.
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/dimensiondata_vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
default: ''
network_domain:
description:
- The Id or name of the target network domain.
- The ID or name of the target network domain.
required: true
type: str
private_ipv4_base_address:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/dnsimple.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
account_email:
description:
- Account email. If omitted, the environment variables E(DNSIMPLE_EMAIL) and E(DNSIMPLE_API_TOKEN) will be looked for.
- "If those variables are not found, a C(.dnsimple) file will be looked for, see: U(https://github.com/mikemaccana/dnsimple-python#getting-started)."
- 'If those variables are not found, a C(.dnsimple) file will be looked for, see: U(https://github.com/mikemaccana/dnsimple-python#getting-started).'
- C(.dnsimple) config files are only supported in dnsimple-python<2.0.0.
type: str
account_api_token:
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/dnsmadeeasy.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
domain:
description:
- Domain to work with. Can be the domain name (for example V(mydomain.com)) or the numeric ID of the domain in DNS Made Easy
(for example V(839989)) for faster resolution.
- Domain to work with. Can be the domain name (for example V(mydomain.com)) or the numeric ID of the domain in DNS Made
Easy (for example V(839989)) for faster resolution.
required: true
type: str
Expand All @@ -65,7 +65,7 @@
- 'Record value. HTTPRED: <redirection URL>, MX: <priority> <target name>, NS: <name server>, PTR: <target name>, SRV:
<priority> <weight> <port> <target name>, TXT: <text value>".'
- If record_value is not specified; no changes will be made and the record will be returned in 'result' (in other words,
this module can be used to fetch a record's current id, type, and ttl).
this module can be used to fetch a record's current ID, type, and ttl).
type: str
record_ttl:
Expand Down Expand Up @@ -128,7 +128,7 @@
contactList:
description:
- Name or id of the contact list that the monitor will notify.
- Name or ID of the contact list that the monitor will notify.
- The default V('') means the Account Owner.
type: str
Expand Down
16 changes: 5 additions & 11 deletions plugins/modules/dpkg_divert.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
options:
path:
description:
- The original and absolute path of the file to be diverted or undiverted. This path is unique, in other words it is not possible
to get two diversions for the same O(path).
- The original and absolute path of the file to be diverted or undiverted. This path is unique, in other words it is
not possible to get two diversions for the same O(path).
required: true
type: path
state:
Expand Down Expand Up @@ -69,8 +69,8 @@
default: false
force:
description:
- When O(rename=true) and O(force=true), renaming is performed even if the target of the renaming exists, in other words the existing
contents of the file at this location will be lost.
- When O(rename=true) and O(force=true), renaming is performed even if the target of the renaming exists, in other words
the existing contents of the file at this location will be lost.
- This parameter is ignored when O(rename=false).
type: bool
default: false
Expand Down Expand Up @@ -132,13 +132,7 @@
state:
description: The state of the diversion.
type: str
sample:
{
"divert": "/etc/foobarrc.distrib",
"holder": "LOCAL",
"path": "/etc/foobarrc",
"state": "present"
}
sample: {"divert": "/etc/foobarrc.distrib", "holder": "LOCAL", "path": "/etc/foobarrc", "state": "present"}
"""


Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/emc_vnx_sg_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
type: str
lunid:
description:
- Lun id to be added.
- LUN ID to be added.
required: true
type: int
state:
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/gconftool2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
- Kenneth D. Evensen (@kevensen)
short_description: Edit GNOME Configurations
description:
- This module allows for the manipulation of GNOME 2 Configuration using C(gconftool-2). Please see the gconftool-2(1) man pages
for more details.
- This module allows for the manipulation of GNOME 2 Configuration using C(gconftool-2). Please see the gconftool-2(1) man
pages for more details.
seealso:
- name: C(gconftool-2) command manual page
description: Manual page for the command.
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/gitlab_deploy_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
options:
project:
description:
- Id or Full path of project in the form of group/name.
- ID or Full path of project in the form of group/name.
required: true
type: str
title:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/gitlab_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
parent:
description:
- Allow to create subgroups.
- Id or Full path of parent group in the form of group/name.
- ID or Full path of parent group in the form of group/name.
type: str
path:
description:
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/gitlab_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
options:
project:
description:
- Id or Full path of the project in the form of group/name.
- ID or Full path of the project in the form of group/name.
required: true
type: str
hook_url:
description:
- The url that you want GitLab to post to, this is used as the primary key for updates and deletion.
- The URL that you want GitLab to post to, this is used as the primary key for updates and deletion.
required: true
type: str
state:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/gitlab_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
version_added: "6.2.0"
group:
description:
- Id or the full path of the group of which this projects belongs to.
- ID or the full path of the group of which this projects belongs to.
type: str
import_url:
description:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/gitlab_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
version_added: 3.1.0
group:
description:
- Id or Full path of parent group in the form of group/name.
- ID or Full path of parent group in the form of group/name.
- Add user as a member to this group.
type: str
access_level:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

RETURN = r"""
gunicorn:
description: Process id of gunicorn.
description: Process ID of gunicorn.
returned: changed
type: str
sample: "1234"
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
first contact with a remote host. To avoid this prompt, one solution is to add the remote host public key in C(/etc/ssh/ssh_known_hosts)
before calling the hg module, with the following command: C(ssh-keyscan remote_host.com >> /etc/ssh/ssh_known_hosts).'
- As per 01 Dec 2018, Bitbucket has dropped support for TLSv1 and TLSv1.1 connections. As such, if the underlying system
still uses a Python version below 2.7.9, you will have issues checking out bitbucket repositories.
See U(https://bitbucket.org/blog/deprecating-tlsv1-tlsv1-1-2018-12-01).
still uses a Python version below 2.7.9, you will have issues checking out bitbucket repositories. See
U(https://bitbucket.org/blog/deprecating-tlsv1-tlsv1-1-2018-12-01).
"""

EXAMPLES = r"""
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/hipchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
api:
type: str
description:
- API url if using a self-hosted hipchat server. For Hipchat API version 2 use the default URI with C(/v2) instead of
- API URL if using a self-hosted hipchat server. For Hipchat API version 2 use the default URI with C(/v2) instead of
C(/v1).
default: 'https://api.hipchat.com/v1'
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/honeybadger_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
default: "https://api.honeybadger.io/v1/deploys"
validate_certs:
description:
- If V(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled
- If V(false), SSL certificates for the target URL will not be validated. This should only be used on personally controlled
sites using self-signed certificates.
type: bool
default: true
Expand Down
16 changes: 8 additions & 8 deletions plugins/modules/hpilo_boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
author: Dag Wieers (@dagwieers)
short_description: Boot system using specific media through HP iLO interface
description:
- 'This module boots a system through its HP iLO interface. The boot media can be one of: V(cdrom), V(floppy), V(hdd),
V(network), or V(usb).'
- 'This module boots a system through its HP iLO interface. The boot media can be one of: V(cdrom), V(floppy), V(hdd), V(network),
or V(usb).'
- This module requires the hpilo python module.
extends_documentation_fragment:
- community.general.attributes
Expand Down Expand Up @@ -55,12 +55,12 @@
state:
description:
- The state of the boot media.
- "V(no_boot): Do not boot from the device"
- "V(boot_once): Boot from the device once and then notthereafter"
- "V(boot_always): Boot from the device each time the server is rebooted"
- "V(connect): Connect the virtual media device and set to boot_always"
- "V(disconnect): Disconnects the virtual media device and set to no_boot"
- "V(poweroff): Power off the server"
- 'V(no_boot): Do not boot from the device.'
- 'V(boot_once): Boot from the device once and then notthereafter.'
- 'V(boot_always): Boot from the device each time the server is rebooted.'
- 'V(connect): Connect the virtual media device and set to boot_always.'
- 'V(disconnect): Disconnects the virtual media device and set to no_boot.'
- 'V(poweroff): Power off the server.'
default: boot_once
type: str
choices: ["boot_always", "boot_once", "connect", "disconnect", "no_boot", "poweroff"]
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/hwc_network_vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,22 @@
RETURN = r"""
id:
description:
- The id of vpc.
- The ID of VPC.
type: str
returned: success
name:
description:
- The name of vpc.
- The name of VPC.
type: str
returned: success
cidr:
description:
- The range of available subnets in the vpc.
- The range of available subnets in the VPC.
type: str
returned: success
status:
description:
- The status of vpc.
- The status of VPC.
type: str
returned: success
routes:
Expand All @@ -122,7 +122,7 @@
returned: success
enable_shared_snat:
description:
- Show whether the shared snat is enabled.
- Show whether the shared SNAT is enabled.
type: bool
returned: success
"""
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ibm_sa_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
type: str
ldap_id:
description:
- LDAP id to add to the domain.
- LDAP ID to add to the domain.
required: false
type: str
size:
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/icinga2_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
- If the O(url_username) parameter is not specified, the O(url_password) parameter will not be used.
force_basic_auth:
description:
- Httplib2, the library used by the uri module only sends authentication information when a webservice responds to an
initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This
option forces the sending of the Basic authentication header upon initial request.
- C(httplib2), the library used by Ansible's HTTP request code only sends authentication information when a webservice responds to
an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail.
This option forces the sending of the Basic authentication header upon initial request.
type: bool
default: false
client_cert:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/imc_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
response="yes"
errorCode="ERR-xml-parse-error"
invocationResult="594"
errorDescr="XML PARSING ERROR: Element 'computeRackUnit', attribute 'admin_Power': The attribute 'admin_Power' is not allowed.\n"/>
errorDescr="XML PARSING ERROR: Element 'computeRackUnit', attribute 'admin_Power': The attribute 'admin_Power' is not allowed.\n" />
"""

import os
Expand Down
7 changes: 4 additions & 3 deletions plugins/modules/infinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
type: str
network_location:
description:
- The parent network id for a given network.
- The parent network ID for a given network.
type: int
default: -1
network_type:
Expand Down Expand Up @@ -105,7 +105,7 @@

RETURN = r"""
network_id:
description: Id for a given network.
description: ID for a given network.
returned: success
type: str
sample: '1501'
Expand All @@ -115,7 +115,8 @@
type: str
sample: '{"address": "192.168.10.3", "hostname": "", "FQDN": "", "domainname": "", "id": 3229}'
network_info:
description: when reserving a LAN network from a Infinity supernet by providing network_size, the information about the reserved network is returned.
description: When reserving a LAN network from a Infinity supernet by providing network_size, the information about the
reserved network is returned.
returned: success
type: str
sample: {
Expand Down
5 changes: 3 additions & 2 deletions plugins/modules/influxdb_retention_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@
default: false
shard_group_duration:
description:
- Determines the time range covered by a shard group. If specified it must be at least one hour. If not provided, it is determined
by InfluxDB by the rentention policy's duration. Supports complex duration expressions with multiple units.
- Determines the time range covered by a shard group. If specified it must be at least one hour. If not provided, it
is determined by InfluxDB by the rentention policy's duration. Supports complex duration expressions with multiple
units.
type: str
version_added: '2.0.0'
extends_documentation_fragment:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ipa_otptoken.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
aliases: ["name"]
type: str
newuniqueid:
description: If specified, the unique id specified will be changed to this.
description: If specified, the unique ID specified will be changed to this.
type: str
otptype:
description:
Expand Down
18 changes: 9 additions & 9 deletions plugins/modules/ipmi_boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@
version_added: 4.1.0
bootdev:
description:
- Set boot device to use on next reboot
- "The choices for the device are:"
- V(network) -- Request network boot
- V(floppy) -- Boot from floppy
- V(hd) -- Boot from hard drive
- "V(safe) -- Boot from hard drive, requesting 'safe mode'"
- V(optical) -- boot from CD/DVD/BD drive
- V(setup) -- Boot into setup utility
- V(default) -- remove any IPMI directed boot device request
- Set boot device to use on next reboot.
- 'The choices for the device are:'
- V(network) -- Request network boot.
- V(floppy) -- Boot from floppy.
- V(hd) -- Boot from hard drive.
- V(safe) -- Boot from hard drive, requesting 'safe mode'.
- V(optical) -- boot from CD/DVD/BD drive.
- V(setup) -- Boot into setup utility.
- V(default) -- remove any IPMI directed boot device request.
required: true
choices:
- network
Expand Down
12 changes: 6 additions & 6 deletions plugins/modules/ipmi_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
state:
description:
- Whether to ensure that the machine in desired state.
- "The choices for state are:"
- V(on) -- Request system turn on
- V(off) -- Request system turn off without waiting for OS to shutdown
- V(shutdown) -- Have system request OS proper shutdown
- V(reset) -- Request system reset without waiting for OS
- "V(boot) -- If system is off, then V(on), else V(reset)"
- 'The choices for state are:'
- V(on) -- Request system turn on.
- V(off) -- Request system turn off without waiting for OS to shutdown.
- V(shutdown) -- Have system request OS proper shutdown.
- V(reset) -- Request system reset without waiting for OS.
- V(boot) -- If system is off, then V(on), else V(reset).
- Either this option or O(machine) is required.
choices: ['on', 'off', shutdown, reset, boot]
type: str
Expand Down

0 comments on commit 8cef0ee

Please sign in to comment.