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

This commit is contained in:
b-abadie 2019-04-03 07:01:11 +02:00 committed by Ganesh Nalawade
parent d100faedb3
commit 70f315b7a4

View file

@ -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['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