network, eos_config: when the config session show no diff, set 'changed' to False (#54678)

pull/54761/head
b-abadie 6 years ago committed by Ganesh Nalawade
parent d100faedb3
commit 70f315b7a4

@ -435,14 +435,17 @@ def main():
response = load_config(module, commands, replace=replace, commit=commit)
if 'diff' in response and module.params['diff_against'] == 'session':
result['diff'] = {'prepared': response['diff']}
result['changed'] = True
if module.params['diff_against'] == 'session':
if 'diff' in response:
result['diff'] = {'prepared': response['diff']}
else:
result['changed'] = False
if 'session' in response:
result['session'] = response['session']
result['changed'] = True
running_config = module.params['running_config']
startup_config = None

Loading…
Cancel
Save