1
0
Fork 0
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:
Peter Sprygada 2017-01-12 21:48:58 -05:00 committed by GitHub
parent f534573dcf
commit 6ef9a0af4b
2 changed files with 36 additions and 17 deletions

View file

@ -35,7 +35,9 @@ description:
before returning or timing out if the condition is not met. before returning or timing out if the condition is not met.
- This module does not support running commands in configuration mode. - This module does not support running commands in configuration mode.
Please use M(ios_config) to configure IOS devices. 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: options:
commands: commands:
description: description:
@ -87,33 +89,21 @@ options:
""" """
EXAMPLES = """ 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: tasks:
- name: run show version on remote devices - name: run show version on remote devices
ios_command: ios_command:
commands: show version commands: show version
provider: "{{ cli }}"
- name: run show version and check to see if output contains IOS - name: run show version and check to see if output contains IOS
ios_command: ios_command:
commands: show version commands: show version
wait_for: result[0] contains IOS wait_for: result[0] contains IOS
provider: "{{ cli }}"
- name: run multiple commands on remote nodes - name: run multiple commands on remote nodes
ios_command: ios_command:
commands: commands:
- show version - show version
- show interfaces - show interfaces
provider: "{{ cli }}"
- name: run multiple commands and evaluate the output - name: run multiple commands and evaluate the output
ios_command: ios_command:
@ -123,7 +113,6 @@ tasks:
wait_for: wait_for:
- result[0] contains IOS - result[0] contains IOS
- result[1] contains Loopback0 - result[1] contains Loopback0
provider: "{{ cli }}"
""" """
RETURN = """ RETURN = """
@ -132,18 +121,31 @@ stdout:
returned: always returned: always
type: list type: list
sample: ['...', '...'] sample: ['...', '...']
stdout_lines: stdout_lines:
description: The value of stdout split into a list description: The value of stdout split into a list
returned: always returned: always
type: list type: list
sample: [['...', '...'], ['...'], ['...']] sample: [['...', '...'], ['...'], ['...']]
failed_conditions: failed_conditions:
description: The list of conditionals that have failed description: The list of conditionals that have failed
returned: failed returned: failed
type: list type: list
sample: ['...', '...'] 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 import time

View file

@ -33,7 +33,9 @@ description:
for segmenting configuration into sections. This module provides for segmenting configuration into sections. This module provides
an implementation for working with IOS configuration sections in an implementation for working with IOS configuration sections in
a deterministic way. 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: options:
lines: lines:
description: description:
@ -202,6 +204,21 @@ backup_path:
returned: when backup is yes returned: when backup is yes
type: path type: path
sample: /playbooks/ansible/backup/ios_config.2016-07-16@22:28:34 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 re
import time import time