mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
This reverts commit 4349b56643.
This commit is contained in:
@@ -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']),
|
||||
|
||||
Reference in New Issue
Block a user