vyos: Docs fixes

This commit is contained in:
John Barker
2016-08-05 15:14:04 +01:00
committed by Matt Clay
parent d76a4e71c2
commit ecc7e445b5
3 changed files with 26 additions and 21 deletions

View File

@@ -24,7 +24,7 @@ author: "Peter Sprygada (@privateip)"
short_description: Run one or more commands on VyOS devices
description:
- The command module allows running one or more commands on remote
devices running VyOS. The mdoule commands can also be introspected
devices running VyOS. This module can also be introspected
to validate key parameters before returning successfully. If the
conditional statements are not met in the wait period, the task
fails.
@@ -36,7 +36,7 @@ options:
running VyOS. The output from the command execution is
returned to the playbook. If the I(wait_for) argument is
provided, the module is not returned until the condition is
satistifed or the number of retries has been exceeded.
satisfied or the number of retries has been exceeded.
required: true
wait_for:
description:
@@ -44,7 +44,7 @@ options:
and what conditionals to apply. This argument will cause
the task to wait for a particular conditional to be true
before moving forward. If the conditional is not true
by the configured retries, the task fails. See examples.
by the configured I(retries), the task fails. See examples.
required: false
default: null
aliases: ['waitfor']
@@ -52,13 +52,13 @@ options:
description:
- Specifies the number of retries a command should be tried
before it is considered failed. The command is run on the
target device every retry and evaluated against the waitfor
conditionals
target device every retry and evaluated against the I(wait_for)
conditionals.
required: false
default: 10
interval:
description:
- Configures the interval in seconds to wait between retries
- Configures the interval in seconds to wait between I(retries)
of the command. If the command does not pass the specified
conditional, the interval indicates how to long to wait before
trying the command again.
@@ -115,16 +115,19 @@ warnings:
type: list
sample: ['...', '...']
"""
from ansible.module_utils.netcmd import CommandRunner, FailedConditionsError
from ansible.module_utils.vyos import NetworkModule, NetworkError
from ansible.module_utils.vyos import vyos_argument_spec, get_exception
def to_lines(stdout):
for item in stdout:
if isinstance(item, basestring):
item = str(item).split('\n')
yield item
def main():
"""Main entry point for Ansible module execution
"""
@@ -140,7 +143,6 @@ def main():
connect_on_load=False,
supports_check_mode=True)
commands = module.params['commands']
conditionals = module.params['wait_for'] or list()
@@ -192,4 +194,3 @@ def main():
if __name__ == '__main__':
main()