* cli_config return commands bug fix * Spacing error * Added notes section * Spacing error * Spacing error * Spacing error * Spacing error
This commit is contained in:
parent
9272e3d547
commit
6044325dec
1 changed files with 10 additions and 2 deletions
|
@ -18,6 +18,9 @@ DOCUMENTATION = """
|
||||||
module: cli_config
|
module: cli_config
|
||||||
version_added: "2.7"
|
version_added: "2.7"
|
||||||
author: "Trishna Guha (@trishnaguha)"
|
author: "Trishna Guha (@trishnaguha)"
|
||||||
|
notes:
|
||||||
|
- The commands will be returned only for platforms that do not support onbox diff.
|
||||||
|
The C(--diff) option with the playbook will return the difference in configuration for devices that has support for onbox diff
|
||||||
short_description: Push text based configuration to network devices over network_cli
|
short_description: Push text based configuration to network devices over network_cli
|
||||||
description:
|
description:
|
||||||
- This module provides platform agnostic way of pushing text based
|
- This module provides platform agnostic way of pushing text based
|
||||||
|
@ -297,11 +300,16 @@ def run(module, device_operations, connection, candidate, running, rollback_id):
|
||||||
else:
|
else:
|
||||||
candidate = config_diff.splitlines()
|
candidate = config_diff.splitlines()
|
||||||
|
|
||||||
kwargs = {'candidate': candidate, 'commit': commit, 'replace': replace,
|
kwargs = {
|
||||||
'comment': commit_comment}
|
'candidate': candidate,
|
||||||
|
'commit': commit,
|
||||||
|
'replace': replace,
|
||||||
|
'comment': commit_comment
|
||||||
|
}
|
||||||
if commit:
|
if commit:
|
||||||
connection.edit_config(**kwargs)
|
connection.edit_config(**kwargs)
|
||||||
result['changed'] = True
|
result['changed'] = True
|
||||||
|
result['commands'] = config_diff.split('\n')
|
||||||
|
|
||||||
if banner_diff:
|
if banner_diff:
|
||||||
candidate = json.dumps(banner_diff)
|
candidate = json.dumps(banner_diff)
|
||||||
|
|
Loading…
Reference in a new issue