mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
@@ -263,7 +263,7 @@ def main():
|
||||
commands = dumps(configobjs, 'commands')
|
||||
if ((isinstance((module.params['lines']), list)) and
|
||||
(isinstance((module.params['lines'][0]), dict)) and
|
||||
(['prompt', 'answer'].issubset(module.params['lines'][0]))):
|
||||
(set(['prompt', 'answer']).issubset(module.params['lines'][0]))):
|
||||
|
||||
cmd = {'command': commands,
|
||||
'prompt': module.params['lines'][0]['prompt'],
|
||||
|
||||
@@ -262,7 +262,7 @@ def main():
|
||||
commands = dumps(configobjs, 'commands')
|
||||
if ((isinstance(module.params['lines'], list)) and
|
||||
(isinstance(module.params['lines'][0], dict)) and
|
||||
['prompt', 'answer'].issubset(module.params['lines'][0])):
|
||||
set(['prompt', 'answer']).issubset(module.params['lines'][0])):
|
||||
cmd = {'command': commands,
|
||||
'prompt': module.params['lines'][0]['prompt'],
|
||||
'answer': module.params['lines'][0]['answer']}
|
||||
@@ -287,7 +287,7 @@ def main():
|
||||
result['changed'] = True
|
||||
if not module.check_mode:
|
||||
cmd = {'command': 'copy running-config startup-config',
|
||||
'prompt': r'\(y/n\)$', 'answer': 'yes'}
|
||||
'prompt': r'\(y/n\)\s?$', 'answer': 'yes'}
|
||||
run_commands(module, [cmd])
|
||||
result['saved'] = True
|
||||
else:
|
||||
|
||||
@@ -270,7 +270,7 @@ def main():
|
||||
commands = dumps(configobjs, 'commands')
|
||||
if ((isinstance(module.params['lines'], list)) and
|
||||
(isinstance(module.params['lines'][0], dict)) and
|
||||
['prompt', 'answer'].issubset(module.params['lines'][0])):
|
||||
set(['prompt', 'answer']).issubset(module.params['lines'][0])):
|
||||
|
||||
cmd = {'command': commands,
|
||||
'prompt': module.params['lines'][0]['prompt'],
|
||||
|
||||
Reference in New Issue
Block a user