|
|
|
@ -81,6 +81,7 @@ options:
|
|
|
|
template:
|
|
|
|
template:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The template used to define the host.
|
|
|
|
- The template used to define the host.
|
|
|
|
|
|
|
|
- Template cannot be modified after object creation.
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
default: None
|
|
|
|
default: None
|
|
|
|
check_command:
|
|
|
|
check_command:
|
|
|
|
@ -294,7 +295,12 @@ def main():
|
|
|
|
elif icinga.diff(name, data):
|
|
|
|
elif icinga.diff(name, data):
|
|
|
|
if module.check_mode:
|
|
|
|
if module.check_mode:
|
|
|
|
module.exit_json(changed=False, name=name, data=data)
|
|
|
|
module.exit_json(changed=False, name=name, data=data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Template attribute is not allowed in modification
|
|
|
|
|
|
|
|
del data['attrs']['templates']
|
|
|
|
|
|
|
|
|
|
|
|
ret = icinga.modify(name, data)
|
|
|
|
ret = icinga.modify(name, data)
|
|
|
|
|
|
|
|
|
|
|
|
if ret['code'] == 200:
|
|
|
|
if ret['code'] == 200:
|
|
|
|
changed = True
|
|
|
|
changed = True
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|