mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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:
committed by
Matt Clay
parent
2ba5967673
commit
d39ae36ab1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user