r*: normalize docs (#9354)

* r*: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Apply suggestions from code review

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/9101/merge
Alexei Znamensky 2024-12-26 09:19:49 +13:00 committed by GitHub
parent 70b62ed745
commit 9751461295
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 1858 additions and 1947 deletions

View File

@ -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: read_csv module: read_csv
short_description: Read a CSV file short_description: Read a CSV file
description: description:
@ -33,8 +32,7 @@ options:
key: key:
description: description:
- The column name used as a key for the resulting dictionary. - The column name used as a key for the resulting dictionary.
- If O(key) is unset, the module returns a list of dictionaries, - If O(key) is unset, the module returns a list of dictionaries, where each dictionary is a row in the CSV file.
where each dictionary is a row in the CSV file.
type: str type: str
dialect: dialect:
description: description:
@ -75,9 +73,9 @@ seealso:
- plugin: ansible.builtin.csvfile - plugin: ansible.builtin.csvfile
plugin_type: lookup plugin_type: lookup
description: Can be used to do selective lookups in CSV files from Jinja. description: Can be used to do selective lookups in CSV files from Jinja.
''' """
EXAMPLES = r''' EXAMPLES = r"""
# Example CSV file with header # Example CSV file with header
# #
# name,uid,gid # name,uid,gid
@ -118,9 +116,9 @@ EXAMPLES = r'''
delimiter: ';' delimiter: ';'
register: users register: users
delegate_to: localhost delegate_to: localhost
''' """
RETURN = r''' RETURN = r"""
dict: dict:
description: The CSV content as a dictionary. description: The CSV content as a dictionary.
returned: success returned: success
@ -145,7 +143,7 @@ list:
- name: jeroen - name: jeroen
uid: 501 uid: 501
gid: 500 gid: 500
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.text.converters import to_native

View File

@ -8,13 +8,11 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: redfish_command module: redfish_command
short_description: Manages Out-Of-Band controllers using Redfish APIs short_description: Manages Out-Of-Band controllers using Redfish APIs
description: description:
- Builds Redfish URIs locally and sends them to remote OOB controllers to - Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action.
perform an action.
- Manages OOB controller ex. reboot, log management. - Manages OOB controller ex. reboot, log management.
- Manages OOB controller users ex. add, remove, update. - Manages OOB controller users ex. add, remove, update.
- Manages system power ex. on, off, graceful and forced reboot. - Manages system power ex. on, off, graceful and forced reboot.
@ -109,8 +107,7 @@ options:
timeout: timeout:
description: description:
- Timeout in seconds for HTTP requests to OOB controller. - Timeout in seconds for HTTP requests to OOB controller.
- The default value for this parameter changed from V(10) to V(60) - The default value for this parameter changed from V(10) to V(60) in community.general 9.0.0.
in community.general 9.0.0.
type: int type: int
default: 60 default: 60
boot_override_mode: boot_override_mode:
@ -219,11 +216,9 @@ options:
update_custom_oem_header: update_custom_oem_header:
required: false required: false
description: description:
- Optional OEM header, sent as separate form-data for - Optional OEM header, sent as separate form-data for the Multipart HTTP push update.
the Multipart HTTP push update. - The header shall start with "Oem" according to DMTF Redfish spec 12.6.2.2.
- The header shall start with "Oem" according to DMTF - For more details, see U(https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.21.0.html).
Redfish spec 12.6.2.2.
- For more details, see U(https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.21.0.html)
- If set, then O(update_custom_oem_params) is required too. - If set, then O(update_custom_oem_params) is required too.
type: str type: str
version_added: '10.1.0' version_added: '10.1.0'
@ -232,18 +227,15 @@ options:
description: description:
- Custom OEM properties for HTTP Multipart Push updates. - Custom OEM properties for HTTP Multipart Push updates.
- If set, then O(update_custom_oem_header) is required too. - If set, then O(update_custom_oem_header) is required too.
- The properties will be passed raw without any validation or conversion by Ansible. - The properties will be passed raw without any validation or conversion by Ansible. This means the content can be a file, a string, or
This means the content can be a file, a string, or any other data. any other data. If the content is a dict that should be converted to JSON, then the content must be converted to JSON before passing it
If the content is a dict that should be converted to JSON, then the to this module using the P(ansible.builtin.to_json#filter) filter.
content must be converted to JSON before passing it to this module using the
P(ansible.builtin.to_json#filter) filter.
type: raw type: raw
version_added: '10.1.0' version_added: '10.1.0'
update_custom_oem_mime_type: update_custom_oem_mime_type:
required: false required: false
description: description:
- MIME Type for custom OEM properties for HTTP Multipart - MIME Type for custom OEM properties for HTTP Multipart Push updates.
Push updates.
type: str type: str
version_added: '10.1.0' version_added: '10.1.0'
virtual_media: virtual_media:
@ -299,10 +291,8 @@ options:
type: str type: str
strip_etag_quotes: strip_etag_quotes:
description: description:
- Removes surrounding quotes of etag used in C(If-Match) header - Removes surrounding quotes of etag used in C(If-Match) header of C(PATCH) requests.
of C(PATCH) requests. - Only use this option to resolve bad vendor implementation where C(If-Match) only matches the unquoted etag string.
- Only use this option to resolve bad vendor implementation where
C(If-Match) only matches the unquoted etag string.
type: bool type: bool
default: false default: false
version_added: 3.7.0 version_added: 3.7.0
@ -336,9 +326,8 @@ options:
required: false required: false
description: description:
- SSL/TLS Ciphers to use for the request. - SSL/TLS Ciphers to use for the request.
- 'When a list is provided, all ciphers are joined in order with V(:).' - When a list is provided, all ciphers are joined in order with V(:).
- See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT) - See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT) for more details.
for more details.
- The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions. - The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions.
type: list type: list
elements: str elements: str
@ -347,9 +336,9 @@ options:
author: author:
- "Jose Delarosa (@jose-delarosa)" - "Jose Delarosa (@jose-delarosa)"
- "T S Kushal (@TSKushal)" - "T S Kushal (@TSKushal)"
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Restart system power gracefully - name: Restart system power gracefully
community.general.redfish_command: community.general.redfish_command:
category: Systems category: Systems
@ -658,8 +647,7 @@ EXAMPLES = '''
username: operator username: operator
password: supersecretpwd password: supersecretpwd
- name: Multipart HTTP push update; timeout is 600 seconds to allow for a - name: Multipart HTTP push update; timeout is 600 seconds to allow for a large image transfer
large image transfer
community.general.redfish_command: community.general.redfish_command:
category: Update category: Update
command: MultipartHTTPPushUpdate command: MultipartHTTPPushUpdate
@ -669,8 +657,7 @@ EXAMPLES = '''
timeout: 600 timeout: 600
update_image_file: ~/images/myupdate.img update_image_file: ~/images/myupdate.img
- name: Multipart HTTP push with additional options; timeout is 600 seconds - name: Multipart HTTP push with additional options; timeout is 600 seconds to allow for a large image transfer
to allow for a large image transfer
community.general.redfish_command: community.general.redfish_command:
category: Update category: Update
command: MultipartHTTPPushUpdate command: MultipartHTTPPushUpdate
@ -777,7 +764,7 @@ EXAMPLES = '''
baseuri: "{{ baseuri }}" baseuri: "{{ baseuri }}"
username: "{{ username }}" username: "{{ username }}"
password: "{{ password }}" password: "{{ password }}"
wait: True wait: true
- name: Restart manager power gracefully - name: Restart manager power gracefully
community.general.redfish_command: community.general.redfish_command:
@ -832,11 +819,11 @@ EXAMPLES = '''
bios_attributes: bios_attributes:
SubNumaClustering: "Disabled" SubNumaClustering: "Disabled"
WorkloadProfile: "Virtualization-MaxPerformance" WorkloadProfile: "Virtualization-MaxPerformance"
''' """
RETURN = ''' RETURN = r"""
msg: msg:
description: Message with action result or error description description: Message with action result or error description.
returned: always returned: always
type: str type: str
sample: "Action was successful" sample: "Action was successful"
@ -854,7 +841,7 @@ return_values:
"status": "New" "status": "New"
} }
} }
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils

View File

@ -8,13 +8,11 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: redfish_config module: redfish_config
short_description: Manages Out-Of-Band controllers using Redfish APIs short_description: Manages Out-Of-Band controllers using Redfish APIs
description: description:
- Builds Redfish URIs locally and sends them to remote OOB controllers to - Builds Redfish URIs locally and sends them to remote OOB controllers to set or update a configuration attribute.
set or update a configuration attribute.
- Manages BIOS configuration settings. - Manages BIOS configuration settings.
- Manages OOB controller configuration settings. - Manages OOB controller configuration settings.
extends_documentation_fragment: extends_documentation_fragment:
@ -64,8 +62,7 @@ options:
timeout: timeout:
description: description:
- Timeout in seconds for HTTP requests to OOB controller. - Timeout in seconds for HTTP requests to OOB controller.
- The default value for this parameter changed from V(10) to V(60) - The default value for this parameter changed from V(10) to V(60) in community.general 9.0.0.
in community.general 9.0.0.
type: int type: int
default: 60 default: 60
boot_order: boot_order:
@ -111,10 +108,8 @@ options:
version_added: '0.2.0' version_added: '0.2.0'
strip_etag_quotes: strip_etag_quotes:
description: description:
- Removes surrounding quotes of etag used in C(If-Match) header - Removes surrounding quotes of etag used in C(If-Match) header of C(PATCH) requests.
of C(PATCH) requests. - Only use this option to resolve bad vendor implementation where C(If-Match) only matches the unquoted etag string.
- Only use this option to resolve bad vendor implementation where
C(If-Match) only matches the unquoted etag string.
type: bool type: bool
default: false default: false
version_added: 3.7.0 version_added: 3.7.0
@ -165,15 +160,14 @@ options:
description: description:
- Setting parameter to enable or disable SecureBoot. - Setting parameter to enable or disable SecureBoot.
type: bool type: bool
default: True default: true
version_added: '7.5.0' version_added: '7.5.0'
volume_details: volume_details:
required: false required: false
description: description:
- Setting dict of volume to be created. - Setting dict of volume to be created.
- If C(CapacityBytes) key is not specified in this dictionary, the size of - If C(CapacityBytes) key is not specified in this dictionary, the size of the volume will be determined by the Redfish service. It is possible
the volume will be determined by the Redfish service. It is possible the the size will not be the maximum available size.
size will not be the maximum available size.
type: dict type: dict
default: {} default: {}
version_added: '7.5.0' version_added: '7.5.0'
@ -181,9 +175,8 @@ options:
required: false required: false
description: description:
- SSL/TLS Ciphers to use for the request. - SSL/TLS Ciphers to use for the request.
- 'When a list is provided, all ciphers are joined in order with V(:).' - When a list is provided, all ciphers are joined in order with V(:).
- See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT) - See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT) for more details.
for more details.
- The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions. - The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions.
type: list type: list
elements: str elements: str
@ -192,9 +185,9 @@ options:
author: author:
- "Jose Delarosa (@jose-delarosa)" - "Jose Delarosa (@jose-delarosa)"
- "T S Kushal (@TSKushal)" - "T S Kushal (@TSKushal)"
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Set BootMode to UEFI - name: Set BootMode to UEFI
community.general.redfish_config: community.general.redfish_config:
category: Systems category: Systems
@ -338,7 +331,7 @@ EXAMPLES = '''
baseuri: "{{ baseuri }}" baseuri: "{{ baseuri }}"
username: "{{ username }}" username: "{{ username }}"
password: "{{ password }}" password: "{{ password }}"
secure_boot_enable: True secure_boot_enable: true
- name: Delete All Volumes - name: Delete All Volumes
community.general.redfish_config: community.general.redfish_config:
@ -372,15 +365,15 @@ EXAMPLES = '''
baseuri: "{{ baseuri }}" baseuri: "{{ baseuri }}"
username: "{{ username }}" username: "{{ username }}"
password: "{{ password }}" password: "{{ password }}"
''' """
RETURN = ''' RETURN = r"""
msg: msg:
description: Message with action result or error description description: Message with action result or error description.
returned: always returned: always
type: str type: str
sample: "Action was successful" sample: "Action was successful"
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils

View File

@ -8,13 +8,11 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: redfish_info module: redfish_info
short_description: Manages Out-Of-Band controllers using Redfish APIs short_description: Manages Out-Of-Band controllers using Redfish APIs
description: description:
- Builds Redfish URIs locally and sends them to remote OOB controllers to - Builds Redfish URIs locally and sends them to remote OOB controllers to get information back.
get information back.
- Information retrieved is placed in a location specified by the user. - Information retrieved is placed in a location specified by the user.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
@ -63,8 +61,7 @@ options:
timeout: timeout:
description: description:
- Timeout in seconds for HTTP requests to OOB controller. - Timeout in seconds for HTTP requests to OOB controller.
- The default value for this parameter changed from V(10) to V(60) - The default value for this parameter changed from V(10) to V(60) in community.general 9.0.0.
in community.general 9.0.0.
type: int type: int
default: 60 default: 60
update_handle: update_handle:
@ -77,18 +74,17 @@ options:
required: false required: false
description: description:
- SSL/TLS Ciphers to use for the request. - SSL/TLS Ciphers to use for the request.
- 'When a list is provided, all ciphers are joined in order with V(:).' - When a list is provided, all ciphers are joined in order with V(:).
- See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT) - See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT) for more details.
for more details.
- The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions. - The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions.
type: list type: list
elements: str elements: str
version_added: 9.2.0 version_added: 9.2.0
author: "Jose Delarosa (@jose-delarosa)" author: "Jose Delarosa (@jose-delarosa)"
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Get CPU inventory - name: Get CPU inventory
community.general.redfish_info: community.general.redfish_info:
category: Systems category: Systems
@ -380,15 +376,15 @@ EXAMPLES = '''
password: "{{ password }}" password: "{{ password }}"
timeout: 5 timeout: 5
register: result register: result
''' """
RETURN = ''' RETURN = r"""
result: result:
description: different results depending on task description: Different results depending on task.
returned: always returned: always
type: dict type: dict
sample: List of CPUs on system sample: List of CPUs on system
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils

View File

@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: redhat_subscription module: redhat_subscription
short_description: Manage registration and subscriptions to RHSM using C(subscription-manager) short_description: Manage registration and subscriptions to RHSM using C(subscription-manager)
description: description:
@ -19,7 +18,7 @@ description:
registering using D-Bus if possible. registering using D-Bus if possible.
author: "Barnaby Court (@barnabycourt)" author: "Barnaby Court (@barnabycourt)"
notes: notes:
- | - >-
The module tries to use the D-Bus C(rhsm) service (part of C(subscription-manager)) The module tries to use the D-Bus C(rhsm) service (part of C(subscription-manager))
to register, starting from community.general 6.5.0: this is done so credentials to register, starting from community.general 6.5.0: this is done so credentials
(username, password, activation keys) can be passed to C(rhsm) in a secure way. (username, password, activation keys) can be passed to C(rhsm) in a secure way.
@ -43,8 +42,7 @@ notes:
and modifying the C(syspurpose) attributes (using O(syspurpose)). and modifying the C(syspurpose) attributes (using O(syspurpose)).
requirements: requirements:
- subscription-manager - subscription-manager
- Optionally the C(dbus) Python library; this is usually included in the OS - Optionally the C(dbus) Python library; this is usually included in the OS as it is used by C(subscription-manager).
as it is used by C(subscription-manager).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -55,21 +53,21 @@ attributes:
options: options:
state: state:
description: description:
- whether to register and subscribe (V(present)), or unregister (V(absent)) a system - Whether to register and subscribe (V(present)), or unregister (V(absent)) a system.
choices: ["present", "absent"] choices: ["present", "absent"]
default: "present" default: "present"
type: str type: str
username: username:
description: description:
- access.redhat.com or Red Hat Satellite or Katello username - Access.redhat.com or Red Hat Satellite or Katello username.
type: str type: str
password: password:
description: description:
- access.redhat.com or Red Hat Satellite or Katello password - Access.redhat.com or Red Hat Satellite or Katello password.
type: str type: str
token: token:
description: description:
- sso.redhat.com API access token. - Sso.redhat.com API access token.
type: str type: str
version_added: 6.3.0 version_added: 6.3.0
server_hostname: server_hostname:
@ -92,11 +90,11 @@ options:
version_added: 3.3.0 version_added: 3.3.0
rhsm_baseurl: rhsm_baseurl:
description: description:
- Specify CDN baseurl - Specify CDN baseurl.
type: str type: str
rhsm_repo_ca_cert: rhsm_repo_ca_cert:
description: description:
- Specify an alternative location for a CA certificate for CDN - Specify an alternative location for a CA certificate for CDN.
type: str type: str
server_proxy_hostname: server_proxy_hostname:
description: description:
@ -113,100 +111,91 @@ options:
type: str type: str
server_proxy_user: server_proxy_user:
description: description:
- Specify a user for HTTP proxy with basic authentication - Specify a user for HTTP proxy with basic authentication.
type: str type: str
server_proxy_password: server_proxy_password:
description: description:
- Specify a password for HTTP proxy with basic authentication - Specify a password for HTTP proxy with basic authentication.
type: str type: str
auto_attach: auto_attach:
description: description:
- Upon successful registration, auto-consume available subscriptions - Upon successful registration, auto-consume available subscriptions.
- | - "Please note that the alias O(ignore:autosubscribe) was removed in community.general 9.0.0."
Please note that the alias O(ignore:autosubscribe) was removed in
community.general 9.0.0.
type: bool type: bool
activationkey: activationkey:
description: description:
- supply an activation key for use with registration - Supply an activation key for use with registration.
type: str type: str
org_id: org_id:
description: description:
- Organization ID to use in conjunction with activationkey - Organization ID to use in conjunction with activationkey.
type: str type: str
environment: environment:
description: description:
- Register with a specific environment in the destination org. Used with Red Hat Satellite or Katello - Register with a specific environment in the destination org. Used with Red Hat Satellite or Katello.
type: str type: str
pool_ids: pool_ids:
description: description:
- | - "Specify subscription pool IDs to consume.
Specify subscription pool IDs to consume. - A pool ID may be specified as a C(string) - just the pool ID (for example V(0123456789abcdef0123456789abcdef)),
A pool ID may be specified as a C(string) - just the pool ID (for example V(0123456789abcdef0123456789abcdef)), or as a C(dict) with the pool ID as the key, and a quantity as the value (for example V(0123456789abcdef0123456789abcdef: 2). If the
or as a C(dict) with the pool ID as the key, and a quantity as the value (for example quantity is provided, it is used to consume multiple entitlements from a pool (the pool must support this)."
V(0123456789abcdef0123456789abcdef: 2). If the quantity is provided, it is used to consume multiple
entitlements from a pool (the pool must support this).
default: [] default: []
type: list type: list
elements: raw elements: raw
consumer_type: consumer_type:
description: description:
- The type of unit to register, defaults to system - The type of unit to register, defaults to system.
type: str type: str
consumer_name: consumer_name:
description: description:
- Name of the system to register, defaults to the hostname - Name of the system to register, defaults to the hostname.
type: str type: str
consumer_id: consumer_id:
description: description:
- | - "References an existing consumer ID to resume using a previous registration for this system. If the system's identity certificate is
References an existing consumer ID to resume using a previous registration lost or corrupted, this option allows it to resume using its previous identity and subscriptions. The default is to not specify a consumer
for this system. If the system's identity certificate is lost or corrupted, ID so a new ID is created."
this option allows it to resume using its previous identity and subscriptions.
The default is to not specify a consumer ID so a new ID is created.
type: str type: str
force_register: force_register:
description: description:
- Register the system even if it is already registered - Register the system even if it is already registered.
type: bool type: bool
default: false default: false
release: release:
description: description:
- Set a release version - Set a release version.
type: str type: str
syspurpose: syspurpose:
description: description:
- Set syspurpose attributes in file C(/etc/rhsm/syspurpose/syspurpose.json) - Set syspurpose attributes in file C(/etc/rhsm/syspurpose/syspurpose.json) and synchronize these attributes with RHSM server. Syspurpose
and synchronize these attributes with RHSM server. Syspurpose attributes help attach attributes help attach the most appropriate subscriptions to the system automatically. When C(syspurpose.json) file already contains some
the most appropriate subscriptions to the system automatically. When C(syspurpose.json) file attributes, then new attributes overwrite existing attributes. When some attribute is not listed in the new list of attributes, the existing
already contains some attributes, then new attributes overwrite existing attributes.
When some attribute is not listed in the new list of attributes, the existing
attribute will be removed from C(syspurpose.json) file. Unknown attributes are ignored. attribute will be removed from C(syspurpose.json) file. Unknown attributes are ignored.
type: dict type: dict
suboptions: suboptions:
usage: usage:
description: Syspurpose attribute usage description: Syspurpose attribute usage.
type: str type: str
role: role:
description: Syspurpose attribute role description: Syspurpose attribute role.
type: str type: str
service_level_agreement: service_level_agreement:
description: Syspurpose attribute service_level_agreement description: Syspurpose attribute service_level_agreement.
type: str type: str
addons: addons:
description: Syspurpose attribute addons description: Syspurpose attribute addons.
type: list type: list
elements: str elements: str
sync: sync:
description: description:
- When this option is V(true), then syspurpose attributes are synchronized with - When this option is V(true), then syspurpose attributes are synchronized with RHSM server immediately. When this option is V(false),
RHSM server immediately. When this option is V(false), then syspurpose attributes then syspurpose attributes will be synchronized with RHSM server by rhsmcertd daemon.
will be synchronized with RHSM server by rhsmcertd daemon.
type: bool type: bool
default: false default: false
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Register as user (joe_user) with password (somepass) and auto-subscribe to available content. - name: Register as user (joe_user) with password (somepass) and auto-subscribe to available content.
community.general.redhat_subscription: community.general.redhat_subscription:
state: present state: present
@ -275,17 +264,15 @@ EXAMPLES = '''
- addon1 - addon1
- addon2 - addon2
sync: true sync: true
''' """
RETURN = ''' RETURN = r"""
subscribed_pool_ids: subscribed_pool_ids:
description: List of pool IDs to which system is now subscribed description: List of pool IDs to which system is now subscribed.
returned: success returned: success
type: dict type: dict
sample: { sample: {"8a85f9815ab905d3015ab928c7005de4": "1"}
"8a85f9815ab905d3015ab928c7005de4": "1" """
}
'''
from os.path import isfile from os.path import isfile
from os import getuid, unlink from os import getuid, unlink

View File

@ -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 = ''' DOCUMENTATION = r"""
---
module: redis module: redis
short_description: Various redis commands, replica and flush short_description: Various redis commands, replica and flush
description: description:
@ -25,10 +24,10 @@ attributes:
options: options:
command: command:
description: description:
- The selected redis command - The selected redis command.
- V(config) ensures a configuration setting on an instance. - V(config) ensures a configuration setting on an instance.
- V(flush) flushes all the instance or a specified db. - V(flush) flushes all the instance or a specified db.
- V(replica) sets a redis instance in replica or master mode. (V(slave) is an alias for V(replica).) - V(replica) sets a redis instance in replica or master mode. (V(slave) is an alias for V(replica)).
choices: [config, flush, replica, slave] choices: [config, flush, replica, slave]
type: str type: str
tls: tls:
@ -42,15 +41,15 @@ options:
version_added: 4.6.0 version_added: 4.6.0
master_host: master_host:
description: description:
- The host of the master instance [replica command] - The host of the master instance [replica command].
type: str type: str
master_port: master_port:
description: description:
- The port of the master instance [replica command] - The port of the master instance [replica command].
type: int type: int
replica_mode: replica_mode:
description: description:
- The mode of the redis instance [replica command] - The mode of the redis instance [replica command].
- V(slave) is an alias for V(replica). - V(slave) is an alias for V(replica).
default: replica default: replica
choices: [master, replica, slave] choices: [master, replica, slave]
@ -59,12 +58,11 @@ options:
- slave_mode - slave_mode
db: db:
description: description:
- The database to flush (used in db mode) [flush command] - The database to flush (used in DB mode) [flush command].
type: int type: int
flush_mode: flush_mode:
description: description:
- Type of flush (all the dbs in a redis instance or a specific one) - Type of flush (all the DBs in a redis instance or a specific one) [flush command].
[flush command]
default: all default: all
choices: [all, db] choices: [all, db]
type: str type: str
@ -74,25 +72,21 @@ options:
type: str type: str
value: value:
description: description:
- A redis config value. When memory size is needed, it is possible - A redis config value. When memory size is needed, it is possible to specify it in the usual form of 1KB, 2M, 400MB where the base is 1024.
to specify it in the usual form of 1KB, 2M, 400MB where the base is 1024. Units are case insensitive, in other words 1m = 1mb = 1M = 1MB.
Units are case insensitive i.e. 1m = 1mb = 1M = 1MB.
type: str type: str
notes: notes:
- Requires the redis-py Python package on the remote host. You can - Requires the C(redis-py) Python package on the remote host. You can install it with pip
install it with pip (pip install redis) or with a package manager. (C(pip install redis)) or with a package manager. U(https://github.com/andymccurdy/redis-py).
https://github.com/andymccurdy/redis-py - If the redis master instance you are making replica of is password protected this needs to be in the C(redis.conf) in the C(masterauth) variable.
- If the redis master instance we are making replica of is password protected
this needs to be in the redis.conf in the masterauth variable
seealso: seealso:
- module: community.general.redis_info - module: community.general.redis_info
requirements: [redis] requirements: [redis]
author: "Xabier Larrakoetxea (@slok)" author: "Xabier Larrakoetxea (@slok)"
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Set local redis instance to be a replica of melee.island on port 6377 - name: Set local redis instance to be a replica of melee.island on port 6377
community.general.redis: community.general.redis:
command: replica command: replica
@ -142,7 +136,7 @@ EXAMPLES = '''
ca_certs: /etc/redis/certs/ca.crt ca_certs: /etc/redis/certs/ca.crt
client_cert_file: /etc/redis/certs/redis.crt client_cert_file: /etc/redis/certs/redis.crt
client_key_file: /etc/redis/certs/redis.key client_key_file: /etc/redis/certs/redis.key
''' """
import traceback import traceback

View File

@ -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 = ''' DOCUMENTATION = r"""
---
module: redis_data module: redis_data
short_description: Set key value pairs in Redis short_description: Set key value pairs in Redis
version_added: 3.7.0 version_added: 3.7.0
@ -34,8 +33,7 @@ options:
type: str type: str
expiration: expiration:
description: description:
- Expiration time in milliseconds. - Expiration time in milliseconds. Setting this flag will always result in a change in the database.
Setting this flag will always result in a change in the database.
required: false required: false
type: int type: int
non_existing: non_existing:
@ -70,9 +68,9 @@ seealso:
- module: community.general.redis_data_incr - module: community.general.redis_data_incr
- module: community.general.redis_data_info - module: community.general.redis_data_info
- module: community.general.redis - module: community.general.redis
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Set key foo=bar on localhost with no username - name: Set key foo=bar on localhost with no username
community.general.redis_data: community.general.redis_data:
login_host: localhost login_host: localhost
@ -116,9 +114,9 @@ EXAMPLES = '''
login_password: supersecret login_password: supersecret
key: foo key: foo
state: absent state: absent
''' """
RETURN = ''' RETURN = r"""
old_value: old_value:
description: Value of key before setting. description: Value of key before setting.
returned: on_success if O(state=present) and key exists in database. returned: on_success if O(state=present) and key exists in database.
@ -134,7 +132,7 @@ msg:
returned: always returned: always
type: str type: str
sample: 'Set key: foo to bar' sample: 'Set key: foo to bar'
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.redis import ( from ansible_collections.community.general.plugins.module_utils.redis import (

View File

@ -8,24 +8,22 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: redis_data_incr module: redis_data_incr
short_description: Increment keys in Redis short_description: Increment keys in Redis
version_added: 4.0.0 version_added: 4.0.0
description: description:
- Increment integers or float keys in Redis database and get new value. - Increment integers or float keys in Redis database and get new value.
- Default increment for all keys is 1. For specific increments use the - Default increment for all keys is V(1). For specific increments use the O(increment_int) and O(increment_float) options.
O(increment_int) and O(increment_float) options.
author: "Andreas Botzner (@paginabianca)" author: "Andreas Botzner (@paginabianca)"
attributes: attributes:
check_mode: check_mode:
support: partial support: partial
details: details:
- For C(check_mode) to work, the specified O(login_user) needs permission to - For C(check_mode) to work, the specified O(login_user) needs permission to run the C(GET) command on the key, otherwise the module will
run the C(GET) command on the key, otherwise the module will fail. fail.
- When using C(check_mode) the module will try to calculate the value that - When using C(check_mode) the module will try to calculate the value that Redis would return. If the key is not present, V(0.0) is used as
Redis would return. If the key is not present, 0.0 is used as value. value.
diff_mode: diff_mode:
support: none support: none
options: options:
@ -42,8 +40,7 @@ options:
increment_float: increment_float:
description: description:
- Float amount to increment the key by. - Float amount to increment the key by.
- This only works with keys that contain float values - This only works with keys that contain float values in their string representation.
in their string representation.
type: float type: float
required: false required: false
@ -56,9 +53,9 @@ seealso:
- module: community.general.redis_data - module: community.general.redis_data
- module: community.general.redis_data_info - module: community.general.redis_data_info
- module: community.general.redis - module: community.general.redis
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Increment integer key foo on localhost with no username and print new value - name: Increment integer key foo on localhost with no username and print new value
community.general.redis_data_incr: community.general.redis_data_incr:
login_host: localhost login_host: localhost
@ -77,11 +74,11 @@ EXAMPLES = '''
login_password: somepass login_password: somepass
key: foo key: foo
increment_float: '20.4' increment_float: '20.4'
''' """
RETURN = ''' RETURN = r"""
value: value:
description: Incremented value of key description: Incremented value of key.
returned: on success returned: on success
type: float type: float
sample: '4039.4' sample: '4039.4'
@ -90,7 +87,7 @@ msg:
returned: always returned: always
type: str type: str
sample: 'Incremented key: foo by 20.4 to 65.9' sample: 'Incremented key: foo by 20.4 to 65.9'
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.redis import ( from ansible_collections.community.general.plugins.module_utils.redis import (

View File

@ -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 = ''' DOCUMENTATION = r"""
---
module: redis_data_info module: redis_data_info
short_description: Get value of key in Redis database short_description: Get value of key in Redis database
version_added: 3.7.0 version_added: 3.7.0
@ -33,9 +32,9 @@ seealso:
- module: community.general.redis_data_incr - module: community.general.redis_data_incr
- module: community.general.redis_info - module: community.general.redis_info
- module: community.general.redis - module: community.general.redis
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Get key foo=bar from loalhost with no username - name: Get key foo=bar from loalhost with no username
community.general.redis_data_info: community.general.redis_data_info:
login_host: localhost login_host: localhost
@ -50,9 +49,9 @@ EXAMPLES = '''
validate_certs: true validate_certs: true
ssl_ca_certs: /path/to/ca/certs ssl_ca_certs: /path/to/ca/certs
key: foo key: foo
''' """
RETURN = ''' RETURN = r"""
exists: exists:
description: If they key exists in the database. description: If they key exists in the database.
returned: on success returned: on success
@ -67,7 +66,7 @@ msg:
returned: always returned: always
type: str type: str
sample: 'Got key: foo with value: bar' sample: 'Got key: foo with value: bar'
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.redis import ( from ansible_collections.community.general.plugins.module_utils.redis import (

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: redis_info module: redis_info
short_description: Gather information about Redis servers short_description: Gather information about Redis servers
version_added: '0.2.0' version_added: '0.2.0'
@ -38,9 +37,9 @@ options:
seealso: seealso:
- module: community.general.redis - module: community.general.redis
author: "Pavlo Bashynskyi (@levonet)" author: "Pavlo Bashynskyi (@levonet)"
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Get server information - name: Get server information
community.general.redis_info: community.general.redis_info:
register: result register: result
@ -57,9 +56,9 @@ EXAMPLES = r'''
- name: Print server cluster information - name: Print server cluster information
ansible.builtin.debug: ansible.builtin.debug:
var: result.cluster_info var: result.cluster_info
''' """
RETURN = r''' RETURN = r"""
info: info:
description: The default set of server information sections U(https://redis.io/commands/info). description: The default set of server information sections U(https://redis.io/commands/info).
returned: success returned: success
@ -211,7 +210,7 @@ cluster:
"cluster_stats_messages_received": 1483968, "cluster_stats_messages_received": 1483968,
"total_cluster_links_buffer_limit_exceeded": 0 "total_cluster_links_buffer_limit_exceeded": 0
} }
''' """
import traceback import traceback

View File

@ -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: rhevm module: rhevm
short_description: RHEV/oVirt automation short_description: RHEV/oVirt automation
description: description:
@ -119,12 +118,12 @@ options:
default: true default: true
disks: disks:
description: description:
- This option uses complex arguments and is a list of disks with the options name, size and domain. - This option uses complex arguments and is a list of disks with the options V(name), V(size), and V(domain).
type: list type: list
elements: str elements: str
ifaces: ifaces:
description: description:
- This option uses complex arguments and is a list of interfaces with the options name and vlan. - This option uses complex arguments and is a list of interfaces with the options V(name) and V(vlan).
type: list type: list
elements: str elements: str
aliases: [interfaces, nics] aliases: [interfaces, nics]
@ -150,9 +149,9 @@ options:
- When O(state=down). - When O(state=down).
- When O(state=restarted). - When O(state=restarted).
type: int type: int
''' """
RETURN = r''' RETURN = r"""
vm: vm:
description: Returns all of the VMs variables and execution. description: Returns all of the VMs variables and execution.
returned: always returned: always
@ -216,9 +215,9 @@ vm:
"vmhost": "host416", "vmhost": "host416",
"vmmem": "16" "vmmem": "16"
} }
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Basic get info from VM - name: Basic get info from VM
community.general.rhevm: community.general.rhevm:
server: rhevm01 server: rhevm01
@ -328,7 +327,7 @@ EXAMPLES = r'''
- name: bond0.38 - name: bond0.38
network: vlan38 network: vlan38
state: present state: present
''' """
import time import time

View File

@ -8,18 +8,15 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: rhsm_release module: rhsm_release
short_description: Set or Unset RHSM Release version short_description: Set or Unset RHSM Release version
description: description:
- Sets or unsets the release version used by RHSM repositories. - Sets or unsets the release version used by RHSM repositories.
notes: notes:
- This module will fail on an unregistered system. - This module will fail on an unregistered system. Use the M(community.general.redhat_subscription) module to register a system prior to setting
Use the M(community.general.redhat_subscription) module to register a system the RHSM release.
prior to setting the RHSM release. - It is possible to interact with C(subscription-manager) only as root, so root permissions are required to successfully run this module.
- It is possible to interact with C(subscription-manager) only as root,
so root permissions are required to successfully run this module.
requirements: requirements:
- Red Hat Enterprise Linux 6+ with subscription-manager installed - Red Hat Enterprise Linux 6+ with subscription-manager installed
extends_documentation_fragment: extends_documentation_fragment:
@ -37,9 +34,9 @@ options:
type: str type: str
author: author:
- Sean Myers (@seandst) - Sean Myers (@seandst)
''' """
EXAMPLES = ''' EXAMPLES = r"""
# Set release version to 7.1 # Set release version to 7.1
- name: Set RHSM release version - name: Set RHSM release version
community.general.rhsm_release: community.general.rhsm_release:
@ -53,15 +50,15 @@ EXAMPLES = '''
# Unset release version # Unset release version
- name: Unset RHSM release release - name: Unset RHSM release release
community.general.rhsm_release: community.general.rhsm_release:
release: null release:
''' """
RETURN = ''' RETURN = r"""
current_release: current_release:
description: The current RHSM release version value description: The current RHSM release version value.
returned: success returned: success
type: str type: str
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -8,20 +8,16 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: rhsm_repository module: rhsm_repository
short_description: Manage RHSM repositories using the subscription-manager command short_description: Manage RHSM repositories using the subscription-manager command
description: description:
- Manage (Enable/Disable) RHSM repositories to the Red Hat Subscription - Manage (Enable/Disable) RHSM repositories to the Red Hat Subscription Management entitlement platform using the C(subscription-manager) command.
Management entitlement platform using the C(subscription-manager) command.
author: Giovanni Sciortino (@giovannisciortino) author: Giovanni Sciortino (@giovannisciortino)
notes: notes:
- In order to manage RHSM repositories the system must be already registered - In order to manage RHSM repositories the system must be already registered to RHSM manually or using the Ansible M(community.general.redhat_subscription)
to RHSM manually or using the Ansible M(community.general.redhat_subscription) module. module.
- It is possible to interact with C(subscription-manager) only as root, - It is possible to interact with C(subscription-manager) only as root, so root permissions are required to successfully run this module.
so root permissions are required to successfully run this module.
requirements: requirements:
- subscription-manager - subscription-manager
extends_documentation_fragment: extends_documentation_fragment:
@ -34,31 +30,27 @@ attributes:
options: options:
state: state:
description: description:
- If state is equal to present or disabled, indicates the desired - If state is equal to present or disabled, indicates the desired repository state.
repository state. - In community.general 10.0.0 the states V(present) and V(absent) have been removed. Please use V(enabled) and V(disabled) instead.
- In community.general 10.0.0 the states V(present) and V(absent) have been
removed. Please use V(enabled) and V(disabled) instead.
choices: [enabled, disabled] choices: [enabled, disabled]
default: "enabled" default: "enabled"
type: str type: str
name: name:
description: description:
- The ID of repositories to enable. - The ID of repositories to enable.
- To operate on several repositories this can accept a comma separated - To operate on several repositories this can accept a comma separated list or a YAML list.
list or a YAML list.
required: true required: true
type: list type: list
elements: str elements: str
purge: purge:
description: description:
- Disable all currently enabled repositories that are not not specified in O(name). - Disable all currently enabled repositories that are not not specified in O(name). Only set this to V(true) if passing in a list of repositories
Only set this to V(true) if passing in a list of repositories to the O(name) field. to the O(name) field. Using this with C(loop) will most likely not have the desired result.
Using this with C(loop) will most likely not have the desired result.
type: bool type: bool
default: false default: false
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Enable a RHSM repository - name: Enable a RHSM repository
community.general.rhsm_repository: community.general.rhsm_repository:
name: rhel-7-server-rpms name: rhel-7-server-rpms
@ -77,16 +69,16 @@ EXAMPLES = '''
community.general.rhsm_repository: community.general.rhsm_repository:
name: rhel-7-server-rpms name: rhel-7-server-rpms
purge: true purge: true
''' """
RETURN = ''' RETURN = r"""
repositories: repositories:
description: description:
- The list of RHSM repositories with their states. - The list of RHSM repositories with their states.
- When this module is used to change the repository states, this list contains the updated states after the changes. - When this module is used to change the repository states, this list contains the updated states after the changes.
returned: success returned: success
type: list type: list
''' """
import os import os
from fnmatch import fnmatch from fnmatch import fnmatch

View File

@ -9,13 +9,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: riak module: riak
short_description: This module handles some common Riak operations short_description: This module handles some common Riak operations
description: description:
- This module can be used to join nodes to a cluster, check - This module can be used to join nodes to a cluster, check the status of the cluster.
the status of the cluster.
author: author:
- "James Martin (@jsmartin)" - "James Martin (@jsmartin)"
- "Drew Kerrigan (@drewkerrigan)" - "Drew Kerrigan (@drewkerrigan)"
@ -34,17 +32,17 @@ options:
type: str type: str
config_dir: config_dir:
description: description:
- The path to the riak configuration directory - The path to the riak configuration directory.
default: /etc/riak default: /etc/riak
type: path type: path
http_conn: http_conn:
description: description:
- The ip address and port that is listening for Riak HTTP queries - The ip address and port that is listening for Riak HTTP queries.
default: 127.0.0.1:8098 default: 127.0.0.1:8098
type: str type: str
target_node: target_node:
description: description:
- The target node for certain operations (join, ping) - The target node for certain operations (join, ping).
default: riak@127.0.0.1 default: riak@127.0.0.1
type: str type: str
wait_for_handoffs: wait_for_handoffs:
@ -64,13 +62,12 @@ options:
type: str type: str
validate_certs: validate_certs:
description: description:
- If V(false), SSL certificates will not be validated. This should only be used - If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
on personally controlled sites using self-signed certificates.
type: bool type: bool
default: true default: true
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: "Join's a Riak node to another node" - name: "Join's a Riak node to another node"
community.general.riak: community.general.riak:
command: join command: join
@ -83,7 +80,7 @@ EXAMPLES = '''
- name: Wait for riak_kv service to startup - name: Wait for riak_kv service to startup
community.general.riak: community.general.riak:
wait_for_service: kv wait_for_service: kv
''' """
import json import json
import time import time

View File

@ -12,11 +12,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
module: rocketchat module: rocketchat
short_description: Send notifications to Rocket Chat short_description: Send notifications to Rocket Chat
description: description:
- The C(rocketchat) module sends notifications to Rocket Chat via the Incoming WebHook integration - This module sends notifications to Rocket Chat through the Incoming WebHook integration.
author: "Ramon de la Fuente (@ramondelafuente)" author: "Ramon de la Fuente (@ramondelafuente)"
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
@ -29,15 +29,12 @@ options:
domain: domain:
type: str type: str
description: description:
- The domain for your environment without protocol. (For example - The domain for your environment without protocol. (For example V(example.com) or V(chat.example.com)).
V(example.com) or V(chat.example.com).)
required: true required: true
token: token:
type: str type: str
description: description:
- Rocket Chat Incoming Webhook integration token. This provides - Rocket Chat Incoming Webhook integration token. This provides authentication to Rocket Chat's Incoming webhook for posting messages.
authentication to Rocket Chat's Incoming webhook for posting
messages.
required: true required: true
protocol: protocol:
type: str type: str
@ -54,8 +51,8 @@ options:
channel: channel:
type: str type: str
description: description:
- Channel to send the message to. If absent, the message goes to the channel selected for the O(token) - Channel to send the message to. If absent, the message goes to the channel selected for the O(token) specified during the creation of
specified during the creation of webhook. webhook.
username: username:
type: str type: str
description: description:
@ -69,8 +66,7 @@ options:
icon_emoji: icon_emoji:
type: str type: str
description: description:
- Emoji for the message sender. The representation for the available emojis can be - Emoji for the message sender. The representation for the available emojis can be got from Rocket Chat.
got from Rocket Chat.
- For example V(:thumbsup:). - For example V(:thumbsup:).
- If O(icon_emoji) is set, O(icon_url) will not be used. - If O(icon_emoji) is set, O(icon_url) will not be used.
link_names: link_names:
@ -83,14 +79,13 @@ options:
- 0 - 0
validate_certs: validate_certs:
description: description:
- If V(false), SSL certificates will not be validated. This should only be used - If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
on personally controlled sites using self-signed certificates.
type: bool type: bool
default: true default: true
color: color:
type: str type: str
description: description:
- Allow text to use default colors - use the default of 'normal' to not send a custom color bar at the start of the message - Allow text to use default colors - use the default of V(normal) to not send a custom color bar at the start of the message.
default: 'normal' default: 'normal'
choices: choices:
- 'normal' - 'normal'
@ -102,17 +97,17 @@ options:
elements: dict elements: dict
description: description:
- Define a list of attachments. - Define a list of attachments.
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Send notification message via Rocket Chat - name: Send notification message through Rocket Chat
community.general.rocketchat: community.general.rocketchat:
token: thetoken/generatedby/rocketchat token: thetoken/generatedby/rocketchat
domain: chat.example.com domain: chat.example.com
msg: '{{ inventory_hostname }} completed' msg: '{{ inventory_hostname }} completed'
delegate_to: localhost delegate_to: localhost
- name: Send notification message via Rocket Chat all options - name: Send notification message through Rocket Chat all options
community.general.rocketchat: community.general.rocketchat:
domain: chat.example.com domain: chat.example.com
token: thetoken/generatedby/rocketchat token: thetoken/generatedby/rocketchat
@ -151,7 +146,7 @@ EXAMPLES = """
delegate_to: localhost delegate_to: localhost
""" """
RETURN = """ RETURN = r"""
changed: changed:
description: A flag indicating if any change was made or not. description: A flag indicating if any change was made or not.
returned: success returned: success

