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
parent
70b62ed745
commit
9751461295
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: read_csv
|
||||
short_description: Read a CSV file
|
||||
description:
|
||||
|
@ -33,8 +32,7 @@ options:
|
|||
key:
|
||||
description:
|
||||
- The column name used as a key for the resulting dictionary.
|
||||
- If O(key) is unset, the module returns a list of dictionaries,
|
||||
where each dictionary is a row in the CSV file.
|
||||
- If O(key) is unset, the module returns a list of dictionaries, where each dictionary is a row in the CSV file.
|
||||
type: str
|
||||
dialect:
|
||||
description:
|
||||
|
@ -75,9 +73,9 @@ seealso:
|
|||
- plugin: ansible.builtin.csvfile
|
||||
plugin_type: lookup
|
||||
description: Can be used to do selective lookups in CSV files from Jinja.
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
# Example CSV file with header
|
||||
#
|
||||
# name,uid,gid
|
||||
|
@ -118,9 +116,9 @@ EXAMPLES = r'''
|
|||
delimiter: ';'
|
||||
register: users
|
||||
delegate_to: localhost
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
dict:
|
||||
description: The CSV content as a dictionary.
|
||||
returned: success
|
||||
|
@ -145,7 +143,7 @@ list:
|
|||
- name: jeroen
|
||||
uid: 501
|
||||
gid: 500
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: redfish_command
|
||||
short_description: Manages Out-Of-Band controllers using Redfish APIs
|
||||
description:
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to
|
||||
perform an action.
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action.
|
||||
- Manages OOB controller ex. reboot, log management.
|
||||
- Manages OOB controller users ex. add, remove, update.
|
||||
- Manages system power ex. on, off, graceful and forced reboot.
|
||||
|
@ -109,8 +107,7 @@ options:
|
|||
timeout:
|
||||
description:
|
||||
- Timeout in seconds for HTTP requests to OOB controller.
|
||||
- The default value for this parameter changed from V(10) to V(60)
|
||||
in community.general 9.0.0.
|
||||
- The default value for this parameter changed from V(10) to V(60) in community.general 9.0.0.
|
||||
type: int
|
||||
default: 60
|
||||
boot_override_mode:
|
||||
|
@ -219,11 +216,9 @@ options:
|
|||
update_custom_oem_header:
|
||||
required: false
|
||||
description:
|
||||
- Optional OEM header, sent as separate form-data for
|
||||
the Multipart HTTP push update.
|
||||
- The header shall start with "Oem" according to DMTF
|
||||
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)
|
||||
- Optional OEM header, sent as separate form-data for the Multipart HTTP push update.
|
||||
- The header shall start with "Oem" according to DMTF 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.
|
||||
type: str
|
||||
version_added: '10.1.0'
|
||||
|
@ -232,18 +227,15 @@ options:
|
|||
description:
|
||||
- Custom OEM properties for HTTP Multipart Push updates.
|
||||
- If set, then O(update_custom_oem_header) is required too.
|
||||
- The properties will be passed raw without any validation or conversion by Ansible.
|
||||
This means the content can be a file, a string, or 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 to this module using the
|
||||
P(ansible.builtin.to_json#filter) filter.
|
||||
- The properties will be passed raw without any validation or conversion by Ansible. This means the content can be a file, a string, or
|
||||
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
|
||||
to this module using the P(ansible.builtin.to_json#filter) filter.
|
||||
type: raw
|
||||
version_added: '10.1.0'
|
||||
update_custom_oem_mime_type:
|
||||
required: false
|
||||
description:
|
||||
- MIME Type for custom OEM properties for HTTP Multipart
|
||||
Push updates.
|
||||
- MIME Type for custom OEM properties for HTTP Multipart Push updates.
|
||||
type: str
|
||||
version_added: '10.1.0'
|
||||
virtual_media:
|
||||
|
@ -299,10 +291,8 @@ options:
|
|||
type: str
|
||||
strip_etag_quotes:
|
||||
description:
|
||||
- Removes surrounding quotes of etag used in C(If-Match) header
|
||||
of C(PATCH) requests.
|
||||
- Only use this option to resolve bad vendor implementation where
|
||||
C(If-Match) only matches the unquoted etag string.
|
||||
- Removes surrounding quotes of etag used in C(If-Match) header of C(PATCH) requests.
|
||||
- Only use this option to resolve bad vendor implementation where C(If-Match) only matches the unquoted etag string.
|
||||
type: bool
|
||||
default: false
|
||||
version_added: 3.7.0
|
||||
|
@ -336,9 +326,8 @@ options:
|
|||
required: false
|
||||
description:
|
||||
- SSL/TLS Ciphers to use for the request.
|
||||
- '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)
|
||||
for more details.
|
||||
- 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) for more details.
|
||||
- The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions.
|
||||
type: list
|
||||
elements: str
|
||||
|
@ -347,9 +336,9 @@ options:
|
|||
author:
|
||||
- "Jose Delarosa (@jose-delarosa)"
|
||||
- "T S Kushal (@TSKushal)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Restart system power gracefully
|
||||
community.general.redfish_command:
|
||||
category: Systems
|
||||
|
@ -658,8 +647,7 @@ EXAMPLES = '''
|
|||
username: operator
|
||||
password: supersecretpwd
|
||||
|
||||
- name: Multipart HTTP push update; timeout is 600 seconds to allow for a
|
||||
large image transfer
|
||||
- name: Multipart HTTP push update; timeout is 600 seconds to allow for a large image transfer
|
||||
community.general.redfish_command:
|
||||
category: Update
|
||||
command: MultipartHTTPPushUpdate
|
||||
|
@ -669,8 +657,7 @@ EXAMPLES = '''
|
|||
timeout: 600
|
||||
update_image_file: ~/images/myupdate.img
|
||||
|
||||
- name: Multipart HTTP push with additional options; timeout is 600 seconds
|
||||
to allow for a large image transfer
|
||||
- name: Multipart HTTP push with additional options; timeout is 600 seconds to allow for a large image transfer
|
||||
community.general.redfish_command:
|
||||
category: Update
|
||||
command: MultipartHTTPPushUpdate
|
||||
|
@ -777,7 +764,7 @@ EXAMPLES = '''
|
|||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
wait: True
|
||||
wait: true
|
||||
|
||||
- name: Restart manager power gracefully
|
||||
community.general.redfish_command:
|
||||
|
@ -832,11 +819,11 @@ EXAMPLES = '''
|
|||
bios_attributes:
|
||||
SubNumaClustering: "Disabled"
|
||||
WorkloadProfile: "Virtualization-MaxPerformance"
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
msg:
|
||||
description: Message with action result or error description
|
||||
description: Message with action result or error description.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "Action was successful"
|
||||
|
@ -854,7 +841,7 @@ return_values:
|
|||
"status": "New"
|
||||
}
|
||||
}
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: redfish_config
|
||||
short_description: Manages Out-Of-Band controllers using Redfish APIs
|
||||
description:
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to
|
||||
set or update a configuration attribute.
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to set or update a configuration attribute.
|
||||
- Manages BIOS configuration settings.
|
||||
- Manages OOB controller configuration settings.
|
||||
extends_documentation_fragment:
|
||||
|
@ -64,8 +62,7 @@ options:
|
|||
timeout:
|
||||
description:
|
||||
- Timeout in seconds for HTTP requests to OOB controller.
|
||||
- The default value for this parameter changed from V(10) to V(60)
|
||||
in community.general 9.0.0.
|
||||
- The default value for this parameter changed from V(10) to V(60) in community.general 9.0.0.
|
||||
type: int
|
||||
default: 60
|
||||
boot_order:
|
||||
|
@ -111,10 +108,8 @@ options:
|
|||
version_added: '0.2.0'
|
||||
strip_etag_quotes:
|
||||
description:
|
||||
- Removes surrounding quotes of etag used in C(If-Match) header
|
||||
of C(PATCH) requests.
|
||||
- Only use this option to resolve bad vendor implementation where
|
||||
C(If-Match) only matches the unquoted etag string.
|
||||
- Removes surrounding quotes of etag used in C(If-Match) header of C(PATCH) requests.
|
||||
- Only use this option to resolve bad vendor implementation where C(If-Match) only matches the unquoted etag string.
|
||||
type: bool
|
||||
default: false
|
||||
version_added: 3.7.0
|
||||
|
@ -165,15 +160,14 @@ options:
|
|||
description:
|
||||
- Setting parameter to enable or disable SecureBoot.
|
||||
type: bool
|
||||
default: True
|
||||
default: true
|
||||
version_added: '7.5.0'
|
||||
volume_details:
|
||||
required: false
|
||||
description:
|
||||
- Setting dict of volume to be created.
|
||||
- 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
|
||||
size will not be the maximum available size.
|
||||
- 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 size will not be the maximum available size.
|
||||
type: dict
|
||||
default: {}
|
||||
version_added: '7.5.0'
|
||||
|
@ -181,9 +175,8 @@ options:
|
|||
required: false
|
||||
description:
|
||||
- SSL/TLS Ciphers to use for the request.
|
||||
- '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)
|
||||
for more details.
|
||||
- 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) for more details.
|
||||
- The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions.
|
||||
type: list
|
||||
elements: str
|
||||
|
@ -192,9 +185,9 @@ options:
|
|||
author:
|
||||
- "Jose Delarosa (@jose-delarosa)"
|
||||
- "T S Kushal (@TSKushal)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Set BootMode to UEFI
|
||||
community.general.redfish_config:
|
||||
category: Systems
|
||||
|
@ -338,7 +331,7 @@ EXAMPLES = '''
|
|||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
secure_boot_enable: True
|
||||
secure_boot_enable: true
|
||||
|
||||
- name: Delete All Volumes
|
||||
community.general.redfish_config:
|
||||
|
@ -372,15 +365,15 @@ EXAMPLES = '''
|
|||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
msg:
|
||||
description: Message with action result or error description
|
||||
description: Message with action result or error description.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "Action was successful"
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: redfish_info
|
||||
short_description: Manages Out-Of-Band controllers using Redfish APIs
|
||||
description:
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to
|
||||
get information back.
|
||||
- Builds Redfish URIs locally and sends them to remote OOB controllers to get information back.
|
||||
- Information retrieved is placed in a location specified by the user.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -63,8 +61,7 @@ options:
|
|||
timeout:
|
||||
description:
|
||||
- Timeout in seconds for HTTP requests to OOB controller.
|
||||
- The default value for this parameter changed from V(10) to V(60)
|
||||
in community.general 9.0.0.
|
||||
- The default value for this parameter changed from V(10) to V(60) in community.general 9.0.0.
|
||||
type: int
|
||||
default: 60
|
||||
update_handle:
|
||||
|
@ -77,18 +74,17 @@ options:
|
|||
required: false
|
||||
description:
|
||||
- SSL/TLS Ciphers to use for the request.
|
||||
- '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)
|
||||
for more details.
|
||||
- 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) for more details.
|
||||
- The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions.
|
||||
type: list
|
||||
elements: str
|
||||
version_added: 9.2.0
|
||||
|
||||
author: "Jose Delarosa (@jose-delarosa)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Get CPU inventory
|
||||
community.general.redfish_info:
|
||||
category: Systems
|
||||
|
@ -380,15 +376,15 @@ EXAMPLES = '''
|
|||
password: "{{ password }}"
|
||||
timeout: 5
|
||||
register: result
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
result:
|
||||
description: different results depending on task
|
||||
description: Different results depending on task.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: List of CPUs on system
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils
|
||||
|
|
|
@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: redhat_subscription
|
||||
short_description: Manage registration and subscriptions to RHSM using C(subscription-manager)
|
||||
description:
|
||||
|
@ -19,7 +18,7 @@ description:
|
|||
registering using D-Bus if possible.
|
||||
author: "Barnaby Court (@barnabycourt)"
|
||||
notes:
|
||||
- |
|
||||
- >-
|
||||
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
|
||||
(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)).
|
||||
requirements:
|
||||
- subscription-manager
|
||||
- Optionally the C(dbus) Python library; this is usually included in the OS
|
||||
as it is used by C(subscription-manager).
|
||||
- Optionally the C(dbus) Python library; this is usually included in the OS as it is used by C(subscription-manager).
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -55,21 +53,21 @@ attributes:
|
|||
options:
|
||||
state:
|
||||
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"]
|
||||
default: "present"
|
||||
type: str
|
||||
username:
|
||||
description:
|
||||
- access.redhat.com or Red Hat Satellite or Katello username
|
||||
- Access.redhat.com or Red Hat Satellite or Katello username.
|
||||
type: str
|
||||
password:
|
||||
description:
|
||||
- access.redhat.com or Red Hat Satellite or Katello password
|
||||
- Access.redhat.com or Red Hat Satellite or Katello password.
|
||||
type: str
|
||||
token:
|
||||
description:
|
||||
- sso.redhat.com API access token.
|
||||
- Sso.redhat.com API access token.
|
||||
type: str
|
||||
version_added: 6.3.0
|
||||
server_hostname:
|
||||
|
@ -92,11 +90,11 @@ options:
|
|||
version_added: 3.3.0
|
||||
rhsm_baseurl:
|
||||
description:
|
||||
- Specify CDN baseurl
|
||||
- Specify CDN baseurl.
|
||||
type: str
|
||||
rhsm_repo_ca_cert:
|
||||
description:
|
||||
- Specify an alternative location for a CA certificate for CDN
|
||||
- Specify an alternative location for a CA certificate for CDN.
|
||||
type: str
|
||||
server_proxy_hostname:
|
||||
description:
|
||||
|
@ -113,100 +111,91 @@ options:
|
|||
type: str
|
||||
server_proxy_user:
|
||||
description:
|
||||
- Specify a user for HTTP proxy with basic authentication
|
||||
- Specify a user for HTTP proxy with basic authentication.
|
||||
type: str
|
||||
server_proxy_password:
|
||||
description:
|
||||
- Specify a password for HTTP proxy with basic authentication
|
||||
- Specify a password for HTTP proxy with basic authentication.
|
||||
type: str
|
||||
auto_attach:
|
||||
description:
|
||||
- Upon successful registration, auto-consume available subscriptions
|
||||
- |
|
||||
Please note that the alias O(ignore:autosubscribe) was removed in
|
||||
community.general 9.0.0.
|
||||
- Upon successful registration, auto-consume available subscriptions.
|
||||
- "Please note that the alias O(ignore:autosubscribe) was removed in community.general 9.0.0."
|
||||
type: bool
|
||||
activationkey:
|
||||
description:
|
||||
- supply an activation key for use with registration
|
||||
- Supply an activation key for use with registration.
|
||||
type: str
|
||||
org_id:
|
||||
description:
|
||||
- Organization ID to use in conjunction with activationkey
|
||||
- Organization ID to use in conjunction with activationkey.
|
||||
type: str
|
||||
environment:
|
||||
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
|
||||
pool_ids:
|
||||
description:
|
||||
- |
|
||||
Specify subscription pool IDs to consume.
|
||||
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 quantity is provided, it is used to consume multiple
|
||||
entitlements from a pool (the pool must support this).
|
||||
- "Specify subscription pool IDs to consume.
|
||||
- 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
|
||||
quantity is provided, it is used to consume multiple entitlements from a pool (the pool must support this)."
|
||||
default: []
|
||||
type: list
|
||||
elements: raw
|
||||
consumer_type:
|
||||
description:
|
||||
- The type of unit to register, defaults to system
|
||||
- The type of unit to register, defaults to system.
|
||||
type: str
|
||||
consumer_name:
|
||||
description:
|
||||
- Name of the system to register, defaults to the hostname
|
||||
- Name of the system to register, defaults to the hostname.
|
||||
type: str
|
||||
consumer_id:
|
||||
description:
|
||||
- |
|
||||
References an existing consumer ID to resume using a previous registration
|
||||
for this system. If the system's identity certificate is lost or corrupted,
|
||||
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.
|
||||
- "References an existing consumer ID to resume using a previous registration for this system. If the system's identity certificate is
|
||||
lost or corrupted, 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
|
||||
force_register:
|
||||
description:
|
||||
- Register the system even if it is already registered
|
||||
- Register the system even if it is already registered.
|
||||
type: bool
|
||||
default: false
|
||||
release:
|
||||
description:
|
||||
- Set a release version
|
||||
- Set a release version.
|
||||
type: str
|
||||
syspurpose:
|
||||
description:
|
||||
- Set syspurpose attributes in file C(/etc/rhsm/syspurpose/syspurpose.json)
|
||||
and synchronize these attributes with RHSM server. Syspurpose attributes help attach
|
||||
the most appropriate subscriptions to the system automatically. When C(syspurpose.json) file
|
||||
already contains some attributes, then new attributes overwrite existing attributes.
|
||||
When some attribute is not listed in the new list of attributes, the existing
|
||||
- Set syspurpose attributes in file C(/etc/rhsm/syspurpose/syspurpose.json) and synchronize these attributes with RHSM server. Syspurpose
|
||||
attributes help attach the most appropriate subscriptions to the system automatically. When C(syspurpose.json) file 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.
|
||||
type: dict
|
||||
suboptions:
|
||||
usage:
|
||||
description: Syspurpose attribute usage
|
||||
description: Syspurpose attribute usage.
|
||||
type: str
|
||||
role:
|
||||
description: Syspurpose attribute role
|
||||
description: Syspurpose attribute role.
|
||||
type: str
|
||||
service_level_agreement:
|
||||
description: Syspurpose attribute service_level_agreement
|
||||
description: Syspurpose attribute service_level_agreement.
|
||||
type: str
|
||||
addons:
|
||||
description: Syspurpose attribute addons
|
||||
description: Syspurpose attribute addons.
|
||||
type: list
|
||||
elements: str
|
||||
sync:
|
||||
description:
|
||||
- When this option is V(true), then syspurpose attributes are synchronized with
|
||||
RHSM server immediately. When this option is V(false), then syspurpose attributes
|
||||
will be synchronized with RHSM server by rhsmcertd daemon.
|
||||
- When this option is V(true), then syspurpose attributes are synchronized with RHSM server immediately. When this option is V(false),
|
||||
then syspurpose attributes will be synchronized with RHSM server by rhsmcertd daemon.
|
||||
type: bool
|
||||
default: false
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Register as user (joe_user) with password (somepass) and auto-subscribe to available content.
|
||||
community.general.redhat_subscription:
|
||||
state: present
|
||||
|
@ -275,17 +264,15 @@ EXAMPLES = '''
|
|||
- addon1
|
||||
- addon2
|
||||
sync: true
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
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
|
||||
type: dict
|
||||
sample: {
|
||||
"8a85f9815ab905d3015ab928c7005de4": "1"
|
||||
}
|
||||
'''
|
||||
sample: {"8a85f9815ab905d3015ab928c7005de4": "1"}
|
||||
"""
|
||||
|
||||
from os.path import isfile
|
||||
from os import getuid, unlink
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: redis
|
||||
short_description: Various redis commands, replica and flush
|
||||
description:
|
||||
|
@ -25,10 +24,10 @@ attributes:
|
|||
options:
|
||||
command:
|
||||
description:
|
||||
- The selected redis command
|
||||
- The selected redis command.
|
||||
- V(config) ensures a configuration setting on an instance.
|
||||
- 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]
|
||||
type: str
|
||||
tls:
|
||||
|
@ -42,15 +41,15 @@ options:
|
|||
version_added: 4.6.0
|
||||
master_host:
|
||||
description:
|
||||
- The host of the master instance [replica command]
|
||||
- The host of the master instance [replica command].
|
||||
type: str
|
||||
master_port:
|
||||
description:
|
||||
- The port of the master instance [replica command]
|
||||
- The port of the master instance [replica command].
|
||||
type: int
|
||||
replica_mode:
|
||||
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).
|
||||
default: replica
|
||||
choices: [master, replica, slave]
|
||||
|
@ -59,12 +58,11 @@ options:
|
|||
- slave_mode
|
||||
db:
|
||||
description:
|
||||
- The database to flush (used in db mode) [flush command]
|
||||
- The database to flush (used in DB mode) [flush command].
|
||||
type: int
|
||||
flush_mode:
|
||||
description:
|
||||
- Type of flush (all the dbs in a redis instance or a specific one)
|
||||
[flush command]
|
||||
- Type of flush (all the DBs in a redis instance or a specific one) [flush command].
|
||||
default: all
|
||||
choices: [all, db]
|
||||
type: str
|
||||
|
@ -74,25 +72,21 @@ options:
|
|||
type: str
|
||||
value:
|
||||
description:
|
||||
- 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.
|
||||
Units are case insensitive i.e. 1m = 1mb = 1M = 1MB.
|
||||
- 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.
|
||||
Units are case insensitive, in other words 1m = 1mb = 1M = 1MB.
|
||||
type: str
|
||||
|
||||
notes:
|
||||
- Requires the redis-py Python package on the remote host. You can
|
||||
install it with pip (pip install redis) or with a package manager.
|
||||
https://github.com/andymccurdy/redis-py
|
||||
- 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
|
||||
|
||||
- Requires the C(redis-py) Python package on the remote host. You can install it with pip
|
||||
(C(pip install redis)) or with a package manager. U(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.
|
||||
seealso:
|
||||
- module: community.general.redis_info
|
||||
requirements: [redis]
|
||||
author: "Xabier Larrakoetxea (@slok)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Set local redis instance to be a replica of melee.island on port 6377
|
||||
community.general.redis:
|
||||
command: replica
|
||||
|
@ -142,7 +136,7 @@ EXAMPLES = '''
|
|||
ca_certs: /etc/redis/certs/ca.crt
|
||||
client_cert_file: /etc/redis/certs/redis.crt
|
||||
client_key_file: /etc/redis/certs/redis.key
|
||||
'''
|
||||
"""
|
||||
|
||||
import traceback
|
||||
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: redis_data
|
||||
short_description: Set key value pairs in Redis
|
||||
version_added: 3.7.0
|
||||
|
@ -34,8 +33,7 @@ options:
|
|||
type: str
|
||||
expiration:
|
||||
description:
|
||||
- Expiration time in milliseconds.
|
||||
Setting this flag will always result in a change in the database.
|
||||
- Expiration time in milliseconds. Setting this flag will always result in a change in the database.
|
||||
required: false
|
||||
type: int
|
||||
non_existing:
|
||||
|
@ -70,9 +68,9 @@ seealso:
|
|||
- module: community.general.redis_data_incr
|
||||
- module: community.general.redis_data_info
|
||||
- module: community.general.redis
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Set key foo=bar on localhost with no username
|
||||
community.general.redis_data:
|
||||
login_host: localhost
|
||||
|
@ -116,9 +114,9 @@ EXAMPLES = '''
|
|||
login_password: supersecret
|
||||
key: foo
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
old_value:
|
||||
description: Value of key before setting.
|
||||
returned: on_success if O(state=present) and key exists in database.
|
||||
|
@ -134,7 +132,7 @@ msg:
|
|||
returned: always
|
||||
type: str
|
||||
sample: 'Set key: foo to bar'
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.redis import (
|
||||
|
|
|
@ -8,24 +8,22 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: redis_data_incr
|
||||
short_description: Increment keys in Redis
|
||||
version_added: 4.0.0
|
||||
description:
|
||||
- Increment integers or float keys in Redis database and get new value.
|
||||
- Default increment for all keys is 1. For specific increments use the
|
||||
O(increment_int) and O(increment_float) options.
|
||||
- Default increment for all keys is V(1). For specific increments use the O(increment_int) and O(increment_float) options.
|
||||
author: "Andreas Botzner (@paginabianca)"
|
||||
attributes:
|
||||
check_mode:
|
||||
support: partial
|
||||
details:
|
||||
- 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 fail.
|
||||
- When using C(check_mode) the module will try to calculate the value that
|
||||
Redis would return. If the key is not present, 0.0 is used as value.
|
||||
- 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
|
||||
fail.
|
||||
- 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
|
||||
value.
|
||||
diff_mode:
|
||||
support: none
|
||||
options:
|
||||
|
@ -42,8 +40,7 @@ options:
|
|||
increment_float:
|
||||
description:
|
||||
- Float amount to increment the key by.
|
||||
- This only works with keys that contain float values
|
||||
in their string representation.
|
||||
- This only works with keys that contain float values in their string representation.
|
||||
type: float
|
||||
required: false
|
||||
|
||||
|
@ -56,9 +53,9 @@ seealso:
|
|||
- module: community.general.redis_data
|
||||
- module: community.general.redis_data_info
|
||||
- module: community.general.redis
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Increment integer key foo on localhost with no username and print new value
|
||||
community.general.redis_data_incr:
|
||||
login_host: localhost
|
||||
|
@ -77,11 +74,11 @@ EXAMPLES = '''
|
|||
login_password: somepass
|
||||
key: foo
|
||||
increment_float: '20.4'
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
value:
|
||||
description: Incremented value of key
|
||||
description: Incremented value of key.
|
||||
returned: on success
|
||||
type: float
|
||||
sample: '4039.4'
|
||||
|
@ -90,7 +87,7 @@ msg:
|
|||
returned: always
|
||||
type: str
|
||||
sample: 'Incremented key: foo by 20.4 to 65.9'
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.redis import (
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: redis_data_info
|
||||
short_description: Get value of key in Redis database
|
||||
version_added: 3.7.0
|
||||
|
@ -33,9 +32,9 @@ seealso:
|
|||
- module: community.general.redis_data_incr
|
||||
- module: community.general.redis_info
|
||||
- module: community.general.redis
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Get key foo=bar from loalhost with no username
|
||||
community.general.redis_data_info:
|
||||
login_host: localhost
|
||||
|
@ -50,9 +49,9 @@ EXAMPLES = '''
|
|||
validate_certs: true
|
||||
ssl_ca_certs: /path/to/ca/certs
|
||||
key: foo
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
exists:
|
||||
description: If they key exists in the database.
|
||||
returned: on success
|
||||
|
@ -67,7 +66,7 @@ msg:
|
|||
returned: always
|
||||
type: str
|
||||
sample: 'Got key: foo with value: bar'
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.redis import (
|
||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: redis_info
|
||||
short_description: Gather information about Redis servers
|
||||
version_added: '0.2.0'
|
||||
|
@ -38,9 +37,9 @@ options:
|
|||
seealso:
|
||||
- module: community.general.redis
|
||||
author: "Pavlo Bashynskyi (@levonet)"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Get server information
|
||||
community.general.redis_info:
|
||||
register: result
|
||||
|
@ -57,9 +56,9 @@ EXAMPLES = r'''
|
|||
- name: Print server cluster information
|
||||
ansible.builtin.debug:
|
||||
var: result.cluster_info
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
info:
|
||||
description: The default set of server information sections U(https://redis.io/commands/info).
|
||||
returned: success
|
||||
|
@ -211,7 +210,7 @@ cluster:
|
|||
"cluster_stats_messages_received": 1483968,
|
||||
"total_cluster_links_buffer_limit_exceeded": 0
|
||||
}
|
||||
'''
|
||||
"""
|
||||
|
||||
import traceback
|
||||
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: rhevm
|
||||
short_description: RHEV/oVirt automation
|
||||
description:
|
||||
|
@ -119,12 +118,12 @@ options:
|
|||
default: true
|
||||
disks:
|
||||
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
|
||||
elements: str
|
||||
ifaces:
|
||||
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
|
||||
elements: str
|
||||
aliases: [interfaces, nics]
|
||||
|
@ -150,9 +149,9 @@ options:
|
|||
- When O(state=down).
|
||||
- When O(state=restarted).
|
||||
type: int
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
vm:
|
||||
description: Returns all of the VMs variables and execution.
|
||||
returned: always
|
||||
|
@ -216,9 +215,9 @@ vm:
|
|||
"vmhost": "host416",
|
||||
"vmmem": "16"
|
||||
}
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Basic get info from VM
|
||||
community.general.rhevm:
|
||||
server: rhevm01
|
||||
|
@ -328,7 +327,7 @@ EXAMPLES = r'''
|
|||
- name: bond0.38
|
||||
network: vlan38
|
||||
state: present
|
||||
'''
|
||||
"""
|
||||
|
||||
import time
|
||||
|
||||
|
|
|
@ -8,18 +8,15 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: rhsm_release
|
||||
short_description: Set or Unset RHSM Release version
|
||||
description:
|
||||
- Sets or unsets the release version used by RHSM repositories.
|
||||
notes:
|
||||
- This module will fail on an unregistered system.
|
||||
Use the M(community.general.redhat_subscription) module to register a system
|
||||
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.
|
||||
- This module will fail on an unregistered system. Use the M(community.general.redhat_subscription) module to register a system 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.
|
||||
requirements:
|
||||
- Red Hat Enterprise Linux 6+ with subscription-manager installed
|
||||
extends_documentation_fragment:
|
||||
|
@ -37,9 +34,9 @@ options:
|
|||
type: str
|
||||
author:
|
||||
- Sean Myers (@seandst)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
# Set release version to 7.1
|
||||
- name: Set RHSM release version
|
||||
community.general.rhsm_release:
|
||||
|
@ -53,15 +50,15 @@ EXAMPLES = '''
|
|||
# Unset release version
|
||||
- name: Unset RHSM release release
|
||||
community.general.rhsm_release:
|
||||
release: null
|
||||
'''
|
||||
release:
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
current_release:
|
||||
description: The current RHSM release version value
|
||||
description: The current RHSM release version value.
|
||||
returned: success
|
||||
type: str
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
|
|
@ -8,20 +8,16 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: rhsm_repository
|
||||
short_description: Manage RHSM repositories using the subscription-manager command
|
||||
description:
|
||||
- Manage (Enable/Disable) RHSM repositories to the Red Hat Subscription
|
||||
Management entitlement platform using the C(subscription-manager) command.
|
||||
- Manage (Enable/Disable) RHSM repositories to the Red Hat Subscription Management entitlement platform using the C(subscription-manager) command.
|
||||
author: Giovanni Sciortino (@giovannisciortino)
|
||||
notes:
|
||||
- In order to manage RHSM repositories the system must be already registered
|
||||
to RHSM manually or using the Ansible M(community.general.redhat_subscription) module.
|
||||
- It is possible to interact with C(subscription-manager) only as root,
|
||||
so root permissions are required to successfully run this module.
|
||||
|
||||
- In order to manage RHSM repositories the system must be already registered to RHSM manually or using the Ansible M(community.general.redhat_subscription)
|
||||
module.
|
||||
- It is possible to interact with C(subscription-manager) only as root, so root permissions are required to successfully run this module.
|
||||
requirements:
|
||||
- subscription-manager
|
||||
extends_documentation_fragment:
|
||||
|
@ -34,31 +30,27 @@ attributes:
|
|||
options:
|
||||
state:
|
||||
description:
|
||||
- If state is equal to present or disabled, indicates the desired
|
||||
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.
|
||||
- If state is equal to present or disabled, indicates the desired 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.
|
||||
choices: [enabled, disabled]
|
||||
default: "enabled"
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- The ID of repositories to enable.
|
||||
- To operate on several repositories this can accept a comma separated
|
||||
list or a YAML list.
|
||||
- To operate on several repositories this can accept a comma separated list or a YAML list.
|
||||
required: true
|
||||
type: list
|
||||
elements: str
|
||||
purge:
|
||||
description:
|
||||
- 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 to the O(name) field.
|
||||
Using this with C(loop) will most likely not have the desired result.
|
||||
- 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
|
||||
to the O(name) field. Using this with C(loop) will most likely not have the desired result.
|
||||
type: bool
|
||||
default: false
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Enable a RHSM repository
|
||||
community.general.rhsm_repository:
|
||||
name: rhel-7-server-rpms
|
||||
|
@ -77,16 +69,16 @@ EXAMPLES = '''
|
|||
community.general.rhsm_repository:
|
||||
name: rhel-7-server-rpms
|
||||
purge: true
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
repositories:
|
||||
description:
|
||||
- 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.
|
||||
returned: success
|
||||
type: list
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
from fnmatch import fnmatch
|
||||
|
|
|
@ -9,13 +9,11 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: riak
|
||||
short_description: This module handles some common Riak operations
|
||||
description:
|
||||
- This module can be used to join nodes to a cluster, check
|
||||
the status of the cluster.
|
||||
- This module can be used to join nodes to a cluster, check the status of the cluster.
|
||||
author:
|
||||
- "James Martin (@jsmartin)"
|
||||
- "Drew Kerrigan (@drewkerrigan)"
|
||||
|
@ -34,17 +32,17 @@ options:
|
|||
type: str
|
||||
config_dir:
|
||||
description:
|
||||
- The path to the riak configuration directory
|
||||
- The path to the riak configuration directory.
|
||||
default: /etc/riak
|
||||
type: path
|
||||
http_conn:
|
||||
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
|
||||
type: str
|
||||
target_node:
|
||||
description:
|
||||
- The target node for certain operations (join, ping)
|
||||
- The target node for certain operations (join, ping).
|
||||
default: riak@127.0.0.1
|
||||
type: str
|
||||
wait_for_handoffs:
|
||||
|
@ -64,13 +62,12 @@ options:
|
|||
type: str
|
||||
validate_certs:
|
||||
description:
|
||||
- If V(false), SSL certificates will not be validated. This should only be used
|
||||
on personally controlled sites using self-signed certificates.
|
||||
- If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
|
||||
type: bool
|
||||
default: true
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: "Join's a Riak node to another node"
|
||||
community.general.riak:
|
||||
command: join
|
||||
|
@ -83,7 +80,7 @@ EXAMPLES = '''
|
|||
- name: Wait for riak_kv service to startup
|
||||
community.general.riak:
|
||||
wait_for_service: kv
|
||||
'''
|
||||
"""
|
||||
|
||||
import json
|
||||
import time
|
||||
|
|
|
@ -12,11 +12,11 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r"""
|
||||
module: rocketchat
|
||||
short_description: Send notifications to Rocket Chat
|
||||
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)"
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -29,15 +29,12 @@ options:
|
|||
domain:
|
||||
type: str
|
||||
description:
|
||||
- The domain for your environment without protocol. (For example
|
||||
V(example.com) or V(chat.example.com).)
|
||||
- The domain for your environment without protocol. (For example V(example.com) or V(chat.example.com)).
|
||||
required: true
|
||||
token:
|
||||
type: str
|
||||
description:
|
||||
- Rocket Chat Incoming Webhook integration token. This provides
|
||||
authentication to Rocket Chat's Incoming webhook for posting
|
||||
messages.
|
||||
- Rocket Chat Incoming Webhook integration token. This provides authentication to Rocket Chat's Incoming webhook for posting messages.
|
||||
required: true
|
||||
protocol:
|
||||
type: str
|
||||
|
@ -54,8 +51,8 @@ options:
|
|||
channel:
|
||||
type: str
|
||||
description:
|
||||
- Channel to send the message to. If absent, the message goes to the channel selected for the O(token)
|
||||
specified during the creation of webhook.
|
||||
- Channel to send the message to. If absent, the message goes to the channel selected for the O(token) specified during the creation of
|
||||
webhook.
|
||||
username:
|
||||
type: str
|
||||
description:
|
||||
|
@ -69,8 +66,7 @@ options:
|
|||
icon_emoji:
|
||||
type: str
|
||||
description:
|
||||
- Emoji for the message sender. The representation for the available emojis can be
|
||||
got from Rocket Chat.
|
||||
- Emoji for the message sender. The representation for the available emojis can be got from Rocket Chat.
|
||||
- For example V(:thumbsup:).
|
||||
- If O(icon_emoji) is set, O(icon_url) will not be used.
|
||||
link_names:
|
||||
|
@ -83,14 +79,13 @@ options:
|
|||
- 0
|
||||
validate_certs:
|
||||
description:
|
||||
- If V(false), SSL certificates will not be validated. This should only be used
|
||||
on personally controlled sites using self-signed certificates.
|
||||
- If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
|
||||
type: bool
|
||||
default: true
|
||||
color:
|
||||
type: str
|
||||
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'
|
||||
choices:
|
||||
- 'normal'
|
||||
|
@ -102,17 +97,17 @@ options:
|
|||
elements: dict
|
||||
description:
|
||||
- Define a list of attachments.
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = """
|
||||
- name: Send notification message via Rocket Chat
|
||||
EXAMPLES = r"""
|
||||
- name: Send notification message through Rocket Chat
|
||||
community.general.rocketchat:
|
||||
token: thetoken/generatedby/rocketchat
|
||||
domain: chat.example.com
|
||||
msg: '{{ inventory_hostname }} completed'
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Send notification message via Rocket Chat all options
|
||||
- name: Send notification message through Rocket Chat all options
|
||||
community.general.rocketchat:
|
||||
domain: chat.example.com
|
||||
token: thetoken/generatedby/rocketchat
|
||||
|
@ -151,7 +146,7 @@ EXAMPLES = """
|
|||
delegate_to: localhost
|
||||
"""
|
||||
|
||||
RETURN = """
|
||||
RETURN = r"""
|
||||
changed:
|
||||
description: A flag indicating if any change was made or not.
|
||||
returned: success
|
||||
|
|
|
@ -9,14 +9,12 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: rollbar_deployment
|
||||
author: "Max Riveiro (@kavu)"
|
||||
short_description: Notify Rollbar about app deployments
|
||||
description:
|
||||
- Notify Rollbar about app deployments
|
||||
(see https://rollbar.com/docs/deploys_other/)
|
||||
- Notify Rollbar about app deployments (see U(https://rollbar.com/docs/deploys_other/)).
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -33,7 +31,7 @@ options:
|
|||
environment:
|
||||
type: str
|
||||
description:
|
||||
- Name of the environment being deployed, e.g. 'production'.
|
||||
- Name of the environment being deployed, for example V(production).
|
||||
required: true
|
||||
revision:
|
||||
type: str
|
||||
|
@ -53,7 +51,7 @@ options:
|
|||
comment:
|
||||
type: str
|
||||
description:
|
||||
- Deploy comment (e.g. what is being deployed).
|
||||
- Deploy comment (for example what is being deployed).
|
||||
required: false
|
||||
url:
|
||||
type: str
|
||||
|
@ -63,15 +61,14 @@ options:
|
|||
default: 'https://api.rollbar.com/api/1/deploy/'
|
||||
validate_certs:
|
||||
description:
|
||||
- If V(false), SSL certificates for the target url will not be validated.
|
||||
This should only be used on personally controlled sites using
|
||||
- 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.
|
||||
required: false
|
||||
default: true
|
||||
type: bool
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Rollbar deployment notification
|
||||
community.general.rollbar_deployment:
|
||||
token: AAAAAA
|
||||
|
@ -87,7 +84,7 @@ EXAMPLES = '''
|
|||
environment: production
|
||||
revision: "{{ lookup('pipe', 'git rev-parse HEAD') }}"
|
||||
user: "{{ lookup('env', 'USER') }}"
|
||||
'''
|
||||
"""
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -10,8 +10,7 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: rpm_ostree_pkg
|
||||
short_description: Install or uninstall overlay additional packages
|
||||
version_added: "2.0.0"
|
||||
|
@ -51,9 +50,9 @@ options:
|
|||
author:
|
||||
- Dusty Mabe (@dustymabe)
|
||||
- Abhijeet Kasurde (@Akasurde)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Install overlay package
|
||||
community.general.rpm_ostree_pkg:
|
||||
name: nfs-utils
|
||||
|
@ -80,9 +79,9 @@ EXAMPLES = r'''
|
|||
until: rpm_ostree_pkg is not failed
|
||||
retries: 10
|
||||
dealy: 30
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
rc:
|
||||
description: Return code of rpm-ostree command.
|
||||
returned: always
|
||||
|
@ -124,7 +123,7 @@ needs_reboot:
|
|||
type: bool
|
||||
sample: true
|
||||
version_added: 10.1.0
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
|
|
@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: rundeck_acl_policy
|
||||
|
||||
short_description: Manage Rundeck ACL policies
|
||||
|
@ -49,7 +48,7 @@ options:
|
|||
type: str
|
||||
description:
|
||||
- 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.
|
||||
client_cert:
|
||||
version_added: '0.2.0'
|
||||
|
@ -73,9 +72,9 @@ extends_documentation_fragment:
|
|||
- ansible.builtin.url
|
||||
- community.general.attributes
|
||||
- community.general.rundeck
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Create or update a rundeck ACL policy in project Ansible
|
||||
community.general.rundeck_acl_policy:
|
||||
name: "Project_01"
|
||||
|
@ -100,9 +99,9 @@ EXAMPLES = '''
|
|||
url: "https://rundeck.example.org"
|
||||
token: "mytoken"
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
rundeck_response:
|
||||
description: Rundeck response when a failure occurs.
|
||||
returned: failed
|
||||
|
@ -115,7 +114,7 @@ after:
|
|||
description: Dictionary containing ACL policy information after modification.
|
||||
returned: success
|
||||
type: dict
|
||||
'''
|
||||
"""
|
||||
|
||||
# import module snippets
|
||||
import re
|
||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: rundeck_job_executions_info
|
||||
short_description: Query executions for a Rundeck job
|
||||
description:
|
||||
|
@ -43,9 +42,9 @@ extends_documentation_fragment:
|
|||
- url
|
||||
- community.general.attributes
|
||||
- community.general.attributes.info_module
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Get Rundeck job executions info
|
||||
community.general.rundeck_job_executions_info:
|
||||
url: "https://rundeck.example.org"
|
||||
|
@ -57,9 +56,9 @@ EXAMPLES = '''
|
|||
- name: Show Rundeck job executions info
|
||||
ansible.builtin.debug:
|
||||
var: rundeck_job_executions_info.executions
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
paging:
|
||||
description: Results pagination info.
|
||||
returned: success
|
||||
|
@ -81,12 +80,7 @@ paging:
|
|||
description: Maximum number of results per page.
|
||||
type: int
|
||||
returned: success
|
||||
sample: {
|
||||
"count": 20,
|
||||
"total": 100,
|
||||
"offset": 0,
|
||||
"max": 20
|
||||
}
|
||||
sample: {"count": 20, "total": 100, "offset": 0, "max": 20}
|
||||
executions:
|
||||
description: Job executions list.
|
||||
returned: always
|
||||
|
@ -127,7 +121,7 @@ executions:
|
|||
"serverUUID": "5b9a1438-fa3a-457e-b254-8f3d70338068"
|
||||
}
|
||||
]
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six.moves.urllib.parse import quote
|
||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: rundeck_job_run
|
||||
short_description: Run a Rundeck job
|
||||
description:
|
||||
|
@ -75,9 +74,9 @@ extends_documentation_fragment:
|
|||
- community.general.rundeck
|
||||
- ansible.builtin.url
|
||||
- community.general.attributes
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Run a Rundeck job
|
||||
community.general.rundeck_job_run:
|
||||
url: "https://rundeck.example.org"
|
||||
|
@ -130,9 +129,9 @@ EXAMPLES = '''
|
|||
job_id: "xxxxxxxxxxxxxxxxx"
|
||||
wait_execution: false
|
||||
register: rundeck_job_run
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
execution_info:
|
||||
description: Rundeck job execution metadata.
|
||||
returned: always
|
||||
|
@ -177,7 +176,7 @@ execution_info:
|
|||
"output": "Test!"
|
||||
}
|
||||
}
|
||||
'''
|
||||
"""
|
||||
|
||||
# Modules import
|
||||
from datetime import datetime, timedelta
|
||||
|
|
|
@ -13,8 +13,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: rundeck_project
|
||||
|
||||
short_description: Manage Rundeck projects
|
||||
|
@ -64,9 +63,9 @@ extends_documentation_fragment:
|
|||
- ansible.builtin.url
|
||||
- community.general.attributes
|
||||
- community.general.rundeck
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Create a rundeck project
|
||||
community.general.rundeck_project:
|
||||
name: "Project_01"
|
||||
|
@ -83,22 +82,22 @@ EXAMPLES = '''
|
|||
url: "https://rundeck.example.org"
|
||||
api_token: "mytoken"
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
rundeck_response:
|
||||
description: Rundeck response when a failure occurs
|
||||
description: Rundeck response when a failure occurs.
|
||||
returned: failed
|
||||
type: str
|
||||
before:
|
||||
description: dictionary containing project information before modification
|
||||
description: Dictionary containing project information before modification.
|
||||
returned: success
|
||||
type: dict
|
||||
after:
|
||||
description: dictionary containing project information after modification
|
||||
description: Dictionary containing project information after modification.
|
||||
returned: success
|
||||
type: dict
|
||||
'''
|
||||
"""
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: runit
|
||||
author:
|
||||
- James Sumners (@jsumners)
|
||||
|
@ -31,12 +30,9 @@ options:
|
|||
required: true
|
||||
state:
|
||||
description:
|
||||
- V(started)/V(stopped) are idempotent actions that will not run
|
||||
commands unless necessary. V(restarted) will always bounce the
|
||||
service (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 normally downed sv once (sv once), not really
|
||||
an idempotent operation.
|
||||
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary. V(restarted) will always bounce the service
|
||||
(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
|
||||
normally downed sv once (sv once), not really an idempotent operation.
|
||||
type: str
|
||||
choices: [killed, once, reloaded, restarted, started, stopped]
|
||||
enabled:
|
||||
|
@ -45,17 +41,17 @@ options:
|
|||
type: bool
|
||||
service_dir:
|
||||
description:
|
||||
- directory runsv watches for services
|
||||
- Directory runsv watches for services.
|
||||
type: str
|
||||
default: /var/service
|
||||
service_src:
|
||||
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
|
||||
default: /etc/sv
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Start sv dnscache, if not running
|
||||
community.general.runit:
|
||||
name: dnscache
|
||||
|
@ -86,7 +82,7 @@ EXAMPLES = r'''
|
|||
name: dnscache
|
||||
state: reloaded
|
||||
service_dir: /run/service
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
|
|
Loading…
Reference in New Issue