bug fix in ios_config module for handling config contents

Config contents when passed via argument were returning a string but
the module expects an instance of NetworkConfig.  This fixes that
problem.
This commit is contained in:
Peter Sprygada 2016-07-13 14:45:26 -07:00 committed by Matt Clay
parent 5eb4e0dd0d
commit 25294f40c8

View file

@ -202,7 +202,7 @@ def check_args(module, warnings):
def get_candidate(module):
candidate = NetworkConfig(indent=1)
if module.params['src']:
candidate = module.params['src']
candidate.load(module.params['src'])
elif module.params['lines']:
parents = module.params['parents'] or list()
candidate.add(module.params['lines'], parents=parents)