mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-09 01:44:03 -07:00
code cleanup for --diff
and --check
modes (#33665)
* code cleanup for `--diff` and `--check` modes * fixes UT to remove exec_command
This commit is contained in:
parent
4d67cdd1f7
commit
012a96dabd
9 changed files with 68 additions and 55 deletions
|
@ -246,11 +246,12 @@ def run(module, result):
|
|||
|
||||
result['commands'] = commands
|
||||
|
||||
diff = load_config(module, commands, result['warnings'],
|
||||
not check_mode, replace_config, comment, admin)
|
||||
commit = not check_mode
|
||||
diff = load_config(module, commands, commit=commit, replace=replace_config,
|
||||
comment=comment, admin=admin)
|
||||
if diff:
|
||||
result['diff'] = dict(prepared=diff)
|
||||
result['changed'] = True
|
||||
result['changed'] = True
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue