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 name: nrdp
type: notification type: notification
author: "Remi VERCHERE (@rverchere)" 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: description:
- this callback send playbook result to nagios - This callback send playbook result to Nagios.
- nagios shall use NRDP to recive passive events - Nagios shall use NRDP to recive passive events.
- the passive check is sent to a dedicated host/service for ansible - The passive check is sent to a dedicated host/service for Ansible.
options: options:
url: url:
description: url of the nrdp server description: URL of the nrdp server.
required: True required: true
env: env:
- name : NRDP_URL - name : NRDP_URL
ini: ini:
- section: callback_nrdp - section: callback_nrdp
key: url key: url
type: string
validate_certs: 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: env:
- name: NRDP_VALIDATE_CERTS - name: NRDP_VALIDATE_CERTS
ini: ini:
@ -33,32 +34,36 @@ DOCUMENTATION = '''
key: validate_nrdp_certs key: validate_nrdp_certs
- section: callback_nrdp - section: callback_nrdp
key: validate_certs key: validate_certs
default: False type: boolean
default: false
aliases: [ validate_nrdp_certs ] aliases: [ validate_nrdp_certs ]
token: token:
description: token to be allowed to push nrdp events description: Token to be allowed to push nrdp events.
required: True required: true
env: env:
- name: NRDP_TOKEN - name: NRDP_TOKEN
ini: ini:
- section: callback_nrdp - section: callback_nrdp
key: token key: token
type: string
hostname: hostname:
description: hostname where the passive check is linked to description: Hostname where the passive check is linked to.
required: True required: true
env: env:
- name : NRDP_HOSTNAME - name : NRDP_HOSTNAME
ini: ini:
- section: callback_nrdp - section: callback_nrdp
key: hostname key: hostname
type: string
servicename: servicename:
description: service where the passive check is linked to description: Service where the passive check is linked to.
required: True required: true
env: env:
- name : NRDP_SERVICENAME - name : NRDP_SERVICENAME
ini: ini:
- section: callback_nrdp - section: callback_nrdp
key: servicename key: servicename
type: string
''' '''
import os import os