View File

@ -9,14 +9,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: rollbar_deployment module: rollbar_deployment
author: "Max Riveiro (@kavu)" author: "Max Riveiro (@kavu)"
short_description: Notify Rollbar about app deployments short_description: Notify Rollbar about app deployments
description: description:
- Notify Rollbar about app deployments - Notify Rollbar about app deployments (see U(https://rollbar.com/docs/deploys_other/)).
(see https://rollbar.com/docs/deploys_other/)
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -33,7 +31,7 @@ options:
environment: environment:
type: str type: str
description: description:
- Name of the environment being deployed, e.g. 'production'. - Name of the environment being deployed, for example V(production).
required: true required: true
revision: revision:
type: str type: str
@ -53,7 +51,7 @@ options:
comment: comment:
type: str type: str
description: description:
- Deploy comment (e.g. what is being deployed). - Deploy comment (for example what is being deployed).
required: false required: false
url: url:
type: str type: str
@ -63,15 +61,14 @@ options:
default: 'https://api.rollbar.com/api/1/deploy/' default: 'https://api.rollbar.com/api/1/deploy/'
validate_certs: validate_certs:
description: description:
- If V(false), SSL certificates for the target url will not be validated. - If V(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using
This should only be used on personally controlled sites using
self-signed certificates. self-signed certificates.
required: false required: false
default: true default: true
type: bool type: bool
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Rollbar deployment notification - name: Rollbar deployment notification
community.general.rollbar_deployment: community.general.rollbar_deployment:
token: AAAAAA token: AAAAAA
@ -87,7 +84,7 @@ EXAMPLES = '''
environment: production environment: production
revision: "{{ lookup('pipe', 'git rev-parse HEAD') }}" revision: "{{ lookup('pipe', 'git rev-parse HEAD') }}"
user: "{{ lookup('env', 'USER') }}" user: "{{ lookup('env', 'USER') }}"
''' """
import traceback import traceback
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -10,8 +10,7 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: rpm_ostree_pkg module: rpm_ostree_pkg
short_description: Install or uninstall overlay additional packages short_description: Install or uninstall overlay additional packages
version_added: "2.0.0" version_added: "2.0.0"
@ -51,9 +50,9 @@ options:
author: author:
- Dusty Mabe (@dustymabe) - Dusty Mabe (@dustymabe)
- Abhijeet Kasurde (@Akasurde) - Abhijeet Kasurde (@Akasurde)
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Install overlay package - name: Install overlay package
community.general.rpm_ostree_pkg: community.general.rpm_ostree_pkg:
name: nfs-utils name: nfs-utils
@ -80,9 +79,9 @@ EXAMPLES = r'''
until: rpm_ostree_pkg is not failed until: rpm_ostree_pkg is not failed
retries: 10 retries: 10
dealy: 30 dealy: 30
''' """
RETURN = r''' RETURN = r"""
rc: rc:
description: Return code of rpm-ostree command. description: Return code of rpm-ostree command.
returned: always returned: always
@ -124,7 +123,7 @@ needs_reboot:
type: bool type: bool
sample: true sample: true
version_added: 10.1.0 version_added: 10.1.0
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: rundeck_acl_policy module: rundeck_acl_policy
short_description: Manage Rundeck ACL policies short_description: Manage Rundeck ACL policies
@ -49,7 +48,7 @@ options:
type: str type: str
description: description:
- Sets the ACL policy content. - Sets the ACL policy content.
- ACL policy content is a YAML object as described in http://rundeck.org/docs/man5/aclpolicy.html. - ACL policy content is a YAML object as described in U(http://rundeck.org/docs/man5/aclpolicy.html).
- It can be a YAML string or a pure Ansible inventory YAML object. - It can be a YAML string or a pure Ansible inventory YAML object.
client_cert: client_cert:
version_added: '0.2.0' version_added: '0.2.0'
@ -73,9 +72,9 @@ extends_documentation_fragment:
- ansible.builtin.url - ansible.builtin.url
- community.general.attributes - community.general.attributes
- community.general.rundeck - community.general.rundeck
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create or update a rundeck ACL policy in project Ansible - name: Create or update a rundeck ACL policy in project Ansible
community.general.rundeck_acl_policy: community.general.rundeck_acl_policy:
name: "Project_01" name: "Project_01"
@ -100,9 +99,9 @@ EXAMPLES = '''
url: "https://rundeck.example.org" url: "https://rundeck.example.org"
token: "mytoken" token: "mytoken"
state: absent state: absent
''' """
RETURN = ''' RETURN = r"""
rundeck_response: rundeck_response:
description: Rundeck response when a failure occurs. description: Rundeck response when a failure occurs.
returned: failed returned: failed
@ -115,7 +114,7 @@ after:
description: Dictionary containing ACL policy information after modification. description: Dictionary containing ACL policy information after modification.
returned: success returned: success
type: dict type: dict
''' """
# import module snippets # import module snippets
import re import re

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: rundeck_job_executions_info module: rundeck_job_executions_info
short_description: Query executions for a Rundeck job short_description: Query executions for a Rundeck job
description: description:
@ -43,9 +42,9 @@ extends_documentation_fragment:
- url - url
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Get Rundeck job executions info - name: Get Rundeck job executions info
community.general.rundeck_job_executions_info: community.general.rundeck_job_executions_info:
url: "https://rundeck.example.org" url: "https://rundeck.example.org"
@ -57,9 +56,9 @@ EXAMPLES = '''
- name: Show Rundeck job executions info - name: Show Rundeck job executions info
ansible.builtin.debug: ansible.builtin.debug:
var: rundeck_job_executions_info.executions var: rundeck_job_executions_info.executions
''' """
RETURN = ''' RETURN = r"""
paging: paging:
description: Results pagination info. description: Results pagination info.
returned: success returned: success
@ -81,12 +80,7 @@ paging:
description: Maximum number of results per page. description: Maximum number of results per page.
type: int type: int
returned: success returned: success
sample: { sample: {"count": 20, "total": 100, "offset": 0, "max": 20}
"count": 20,
"total": 100,
"offset": 0,
"max": 20
}
executions: executions:
description: Job executions list. description: Job executions list.
returned: always returned: always
@ -127,7 +121,7 @@ executions:
"serverUUID": "5b9a1438-fa3a-457e-b254-8f3d70338068" "serverUUID": "5b9a1438-fa3a-457e-b254-8f3d70338068"
} }
] ]
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six.moves.urllib.parse import quote from ansible.module_utils.six.moves.urllib.parse import quote

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: rundeck_job_run module: rundeck_job_run
short_description: Run a Rundeck job short_description: Run a Rundeck job
description: description:
@ -75,9 +74,9 @@ extends_documentation_fragment:
- community.general.rundeck - community.general.rundeck
- ansible.builtin.url - ansible.builtin.url
- community.general.attributes - community.general.attributes
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Run a Rundeck job - name: Run a Rundeck job
community.general.rundeck_job_run: community.general.rundeck_job_run:
url: "https://rundeck.example.org" url: "https://rundeck.example.org"
@ -130,9 +129,9 @@ EXAMPLES = '''
job_id: "xxxxxxxxxxxxxxxxx" job_id: "xxxxxxxxxxxxxxxxx"
wait_execution: false wait_execution: false
register: rundeck_job_run register: rundeck_job_run
''' """
RETURN = ''' RETURN = r"""
execution_info: execution_info:
description: Rundeck job execution metadata. description: Rundeck job execution metadata.
returned: always returned: always
@ -177,7 +176,7 @@ execution_info:
"output": "Test!" "output": "Test!"
} }
} }
''' """
# Modules import # Modules import
from datetime import datetime, timedelta from datetime import datetime, timedelta

View File

@ -13,8 +13,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: rundeck_project module: rundeck_project
short_description: Manage Rundeck projects short_description: Manage Rundeck projects
@ -64,9 +63,9 @@ extends_documentation_fragment:
- ansible.builtin.url - ansible.builtin.url
- community.general.attributes - community.general.attributes
- community.general.rundeck - community.general.rundeck
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a rundeck project - name: Create a rundeck project
community.general.rundeck_project: community.general.rundeck_project:
name: "Project_01" name: "Project_01"
@ -83,22 +82,22 @@ EXAMPLES = '''
url: "https://rundeck.example.org" url: "https://rundeck.example.org"
api_token: "mytoken" api_token: "mytoken"
state: absent state: absent
''' """
RETURN = ''' RETURN = r"""
rundeck_response: rundeck_response:
description: Rundeck response when a failure occurs description: Rundeck response when a failure occurs.
returned: failed returned: failed
type: str type: str
before: before:
description: dictionary containing project information before modification description: Dictionary containing project information before modification.
returned: success returned: success
type: dict type: dict
after: after:
description: dictionary containing project information after modification description: Dictionary containing project information after modification.
returned: success returned: success
type: dict type: dict
''' """
# import module snippets # import module snippets
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -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: runit module: runit
author: author:
- James Sumners (@jsumners) - James Sumners (@jsumners)
@ -31,12 +30,9 @@ options:
required: true required: true
state: state:
description: description:
- V(started)/V(stopped) are idempotent actions that will not run - V(started)/V(stopped) are idempotent actions that will not run commands unless necessary. V(restarted) will always bounce the service
commands unless necessary. V(restarted) will always bounce the (sv restart) and V(killed) will always bounce the service (sv force-stop). V(reloaded) will send a HUP (sv reload). V(once) will run a
service (sv restart) and V(killed) will always bounce the service (sv force-stop). normally downed sv once (sv once), not really an idempotent operation.
V(reloaded) will send a HUP (sv reload).
V(once) will run a normally downed sv once (sv once), not really
an idempotent operation.
type: str type: str
choices: [killed, once, reloaded, restarted, started, stopped] choices: [killed, once, reloaded, restarted, started, stopped]
enabled: enabled:
@ -45,17 +41,17 @@ options:
type: bool type: bool
service_dir: service_dir:
description: description:
- directory runsv watches for services - Directory runsv watches for services.
type: str type: str
default: /var/service default: /var/service
service_src: service_src:
description: description:
- directory where services are defined, the source of symlinks to service_dir. - Directory where services are defined, the source of symlinks to O(service_dir).
type: str type: str
default: /etc/sv default: /etc/sv
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Start sv dnscache, if not running - name: Start sv dnscache, if not running
community.general.runit: community.general.runit:
name: dnscache name: dnscache
@ -86,7 +82,7 @@ EXAMPLES = r'''
name: dnscache name: dnscache
state: reloaded state: reloaded
service_dir: /run/service service_dir: /run/service
''' """
import os import os
import re import re