(cherry picked from commit 990ba90380
)
This commit is contained in:
parent
4f56567963
commit
3cd89bd8a4
1 changed files with 3 additions and 2 deletions
|
@ -234,8 +234,6 @@ def filter_delete_statements(module, candidate):
|
||||||
|
|
||||||
def configure_device(module, warnings):
|
def configure_device(module, warnings):
|
||||||
candidate = module.params['lines'] or module.params['src']
|
candidate = module.params['lines'] or module.params['src']
|
||||||
if isinstance(candidate, string_types):
|
|
||||||
candidate = candidate.split('\n')
|
|
||||||
|
|
||||||
kwargs = {
|
kwargs = {
|
||||||
'comment': module.params['comment'],
|
'comment': module.params['comment'],
|
||||||
|
@ -257,6 +255,9 @@ def configure_device(module, warnings):
|
||||||
else:
|
else:
|
||||||
kwargs.update({'format': config_format, 'action': module.params['update']})
|
kwargs.update({'format': config_format, 'action': module.params['update']})
|
||||||
|
|
||||||
|
if isinstance(candidate, string_types):
|
||||||
|
candidate = candidate.split('\n')
|
||||||
|
|
||||||
# this is done to filter out `delete ...` statements which map to
|
# this is done to filter out `delete ...` statements which map to
|
||||||
# nothing in the config as that will cause an exception to be raised
|
# nothing in the config as that will cause an exception to be raised
|
||||||
if any((module.params['lines'], config_format == 'set')):
|
if any((module.params['lines'], config_format == 'set')):
|
||||||
|
|
Loading…
Reference in a new issue