From 8bb4b9818cf9450c3e19e65bb31a7f23b147e0e1 Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Thu, 4 Aug 2016 11:24:28 -0400 Subject: [PATCH] Fix ios_config broken logic --- network/ios/ios_config.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/network/ios/ios_config.py b/network/ios/ios_config.py index ae48b720137..14090db8cb6 100644 --- a/network/ios/ios_config.py +++ b/network/ios/ios_config.py @@ -193,7 +193,7 @@ responses: sample: ['...', '...'] """ from ansible.module_utils.netcfg import NetworkConfig, dumps -from ansible.module_utils.ios import NetworkModule +from ansible.module_utils.network import NetworkModule from ansible.module_utils.ios import load_config, get_config, ios_argument_spec def invoke(name, *args, **kwargs): @@ -271,9 +271,10 @@ def main(): commands = list() if configobjs: commands = dumps(configobjs, 'commands') + commands = commands.split('\n') if module.params['before']: - commands[:0] = before + commands[:0] = module.params['before'] if module.params['after']: commands.extend(module.params['after']) @@ -284,9 +285,6 @@ def main(): result['changed'] = True - if commands: - commands = commands.split('\n') - result['updates'] = commands result['connected'] = module.connected