mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
parent
87f004c503
commit
1152f86ba1
5 changed files with 13 additions and 11 deletions
|
@ -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'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue