mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-30 21:34:38 +02:00
Fix sanity errors. (#55)
This commit is contained in:
parent
65034de769
commit
4ccd70cc8f
8 changed files with 16 additions and 27 deletions
3
changelogs/fragments/55-linting.yml
Normal file
3
changelogs/fragments/55-linting.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
minor_changes:
|
||||
- "command - the ``commands`` and ``wait_for`` options now convert the list elements to strings (https://github.com/ansible-collections/community.routeros/pull/55)."
|
||||
- "facts - the ``gather_subset`` option now converts the list elements to strings (https://github.com/ansible-collections/community.routeros/pull/55)."
|
|
@ -27,6 +27,8 @@ options:
|
|||
module is not returned until the condition is satisfied or
|
||||
the number of retries has expired.
|
||||
required: true
|
||||
type: list
|
||||
elements: str
|
||||
wait_for:
|
||||
description:
|
||||
- List of conditions to evaluate against the output of the
|
||||
|
@ -34,6 +36,8 @@ options:
|
|||
before moving forward. If the conditional is not true
|
||||
within the configured number of retries, the task fails.
|
||||
See examples.
|
||||
type: list
|
||||
elements: str
|
||||
match:
|
||||
description:
|
||||
- The I(match) argument is used in conjunction with the
|
||||
|
@ -44,6 +48,7 @@ options:
|
|||
satisfied.
|
||||
default: all
|
||||
choices: ['any', 'all']
|
||||
type: str
|
||||
retries:
|
||||
description:
|
||||
- Specifies the number of retries a command should by tried
|
||||
|
@ -51,6 +56,7 @@ options:
|
|||
target device every retry and evaluated against the
|
||||
I(wait_for) conditions.
|
||||
default: 10
|
||||
type: int
|
||||
interval:
|
||||
description:
|
||||
- Configures the interval in seconds to wait between retries
|
||||
|
@ -58,6 +64,7 @@ options:
|
|||
conditions, the interval indicates how long to wait before
|
||||
trying the command again.
|
||||
default: 1
|
||||
type: int
|
||||
seealso:
|
||||
- ref: ansible_collections.community.routeros.docsite.ssh-guide
|
||||
description: How to connect to RouterOS devices with SSH
|
||||
|
@ -131,10 +138,10 @@ def main():
|
|||
"""main entry point for module execution
|
||||
"""
|
||||
argument_spec = dict(
|
||||
commands=dict(type='list', required=True),
|
||||
commands=dict(type='list', elements='str', required=True),
|
||||
|
||||
wait_for=dict(type='list'),
|
||||
match=dict(default='all', choices=['all', 'any']),
|
||||
wait_for=dict(type='list', elements='str'),
|
||||
match=dict(type='str', default='all', choices=['all', 'any']),
|
||||
|
||||
retries=dict(default=10, type='int'),
|
||||
interval=dict(default=1, type='int')
|
||||
|
|
|
@ -27,6 +27,8 @@ options:
|
|||
not be collected.
|
||||
required: false
|
||||
default: '!config'
|
||||
type: list
|
||||
elements: str
|
||||
seealso:
|
||||
- ref: ansible_collections.community.routeros.docsite.ssh-guide
|
||||
description: How to connect to RouterOS devices with SSH
|
||||
|
@ -586,7 +588,7 @@ def main():
|
|||
"""main entry point for module execution
|
||||
"""
|
||||
argument_spec = dict(
|
||||
gather_subset=dict(default=['!config'], type='list')
|
||||
gather_subset=dict(default=['!config'], type='list', elements='str')
|
||||
)
|
||||
|
||||
argument_spec.update(routeros_argument_spec)
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
plugins/modules/command.py validate-modules:doc-missing-type
|
||||
plugins/modules/command.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/facts.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc
|
|
@ -1,5 +0,0 @@
|
|||
plugins/modules/command.py validate-modules:doc-missing-type
|
||||
plugins/modules/command.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/facts.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc
|
|
@ -1,5 +0,0 @@
|
|||
plugins/modules/command.py validate-modules:doc-missing-type
|
||||
plugins/modules/command.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/facts.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc
|
|
@ -1,5 +0,0 @@
|
|||
plugins/modules/command.py validate-modules:doc-missing-type
|
||||
plugins/modules/command.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/facts.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc
|
|
@ -1,3 +0,0 @@
|
|||
plugins/modules/command.py validate-modules:doc-missing-type
|
||||
plugins/modules/command.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/facts.py validate-modules:parameter-type-not-in-doc
|
Loading…
Add table
Add a link
Reference in a new issue