fixes junos_config to be idempotent when confirming a commit (#4946)

The junos_config module would always return true when confirming a commit
This changes the module to now check first making the feature idempontent
pull/18777/head
Peter Sprygada 8 years ago committed by Matt Clay
parent cb9ec9f802
commit b06123e986

@ -231,9 +231,8 @@ def zeroize_config(module, result):
result['changed'] = True result['changed'] = True
def confirm_config(module, result): def confirm_config(module, result):
if not module.check_mode: checkonly = module.check_mode
module.connection.commit_config() result['changed'] = module.connection.confirm_commit(checkonly)
result['changed'] = True
def run(module, result): def run(module, result):
if module.params['rollback']: if module.params['rollback']:

Loading…
Cancel
Save