Added a source parameter for setting the JIT client name

pull/18777/head
James Moore 9 years ago committed by Matt Clay
parent 9e918b5955
commit 0ecaea3ac1

@ -156,6 +156,12 @@ options:
- You can't rewrite others module parameters using this - You can't rewrite others module parameters using this
required: false required: false
default: {} default: {}
source:
version_added: "2.1"
description:
- The check source, used to create a JIT Sensu client for an external resource (e.g. a network switch).
required: false
default: null
requirements: [ ] requirements: [ ]
author: "Anders Ingemann (@andsens)" author: "Anders Ingemann (@andsens)"
''' '''
@ -251,6 +257,7 @@ def sensu_check(module, path, name, state='present', backup=False):
'aggregate', 'aggregate',
'low_flap_threshold', 'low_flap_threshold',
'high_flap_threshold', 'high_flap_threshold',
'source',
] ]
for opt in simple_opts: for opt in simple_opts:
if module.params[opt] is not None: if module.params[opt] is not None:
@ -353,6 +360,7 @@ def main():
'low_flap_threshold': {'type': 'int'}, 'low_flap_threshold': {'type': 'int'},
'high_flap_threshold': {'type': 'int'}, 'high_flap_threshold': {'type': 'int'},
'custom': {'type': 'dict'}, 'custom': {'type': 'dict'},
'source': {'type': 'str'},
} }
required_together = [['subdue_begin', 'subdue_end']] required_together = [['subdue_begin', 'subdue_end']]

Loading…
Cancel
Save