when write_config is no, we should not try to write any configuration changes
This commit is contained in:
parent
7a73e2a3aa
commit
34b4c34306
1 changed files with 2 additions and 2 deletions
|
@ -257,8 +257,8 @@ def main():
|
||||||
else:
|
else:
|
||||||
result = dict(msg="the server was not present")
|
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 the config has changed, save the config unless otherwise requested
|
||||||
if changed or write_config:
|
if changed and write_config:
|
||||||
write_result = axapi_call(module, session_url + '&method=system.action.write_memory')
|
write_result = axapi_call(module, session_url + '&method=system.action.write_memory')
|
||||||
if axapi_failure(write_result):
|
if axapi_failure(write_result):
|
||||||
module.fail_json(msg="failed to save the configuration: %s" % write_result['response']['err']['msg'])
|
module.fail_json(msg="failed to save the configuration: %s" % write_result['response']['err']['msg'])
|
||||||
|
|
Loading…
Reference in a new issue