check_mode in nxos_static_route module (#44252)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2018-08-16 14:30:47 +05:30 committed by GitHub
parent aef5099695
commit 7e39c5bf07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -280,13 +280,11 @@ def main():
candidate = CustomNetworkConfig(indent=3)
reconcile_candidate(module, candidate, prefix, w)
if candidate:
if not module.check_mode and candidate:
candidate = candidate.items_text()
load_config(module, candidate)
result['commands'].extend(candidate)
result['changed'] = True
else:
result['commands'] = []
module.exit_json(**result)