mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
[PR #9352/9fc3092b backport][stable-9] s[e-n]*: normalize docs (#9398)
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>
(cherry picked from commit 9fc3092bb3
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
c64705474d
commit
7506742c38
20 changed files with 627 additions and 689 deletions
|
@ -9,14 +9,12 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: sensu_silence
|
||||
author: Steven Bambling (@smbambling)
|
||||
short_description: Manage Sensu silence entries
|
||||
description:
|
||||
- Create and clear (delete) a silence entries via the Sensu API
|
||||
for subscriptions and checks.
|
||||
- Create and clear (delete) a silence entries via the Sensu API for subscriptions and checks.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -36,30 +34,26 @@ options:
|
|||
expire:
|
||||
type: int
|
||||
description:
|
||||
- If specified, the silence entry will be automatically cleared
|
||||
after this number of seconds.
|
||||
- If specified, the silence entry will be automatically cleared after this number of seconds.
|
||||
expire_on_resolve:
|
||||
description:
|
||||
- If specified as true, the silence entry will be automatically
|
||||
cleared once the condition it is silencing is resolved.
|
||||
- If specified as true, the silence entry will be automatically cleared once the condition it is silencing is resolved.
|
||||
type: bool
|
||||
reason:
|
||||
type: str
|
||||
description:
|
||||
- If specified, this free-form string is used to provide context or
|
||||
rationale for the reason this silence entry was created.
|
||||
- If specified, this free-form string is used to provide context or rationale for the reason this silence entry was created.
|
||||
state:
|
||||
type: str
|
||||
description:
|
||||
- Specifies to create or clear (delete) a silence entry via the Sensu API
|
||||
- Specifies to create or clear (delete) a silence entry via the Sensu API.
|
||||
default: present
|
||||
choices: ['present', 'absent']
|
||||
subscription:
|
||||
type: str
|
||||
description:
|
||||
- Specifies the subscription which the silence entry applies to.
|
||||
- To create a silence entry for a client prepend C(client:) to client name.
|
||||
Example - C(client:server1.example.dev)
|
||||
- To create a silence entry for a client prepend C(client:) to client name. Example - C(client:server1.example.dev).
|
||||
required: true
|
||||
url:
|
||||
type: str
|
||||
|
@ -67,9 +61,9 @@ options:
|
|||
- Specifies the URL of the Sensu monitoring host server.
|
||||
required: false
|
||||
default: http://127.0.01:4567
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
# Silence ALL checks for a given client
|
||||
- name: Silence server1.example.dev
|
||||
community.general.sensu_silence:
|
||||
|
@ -98,10 +92,10 @@ EXAMPLES = '''
|
|||
reason: "{{ item.value.reason }}"
|
||||
creator: "{{ ansible_user_id }}"
|
||||
with_dict: "{{ silence }}"
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
'''
|
||||
RETURN = r"""
|
||||
"""
|
||||
|
||||
import json
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue