fixes issue where the configobjs are not deserialized to a list

When the configuration is compared and the results deserialized, the
dumps() function returns a string.  This cohereces the return to a list
in case before and/or after needs to be applied

fixes 4707
This commit is contained in:
Peter Sprygada 2016-09-05 15:38:21 -04:00 committed by Matt Clay
commit db49e1e436
3 changed files with 6 additions and 6 deletions

View file

@ -264,7 +264,7 @@ def run(module, result):
configobjs = candidate.items
if configobjs:
commands = dumps(configobjs, 'commands')
commands = dumps(configobjs, 'commands').split('\n')
if module.params['before']:
commands[:0] = module.params['before']
@ -272,7 +272,7 @@ def run(module, result):
if module.params['after']:
commands.extend(module.params['after'])
result['updates'] = commands.split('\n')
result['updates'] = commands
if update != 'check':
load_config(module, commands, result)