Skip to content

Commit

Permalink
[PR #9517/33b9ad09 backport][stable-10] s*: style adjustments (#9523)
Browse files Browse the repository at this point in the history
s*: style adjustments (#9517)

* s*: style adjustments

* fix quotes

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 33b9ad0)

Co-authored-by: Alexei Znamensky <[email protected]>
  • Loading branch information
patchback[bot] and russoz authored Jan 3, 2025
1 parent 39e4f89 commit 8208e52
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 40 deletions.
4 changes: 2 additions & 2 deletions plugins/modules/scaleway_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
privacy:
description:
- Privacy policies define whether a container can be executed anonymously.
- Choose V(public) to enable anonymous execution, or V(private) to protect your container with an authentication mechanism provided by the
Scaleway API.
- Choose V(public) to enable anonymous execution, or V(private) to protect your container with an authentication mechanism
provided by the Scaleway API.
type: str
default: public
choices:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/scaleway_container_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
description: Container used for testing scaleway_container ansible module
domain_name: cnansibletestgfogtjod-cn-ansible-test.functions.fnc.fr-par.scw.cloud
environment_variables:
MY_VAR: my_value
MY_VAR: my_value
error_message: null
http_option: ""
id: c9070eb0-d7a4-48dd-9af3-4fb139890721
Expand Down
7 changes: 4 additions & 3 deletions plugins/modules/scaleway_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
runtime:
description:
- Runtime of the function.
- See U(https://www.scaleway.com/en/docs/compute/functions/reference-content/functions-lifecycle/) for all available runtimes.
- See U(https://www.scaleway.com/en/docs/compute/functions/reference-content/functions-lifecycle/) for all available
runtimes.
type: str
required: true
Expand All @@ -120,8 +121,8 @@
privacy:
description:
- Privacy policies define whether a function can be executed anonymously.
- Choose V(public) to enable anonymous execution, or V(private) to protect your function with an authentication mechanism provided by the
Scaleway API.
- Choose V(public) to enable anonymous execution, or V(private) to protect your function with an authentication mechanism
provided by the Scaleway API.
type: str
default: public
choices:
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/scaleway_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@
id:
type: str
description:
- Id of the Scaleway IP (UUID).
- ID of the Scaleway IP (UUID).
server:
type: str
description:
- Id of the server you want to attach an IP to.
- To unattach an IP don't specify this option.
- ID of the server you want to attach an IP to.
- To unattach an IP do not specify this option.
reverse:
type: str
description:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/scaleway_ip_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
scaleway_ip_info:
description:
- Response from Scaleway API.
- 'For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/)'
- 'For more details please refer to U(https://developers.scaleway.com/en/products/instance/api/).'
returned: success
type: list
elements: dict
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/scaleway_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
region: fr-par
"""

RETURNS = '''
RETURNS = """
{
"scaleway_lb": {
"backend_count": 0,
Expand Down Expand Up @@ -154,7 +154,7 @@
]
}
}
'''
"""

import datetime
import time
Expand Down
19 changes: 11 additions & 8 deletions plugins/modules/sefcontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@
type: str
substitute:
description:
- Path to use to substitute file context(s) for the specified O(target). The context labeling for the O(target) subtree is made equivalent
to this path.
- This is also referred to as SELinux file context equivalence and it implements the C(equal) functionality of the SELinux management tools.
- Path to use to substitute file context(s) for the specified O(target). The context labeling for the O(target) subtree
is made equivalent to this path.
- This is also referred to as SELinux file context equivalence and it implements the C(equal) functionality of the SELinux
management tools.
version_added: 6.4.0
type: str
aliases: [equal]
Expand All @@ -72,7 +73,8 @@
state:
description:
- Whether the SELinux file context must be V(absent) or V(present).
- Specifying V(absent) without either O(setype) or O(substitute) deletes both SELinux type or path substitution mappings that match O(target).
- Specifying V(absent) without either O(setype) or O(substitute) deletes both SELinux type or path substitution mappings
that match O(target).
type: str
choices: [absent, present]
default: present
Expand All @@ -91,10 +93,11 @@
- The changes are persistent across reboots.
- O(setype) and O(substitute) are mutually exclusive.
- If O(state=present) then one of O(setype) or O(substitute) is mandatory.
- The M(community.general.sefcontext) module does not modify existing files to the new SELinux context(s), so it is advisable to first create
the SELinux file contexts before creating files, or run C(restorecon) manually for the existing files that require the new SELinux file contexts.
- Not applying SELinux fcontexts to existing files is a deliberate decision as it would be unclear what reported changes would entail to, and
there is no guarantee that applying SELinux fcontext does not pick up other unrelated prior changes.
- The M(community.general.sefcontext) module does not modify existing files to the new SELinux context(s), so it is advisable
to first create the SELinux file contexts before creating files, or run C(restorecon) manually for the existing files
that require the new SELinux file contexts.
- Not applying SELinux fcontexts to existing files is a deliberate decision as it would be unclear what reported changes
would entail to, and there is no guarantee that applying SELinux fcontext does not pick up other unrelated prior changes.
requirements:
- libselinux-python
- policycoreutils-python
Expand Down
9 changes: 6 additions & 3 deletions plugins/modules/sendgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
description:
- Sends an email with a SendGrid account through their API, not through the SMTP service.
notes:
- This module is non-idempotent because it sends an email through the external API. It is idempotent only in the case that the module fails.
- Like the other notification modules, this one requires an external dependency to work. In this case, you will need an active SendGrid account.
- In order to use O(api_key), O(cc), O(bcc), O(attachments), O(from_name), O(html_body), and O(headers) you must C(pip install sendgrid).
- This module is non-idempotent because it sends an email through the external API. It is idempotent only in the case that
the module fails.
- Like the other notification modules, this one requires an external dependency to work. In this case, you will need an
active SendGrid account.
- In order to use O(api_key), O(cc), O(bcc), O(attachments), O(from_name), O(html_body), and O(headers) you must C(pip install
sendgrid).
requirements:
- sendgrid Python library 1.6.22 or lower (Sendgrid API V2 supported)
extends_documentation_fragment:
Expand Down
11 changes: 5 additions & 6 deletions plugins/modules/sensu_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
description:
- Manage the checks that should be run on a machine by I(Sensu).
- Most options do not have a default and will not be added to the check definition unless specified.
- All defaults except O(path), O(state), O(backup) and O(metric) are not managed by this module,
they are simply specified for your convenience.
- All defaults except O(path), O(state), O(backup) and O(metric) are not managed by this module, they are simply specified
for your convenience.
deprecated:
removed_in: 13.0.0
why: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
Expand Down Expand Up @@ -50,8 +50,8 @@
default: /etc/sensu/conf.d/checks.json
backup:
description:
- Create a backup file (if yes), including the timestamp information so
you can get the original file back if you somehow clobbered it incorrectly.
- Create a backup file (if yes), including the timestamp information so you can get the original file back if you somehow
clobbered it incorrectly.
type: bool
default: false
command:
Expand Down Expand Up @@ -128,8 +128,7 @@
- Number of seconds handlers should wait before taking second action.
aggregate:
description:
- Classifies the check as an aggregate check,
making it available using the aggregate API.
- Classifies the check as an aggregate check, making it available using the aggregate API.
- Default is V(false).
type: bool
low_flap_threshold:
Expand Down
15 changes: 9 additions & 6 deletions plugins/modules/sensu_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
short_description: Manages Sensu client configuration
description:
- Manages Sensu client configuration.
- 'For more information, refer to the Sensu documentation: U(https://sensuapp.org/docs/latest/reference/clients.html)'
- 'For more information, refer to the L(Sensu documentation, https://sensuapp.org/docs/latest/reference/clients.html).'
deprecated:
removed_in: 13.0.0
why: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
Expand Down Expand Up @@ -42,7 +42,8 @@
type: str
description:
- An address to help identify and reach the client. This is only informational, usually an IP address or hostname.
- If not specified it defaults to non-loopback IPv4 address as determined by Ruby Socket.ip_address_list (provided by Sensu).
- If not specified it defaults to non-loopback IPv4 address as determined by Ruby C(Socket.ip_address_list) (provided by
Sensu).
subscriptions:
type: list
elements: str
Expand All @@ -52,8 +53,8 @@
- The subscriptions array items must be strings.
safe_mode:
description:
- If safe mode is enabled for the client. Safe mode requires local check definitions in order to accept a check request and execute the
check.
- If safe mode is enabled for the client. Safe mode requires local check definitions in order to accept a check request
and execute the check.
type: bool
default: false
redact:
Expand All @@ -73,7 +74,8 @@
keepalive:
type: dict
description:
- The keepalive definition scope, used to configure Sensu client keepalives behavior (for example keepalive thresholds and so).
- The keepalive definition scope, used to configure Sensu client keepalives behavior (for example keepalive thresholds
and so).
registration:
type: dict
description:
Expand Down Expand Up @@ -102,7 +104,8 @@
servicenow:
type: dict
description:
- The servicenow definition scope, used to configure the Sensu Enterprise ServiceNow integration (Sensu Enterprise users only).
- The servicenow definition scope, used to configure the Sensu Enterprise ServiceNow integration (Sensu Enterprise users
only).
"""

EXAMPLES = r"""
Expand Down
5 changes: 3 additions & 2 deletions plugins/modules/sensu_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
short_description: Manages Sensu handler configuration
description:
- Manages Sensu handler configuration.
- 'For more information, refer to the Sensu documentation: U(https://sensuapp.org/docs/latest/reference/handlers.html)'
- 'For more information, refer to the L(Sensu documentation, https://sensuapp.org/docs/latest/reference/handlers.html).'
deprecated:
removed_in: 13.0.0
why: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
Expand Down Expand Up @@ -90,7 +90,8 @@
type: dict
description:
- The socket definition scope, used to configure the TCP/UDP handler socket.
- 'NOTE: the O(socket) attribute is only required for TCP/UDP handlers (that is, handlers configured with O(type=tcp) or O(type=udp)).'
- 'NOTE: the O(socket) attribute is only required for TCP/UDP handlers (that is, handlers configured with O(type=tcp)
or O(type=udp)).'
pipe:
type: dict
description:
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/sensu_silence.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
reason:
type: str
description:
- If specified, this free-form string is used to provide context or rationale for the reason this silence entry was created.
- If specified, this free-form string is used to provide context or rationale for the reason this silence entry was
created.
state:
type: str
description:
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/sensu_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
default: /etc/sensu/conf.d/subscriptions.json
backup:
description:
- Create a backup file (if yes), including the timestamp information so you
can get the original file back if you somehow clobbered it incorrectly.
- Create a backup file (if yes), including the timestamp information so you can get the original file back if you somehow
clobbered it incorrectly.
type: bool
required: false
default: false
Expand Down

0 comments on commit 8208e52

Please sign in to comment.