mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-06 00:14:02 -07:00
This reverts commit 4349b56643
.
This commit is contained in:
parent
b6528ea19f
commit
ea18b9021a
15 changed files with 200 additions and 195 deletions
|
@ -137,6 +137,7 @@ import time
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
from ansible.module_utils.network.common.parsing import Conditional
|
||||
from ansible.module_utils.network.common.utils import ComplexList
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.network.vyos.vyos import run_commands
|
||||
from ansible.module_utils.network.vyos.vyos import vyos_argument_spec
|
||||
|
@ -150,7 +151,12 @@ def to_lines(stdout):
|
|||
|
||||
|
||||
def parse_commands(module, warnings):
|
||||
commands = module.params['commands']
|
||||
command = ComplexList(dict(
|
||||
command=dict(key=True),
|
||||
prompt=dict(),
|
||||
answer=dict(),
|
||||
), module)
|
||||
commands = command(module.params['commands'])
|
||||
items = []
|
||||
|
||||
for item in commands:
|
||||
|
@ -164,15 +170,8 @@ def parse_commands(module, warnings):
|
|||
|
||||
|
||||
def main():
|
||||
|
||||
command_spec = dict(
|
||||
command=dict(key=True),
|
||||
prompt=dict(),
|
||||
answer=dict()
|
||||
)
|
||||
|
||||
spec = dict(
|
||||
commands=dict(type='list', elements='dict', options=command_spec, required=True),
|
||||
commands=dict(type='list', required=True),
|
||||
|
||||
wait_for=dict(type='list', aliases=['waitfor']),
|
||||
match=dict(default='all', choices=['all', 'any']),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue