mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixes bug introduced in 3670215 in junos_config (#5251)
The previous fix created a new bug that this PR resolves
This commit is contained in:
parent
25b6492d37
commit
2127459794
1 changed files with 3 additions and 1 deletions
|
@ -217,7 +217,7 @@ def diff_commands(commands, config):
|
|||
updates = list()
|
||||
visited = set()
|
||||
|
||||
for item in commands.split('\n'):
|
||||
for item in commands:
|
||||
if len(item) > 0:
|
||||
if not item.startswith('set') and not item.startswith('delete'):
|
||||
raise ValueError('line must start with either `set` or `delete`')
|
||||
|
@ -235,6 +235,8 @@ def diff_commands(commands, config):
|
|||
|
||||
def load_config(module, result):
|
||||
candidate = module.params['lines'] or module.params['src']
|
||||
if isinstance(candidate, basestring):
|
||||
candidate = candidate.split('\n')
|
||||
|
||||
kwargs = dict()
|
||||
kwargs['comment'] = module.params['comment']
|
||||
|
|
Loading…
Reference in a new issue