mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
return as unchanged if macro update is unnecessary
This commit is contained in:
parent
3956549e6c
commit
9779792b07
1 changed files with 2 additions and 0 deletions
|
@ -147,6 +147,8 @@ class HostMacro(object):
|
|||
# update host macro
|
||||
def update_host_macro(self, host_macro_obj, macro_name, macro_value):
|
||||
host_macro_id = host_macro_obj['hostmacroid']
|
||||
if host_macro_obj['macro'] == '{$'+macro_name+'}' and host_macro_obj['value'] == macro_value:
|
||||
self._module.exit_json(changed=False, result="Host macro %s already up to date" % macro_name)
|
||||
try:
|
||||
if self._module.check_mode:
|
||||
self._module.exit_json(changed=True)
|
||||
|
|
Loading…
Reference in a new issue