1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add option type validation. (#2878) (#2886)

(cherry picked from commit 1b94d09209)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2021-06-27 10:24:38 +02:00 committed by GitHub
parent 48cc39a2b1
commit f0b7233e8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 14 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- "nrdp callback plugin - parameters are now converted to strings, except ``validate_certs`` which is converted to boolean (https://github.com/ansible-collections/community.general/pull/2878)."

View file

@ -10,22 +10,23 @@ DOCUMENTATION = '''
name: nrdp
type: notification
author: "Remi VERCHERE (@rverchere)"
short_description: post task result to a nagios server through nrdp
short_description: Post task results to a Nagios server through nrdp
description:
- this callback send playbook result to nagios
- nagios shall use NRDP to recive passive events
- the passive check is sent to a dedicated host/service for ansible
- This callback send playbook result to Nagios.
- Nagios shall use NRDP to recive passive events.
- The passive check is sent to a dedicated host/service for Ansible.
options:
url:
description: url of the nrdp server
required: True
description: URL of the nrdp server.
required: true
env:
- name : NRDP_URL
ini:
- section: callback_nrdp
key: url
type: string
validate_certs:
description: (bool) validate the SSL certificate of the nrdp server. (For HTTPS url)
description: Validate the SSL certificate of the nrdp server. (Used for HTTPS URLs.)
env:
- name: NRDP_VALIDATE_CERTS
ini:
@ -33,32 +34,36 @@ DOCUMENTATION = '''
key: validate_nrdp_certs
- section: callback_nrdp
key: validate_certs
default: False
type: boolean
default: false
aliases: [ validate_nrdp_certs ]
token:
description: token to be allowed to push nrdp events
required: True
description: Token to be allowed to push nrdp events.
required: true
env:
- name: NRDP_TOKEN
ini:
- section: callback_nrdp
key: token
type: string
hostname:
description: hostname where the passive check is linked to
required: True
description: Hostname where the passive check is linked to.
required: true
env:
- name : NRDP_HOSTNAME
ini:
- section: callback_nrdp
key: hostname
type: string
servicename:
description: service where the passive check is linked to
required: True
description: Service where the passive check is linked to.
required: true
env:
- name : NRDP_SERVICENAME
ini:
- section: callback_nrdp
key: servicename
type: string
'''
import os