1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

when write_config is no, we should not try to write any configuration changes

This commit is contained in:
Massimo Gervasini 2016-08-06 18:48:26 +08:00 committed by Matt Clay
parent 66af5335c2
commit c934ab7e8b

View file

@ -257,8 +257,8 @@ def main():
else:
result = dict(msg="the server was not present")
# if the config has changed, or we want to force a save, save the config unless otherwise requested
if changed or write_config:
# if the config has changed, save the config unless otherwise requested
if changed and write_config:
write_result = axapi_call(module, session_url + '&method=system.action.write_memory')
if axapi_failure(write_result):
module.fail_json(msg="failed to save the configuration: %s" % write_result['response']['err']['msg'])