mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Idempotency fix for iosxr_config (#22365)
Multiple fixes to address idempotency issues, along with refactor of module_utils iosxr to look like ios, for code consistency. Fixes #22315
This commit is contained in:
parent
ec9582fd83
commit
fd6429fbd1
2 changed files with 17 additions and 7 deletions
|
@ -258,10 +258,8 @@ def main():
|
|||
result['commands'] = commands
|
||||
|
||||
if commands:
|
||||
commit = not module.check_mode
|
||||
response = load_config(module, commands, commit=commit)
|
||||
if response.get('diff') and module._diff:
|
||||
result['diff'] = {'prepared': response.get('diff')}
|
||||
if not module.check_mode:
|
||||
load_config(module, commands, commit=True)
|
||||
result['changed'] = True
|
||||
|
||||
module.exit_json(**result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue