mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string Added deprecation warning to moduledev.rst and remove deprecated example from it Fixed up a few typos and uppercased some acronyms. add consistency to how EXAMPLES are formatted
This commit is contained in:
@@ -38,13 +38,15 @@ options:
|
||||
required: true
|
||||
default: null
|
||||
choices: [ "present", "started", "stopped", "restarted", "monitored", "unmonitored", "reloaded" ]
|
||||
examples:
|
||||
- code: "monit: name=httpd state=started"
|
||||
description: Manage the state of program I(httpd) to be in I(started) state.
|
||||
requirements: [ ]
|
||||
author: Darryl Stoflet
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Manage the state of program "httpd" to be in "started" state.
|
||||
- monit: name=httpd state=started
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
arg_spec = dict(
|
||||
|
||||
@@ -75,31 +75,44 @@ options:
|
||||
|
||||
author: Tim Bielawa
|
||||
requirements: [ "Nagios" ]
|
||||
examples:
|
||||
- description: set 30 minutes of apache downtime
|
||||
code: "nagios: action=downtime minutes=30 service=httpd host=$inventory_hostname"
|
||||
- description: schedule an hour of HOST downtime
|
||||
code: "nagios: action=downtime minutes=60 service=host host=$inventory_hostname"
|
||||
- description: schedule downtime for ALL services on HOST
|
||||
code: "nagios: action=downtime minutes=45 service=all host=$inventory_hostname"
|
||||
- description: schedule downtime for a few services
|
||||
code: "nagios: action=downtime services=frob,foobar,qeuz host=$inventory_hostname"
|
||||
- description: enable SMART disk alerts
|
||||
code: "nagios: action=enable_alerts service=smart host=$inventory_hostname"
|
||||
- description: "two services at once: disable httpd and nfs alerts"
|
||||
code: "nagios: action=disable_alerts service=httpd,nfs host=$inventory_hostname"
|
||||
- description: disable HOST alerts
|
||||
code: "nagios: action=disable_alerts service=host host=$inventory_hostname"
|
||||
- description: silence ALL alerts
|
||||
code: "nagios: action=silence host=$inventory_hostname"
|
||||
- description: unsilence all alerts
|
||||
code: "nagios: action=unsilence host=$inventory_hostname"
|
||||
- description: SHUT UP NAGIOS
|
||||
code: "nagios: action=silence_nagios"
|
||||
- description: ANNOY ME NAGIOS
|
||||
code: "nagios: action=unsilence_nagios"
|
||||
- description: command something
|
||||
code: "nagios: action=command command='DISABLE_FAILURE_PREDICTION'"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# set 30 minutes of apache downtime
|
||||
- nagios: action=downtime minutes=30 service=httpd host={{ inventory_hostname }}
|
||||
|
||||
# schedule an hour of HOST downtime
|
||||
- nagios: action=downtime minutes=60 service=host host=$inventory_hostname
|
||||
|
||||
# schedule downtime for ALL services on HOST
|
||||
- nagios: action=downtime minutes=45 service=all host=$inventory_hostname
|
||||
|
||||
# schedule downtime for a few services
|
||||
- nagios: action=downtime services=frob,foobar,qeuz host=$inventory_hostname
|
||||
|
||||
# enable SMART disk alerts
|
||||
- nagios: action=enable_alerts service=smart host=$inventory_hostname
|
||||
|
||||
# "two services at once: disable httpd and nfs alerts"
|
||||
- nagios: action=disable_alerts service=httpd,nfs host=$inventory_hostname
|
||||
|
||||
# disable HOST alerts
|
||||
- nagios: action=disable_alerts service=host host=$inventory_hostname
|
||||
|
||||
# silence ALL alerts
|
||||
- nagios: action=silence host=$inventory_hostname
|
||||
|
||||
# unsilence all alerts
|
||||
- nagios: action=unsilence host=$inventory_hostname
|
||||
|
||||
# SHUT UP NAGIOS
|
||||
- nagios: action=silence_nagios
|
||||
|
||||
# ANNOY ME NAGIOS
|
||||
- nagios: action=unsilence_nagios
|
||||
|
||||
# command something
|
||||
- nagios: action=command command='DISABLE_FAILURE_PREDICTION'
|
||||
'''
|
||||
|
||||
import ConfigParser
|
||||
|
||||
Reference in New Issue
Block a user