mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-03 14:59:09 -07:00
s[e-n]*: normalize docs (#9352)
* s[e-n]*: normalize docs * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> * quote line with : and remove extraneous notes * Update plugins/modules/slack.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/seport.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
bef82e28a2
commit
9fc3092bb3
20 changed files with 627 additions and 689 deletions
|
@ -9,12 +9,11 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: sensu_subscription
|
||||
short_description: Manage Sensu subscriptions
|
||||
description:
|
||||
- Manage which I(sensu channels) a machine should subscribe to
|
||||
- Manage which I(sensu channels) a machine should subscribe to.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -26,41 +25,41 @@ options:
|
|||
name:
|
||||
type: str
|
||||
description:
|
||||
- The name of the channel
|
||||
- The name of the channel.
|
||||
required: true
|
||||
state:
|
||||
type: str
|
||||
description:
|
||||
- Whether the machine should subscribe or unsubscribe from the channel
|
||||
choices: [ 'present', 'absent' ]
|
||||
- Whether the machine should subscribe or unsubscribe from the channel.
|
||||
choices: ['present', 'absent']
|
||||
required: false
|
||||
default: present
|
||||
path:
|
||||
type: str
|
||||
description:
|
||||
- Path to the subscriptions json file
|
||||
- Path to the subscriptions json file.
|
||||
required: false
|
||||
default: /etc/sensu/conf.d/subscriptions.json
|
||||
backup:
|
||||
description:
|
||||
- Create a backup file (if yes), including the timestamp information so you
|
||||
- can get the original file back if you somehow clobbered it incorrectly.
|
||||
can get the original file back if you somehow clobbered it incorrectly.
|
||||
type: bool
|
||||
required: false
|
||||
default: false
|
||||
requirements: [ ]
|
||||
requirements: []
|
||||
author: Anders Ingemann (@andsens)
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
reasons:
|
||||
description: the reasons why the module changed or did not change something
|
||||
returned: success
|
||||
type: list
|
||||
sample: ["channel subscription was absent and state is `present'"]
|
||||
'''
|
||||
description: The reasons why the module changed or did not change something.
|
||||
returned: success
|
||||
type: list
|
||||
sample: ["channel subscription was absent and state is `present'"]
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
# Subscribe to the nginx channel
|
||||
- name: Subscribe to nginx checks
|
||||
community.general.sensu_subscription: name=nginx
|
||||
|
@ -68,7 +67,7 @@ EXAMPLES = '''
|
|||
# Unsubscribe from the common checks channel
|
||||
- name: Unsubscribe from common checks
|
||||
community.general.sensu_subscription: name=common state=absent
|
||||
'''
|
||||
"""
|
||||
|
||||
import json
|
||||
import traceback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue