mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07:00
Fall-back to show configuration on old IOSXR devices (#22900)
In old IOSXR versions, 'show commit changes diff' does not work. Fall-back to 'show configuration' if that command fails so execution can move forward. Fixes #22235
This commit is contained in:
parent
6c101087ac
commit
cc7e09451a
4 changed files with 12 additions and 5 deletions
|
@ -240,8 +240,8 @@ def run(module, result):
|
|||
|
||||
result['commands'] = commands
|
||||
|
||||
diff = load_config(module, commands, not check_mode,
|
||||
replace_config, comment)
|
||||
diff = load_config(module, commands, result['warnings'],
|
||||
not check_mode, replace_config, comment)
|
||||
if diff:
|
||||
result['diff'] = dict(prepared=diff)
|
||||
result['changed'] = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue