Fix 5646 junos_config issue if config format is text (#5658)
If 'src_format' is not mentioned in playbook and config is in text format a list object is passed to 'guess_format' function instead of string, hence TypeError execption is seen. Fix is to pass string object instead of list.
This commit is contained in:
parent
2ba5967673
commit
d39ae36ab1
1 changed files with 1 additions and 1 deletions
|
@ -245,7 +245,7 @@ def load_config(module, result):
|
|||
kwargs['commit'] = not module.check_mode
|
||||
|
||||
if module.params['src']:
|
||||
config_format = module.params['src_format'] or guess_format(candidate)
|
||||
config_format = module.params['src_format'] or guess_format(str(candidate))
|
||||
elif module.params['lines']:
|
||||
config_format = 'set'
|
||||
kwargs['config_format'] = config_format
|
||||
|
|
Loading…
Reference in a new issue