network, eos_config: when the config session show no diff, set 'changed' to False (#54678)
This commit is contained in:
parent
d100faedb3
commit
70f315b7a4
1 changed files with 7 additions and 4 deletions
|
@ -435,14 +435,17 @@ def main():
|
||||||
|
|
||||||
response = load_config(module, commands, replace=replace, commit=commit)
|
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']}
|
result['diff'] = {'prepared': response['diff']}
|
||||||
|
else:
|
||||||
|
result['changed'] = False
|
||||||
|
|
||||||
if 'session' in response:
|
if 'session' in response:
|
||||||
result['session'] = response['session']
|
result['session'] = response['session']
|
||||||
|
|
||||||
result['changed'] = True
|
|
||||||
|
|
||||||
running_config = module.params['running_config']
|
running_config = module.params['running_config']
|
||||||
startup_config = None
|
startup_config = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue