mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
icinga2_host: Don't set template attribute on modification, it's not permitted (#33989)
This commit is contained in:
parent
3af028fdd7
commit
b25e333076
1 changed files with 6 additions and 0 deletions
|
@ -81,6 +81,7 @@ options:
|
|||
template:
|
||||
description:
|
||||
- The template used to define the host.
|
||||
- Template cannot be modified after object creation.
|
||||
required: false
|
||||
default: None
|
||||
check_command:
|
||||
|
@ -294,7 +295,12 @@ def main():
|
|||
elif icinga.diff(name, data):
|
||||
if module.check_mode:
|
||||
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)
|
||||
|
||||
if ret['code'] == 200:
|
||||
changed = True
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue