mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixes up doc strings in ios modules (#20210)
This commit is contained in:
parent
f534573dcf
commit
6ef9a0af4b
2 changed files with 36 additions and 17 deletions
|
@ -35,7 +35,9 @@ description:
|
|||
before returning or timing out if the condition is not met.
|
||||
- This module does not support running commands in configuration mode.
|
||||
Please use M(ios_config) to configure IOS devices.
|
||||
extends_documentation_fragment: ios
|
||||
notes:
|
||||
- Provider arguments are no longer supported. Network tasks should now
|
||||
specify connection plugin network_cli instead.
|
||||
options:
|
||||
commands:
|
||||
description:
|
||||
|
@ -87,33 +89,21 @@ options:
|
|||
"""
|
||||
|
||||
EXAMPLES = """
|
||||
# Note: examples below use the following provider dict to handle
|
||||
# transport and authentication to the node.
|
||||
vars:
|
||||
cli:
|
||||
host: "{{ inventory_hostname }}"
|
||||
username: cisco
|
||||
password: cisco
|
||||
transport: cli
|
||||
|
||||
tasks:
|
||||
- name: run show version on remote devices
|
||||
ios_command:
|
||||
commands: show version
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run show version and check to see if output contains IOS
|
||||
ios_command:
|
||||
commands: show version
|
||||
wait_for: result[0] contains IOS
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run multiple commands on remote nodes
|
||||
ios_command:
|
||||
commands:
|
||||
- show version
|
||||
- show interfaces
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run multiple commands and evaluate the output
|
||||
ios_command:
|
||||
|
@ -123,7 +113,6 @@ tasks:
|
|||
wait_for:
|
||||
- result[0] contains IOS
|
||||
- result[1] contains Loopback0
|
||||
provider: "{{ cli }}"
|
||||
"""
|
||||
|
||||
RETURN = """
|
||||
|
@ -132,18 +121,31 @@ stdout:
|
|||
returned: always
|
||||
type: list
|
||||
sample: ['...', '...']
|
||||
|
||||
stdout_lines:
|
||||
description: The value of stdout split into a list
|
||||
returned: always
|
||||
type: list
|
||||
sample: [['...', '...'], ['...'], ['...']]
|
||||
|
||||
failed_conditions:
|
||||
description: The list of conditionals that have failed
|
||||
returned: failed
|
||||
type: list
|
||||
sample: ['...', '...']
|
||||
start:
|
||||
description: The time the job started
|
||||
returned: always
|
||||
type: str
|
||||
sample: "2016-11-16 10:38:15.126146"
|
||||
end:
|
||||
description: The time the job ended
|
||||
returned: always
|
||||
type: str
|
||||
sample: "2016-11-16 10:38:25.595612"
|
||||
delta:
|
||||
description: The time elapsed to perform all operations
|
||||
returned: always
|
||||
type: str
|
||||
sample: "0:00:10.469466"
|
||||
"""
|
||||
import time
|
||||
|
||||
|
|
|
@ -33,7 +33,9 @@ description:
|
|||
for segmenting configuration into sections. This module provides
|
||||
an implementation for working with IOS configuration sections in
|
||||
a deterministic way.
|
||||
extends_documentation_fragment: ios
|
||||
notes:
|
||||
- Provider arguments are no longer supported. Network tasks should now
|
||||
specify connection plugin network_cli instead.
|
||||
options:
|
||||
lines:
|
||||
description:
|
||||
|
@ -202,6 +204,21 @@ backup_path:
|
|||
returned: when backup is yes
|
||||
type: path
|
||||
sample: /playbooks/ansible/backup/ios_config.2016-07-16@22:28:34
|
||||
start:
|
||||
description: The time the job started
|
||||
returned: always
|
||||
type: str
|
||||
sample: "2016-11-16 10:38:15.126146"
|
||||
end:
|
||||
description: The time the job ended
|
||||
returned: always
|
||||
type: str
|
||||
sample: "2016-11-16 10:38:25.595612"
|
||||
delta:
|
||||
description: The time elapsed to perform all operations
|
||||
returned: always
|
||||
type: str
|
||||
sample: "0:00:10.469466"
|
||||
"""
|
||||
import re
|
||||
import time
|
||||
|
|
Loading…
Reference in a new issue