mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 19:50:25 -07:00
[PR #5965/0ef80569 backport][stable-6] Add attributes to more modules (1/4) (#6022)
Add attributes to more modules (1/4) (#5965)
* Add attributes to more modules.
* Apply suggestions from code review.
Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
---------
Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
(cherry picked from commit 0ef805699d
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
611e024550
commit
ef09ea519c
35 changed files with 296 additions and 58 deletions
|
@ -20,21 +20,28 @@ module: pubnub_blocks
|
|||
short_description: PubNub blocks management module
|
||||
description:
|
||||
- "This module allows Ansible to interface with the PubNub BLOCKS
|
||||
infrastructure by providing the following operations: create / remove,
|
||||
start / stop and rename for blocks and create / modify / remove for event
|
||||
handlers"
|
||||
infrastructure by providing the following operations: create / remove,
|
||||
start / stop and rename for blocks and create / modify / remove for event
|
||||
handlers."
|
||||
author:
|
||||
- PubNub <support@pubnub.com> (@pubnub)
|
||||
- Sergey Mamontov <sergey@pubnub.com> (@parfeon)
|
||||
requirements:
|
||||
- "python >= 2.7"
|
||||
- "pubnub_blocks_client >= 1.0"
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
check_mode:
|
||||
support: full
|
||||
diff_mode:
|
||||
support: none
|
||||
options:
|
||||
email:
|
||||
description:
|
||||
- Email from account for which new session should be started.
|
||||
- "Not required if C(cache) contains result of previous module call (in
|
||||
same play)."
|
||||
same play)."
|
||||
required: false
|
||||
type: str
|
||||
default: ''
|
||||
|
@ -42,7 +49,7 @@ options:
|
|||
description:
|
||||
- Password which match to account to which specified C(email) belong.
|
||||
- "Not required if C(cache) contains result of previous module call (in
|
||||
same play)."
|
||||
same play)."
|
||||
required: false
|
||||
type: str
|
||||
default: ''
|
||||
|
@ -57,14 +64,14 @@ options:
|
|||
account:
|
||||
description:
|
||||
- "Name of PubNub account for from which C(application) will be used to
|
||||
manage blocks."
|
||||
manage blocks."
|
||||
- "User's account will be used if value not set or empty."
|
||||
type: str
|
||||
default: ''
|
||||
application:
|
||||
description:
|
||||
- "Name of target PubNub application for which blocks configuration on
|
||||
specific C(keyset) will be done."
|
||||
specific C(keyset) will be done."
|
||||
type: str
|
||||
required: true
|
||||
keyset:
|
||||
|
@ -75,7 +82,7 @@ options:
|
|||
state:
|
||||
description:
|
||||
- "Intended block state after event handlers creation / update process
|
||||
will be completed."
|
||||
will be completed."
|
||||
required: false
|
||||
default: 'present'
|
||||
choices: ['started', 'stopped', 'present', 'absent']
|
||||
|
@ -95,23 +102,23 @@ options:
|
|||
event_handlers:
|
||||
description:
|
||||
- "List of event handlers which should be updated for specified block
|
||||
C(name)."
|
||||
C(name)."
|
||||
- "Each entry for new event handler should contain: C(name), C(src),
|
||||
C(channels), C(event). C(name) used as event handler name which can be
|
||||
used later to make changes to it."
|
||||
C(channels), C(event). C(name) used as event handler name which can be
|
||||
used later to make changes to it."
|
||||
- C(src) is full path to file with event handler code.
|
||||
- "C(channels) is name of channel from which event handler is waiting
|
||||
for events."
|
||||
for events."
|
||||
- "C(event) is type of event which is able to trigger event handler:
|
||||
I(js-before-publish), I(js-after-publish), I(js-after-presence)."
|
||||
I(js-before-publish), I(js-after-publish), I(js-after-presence)."
|
||||
- "Each entry for existing handlers should contain C(name) (so target
|
||||
handler can be identified). Rest parameters (C(src), C(channels) and
|
||||
C(event)) can be added if changes required for them."
|
||||
handler can be identified). Rest parameters (C(src), C(channels) and
|
||||
C(event)) can be added if changes required for them."
|
||||
- "It is possible to rename event handler by adding C(changes) key to
|
||||
event handler payload and pass dictionary, which will contain single key
|
||||
C(name), where new name should be passed."
|
||||
event handler payload and pass dictionary, which will contain single key
|
||||
C(name), where new name should be passed."
|
||||
- "To remove particular event handler it is possible to set C(state) for
|
||||
it to C(absent) and it will be removed."
|
||||
it to C(absent) and it will be removed."
|
||||
required: false
|
||||
default: []
|
||||
type: list
|
||||
|
@ -119,7 +126,7 @@ options:
|
|||
changes:
|
||||
description:
|
||||
- "List of fields which should be changed by block itself (doesn't
|
||||
affect any event handlers)."
|
||||
affect any event handlers)."
|
||||
- "Possible options for change is: C(name)."
|
||||
required: false
|
||||
default: {}
|
||||
|
@ -127,8 +134,8 @@ options:
|
|||
validate_certs:
|
||||
description:
|
||||
- "This key allow to try skip certificates check when performing REST API
|
||||
calls. Sometimes host may have issues with certificates on it and this
|
||||
will cause problems to call PubNub REST API."
|
||||
calls. Sometimes host may have issues with certificates on it and this
|
||||
will cause problems to call PubNub REST API."
|
||||
- If check should be ignored C(False) should be passed to this parameter.
|
||||
required: false
|
||||
default: true
|
||||
|
@ -224,9 +231,10 @@ EXAMPLES = '''
|
|||
|
||||
RETURN = '''
|
||||
module_cache:
|
||||
description: "Cached account information. In case if with single play module
|
||||
used few times it is better to pass cached data to next module calls to speed
|
||||
up process."
|
||||
description:
|
||||
- Cached account information. In case if with single play module
|
||||
used few times it is better to pass cached data to next module calls to speed
|
||||
up process.
|
||||
type: dict
|
||||
returned: always
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue