mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-09 09:54:02 -07:00
Update iosxr cliconf plugin (#43837)
* Update iosxr cliconf plugin Fixes #39056 * Update iosxr cliconf plugin * Modify iosxr module_utils code to support refactored cliconf plugin api's * Other minor changes * Fix unit test failure * Update ios, eos, nxos plugin for diff * Fix review comment
This commit is contained in:
parent
7b1cc11685
commit
d1de1e0449
14 changed files with 217 additions and 153 deletions
|
@ -366,6 +366,8 @@ def run(module, result):
|
|||
running_config = get_running_config(module)
|
||||
|
||||
commands = None
|
||||
replace_file_path = None
|
||||
|
||||
if match != 'none' and replace != 'config':
|
||||
commands = candidate_config.difference(running_config, path=path, match=match, replace=replace)
|
||||
elif replace_config:
|
||||
|
@ -380,6 +382,7 @@ def run(module, result):
|
|||
module.fail_json(msg='Copy of config file to the node failed')
|
||||
|
||||
commands = ['load harddisk:/ansible_config.txt']
|
||||
replace_file_path = 'harddisk:/ansible_config.txt'
|
||||
else:
|
||||
commands = candidate_config.items
|
||||
|
||||
|
@ -399,7 +402,7 @@ def run(module, result):
|
|||
commit = not check_mode
|
||||
diff = load_config(
|
||||
module, commands, commit=commit,
|
||||
replace=replace_config, comment=comment, admin=admin,
|
||||
replace=replace_file_path, comment=comment, admin=admin,
|
||||
label=label
|
||||
)
|
||||
if diff:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue