General EOS documentation improvements

Typos, formatting, choices.
pull/18777/head
John Barker 8 years ago committed by Matt Clay
parent e9bf046c26
commit 2b82389705

@ -21,10 +21,10 @@ DOCUMENTATION = """
module: eos_command module: eos_command
version_added: "2.1" version_added: "2.1"
author: "Peter Sprygada (@privateip)" author: "Peter Sprygada (@privateip)"
short_description: Run arbitrary command on EOS device short_description: Run arbitrary commands on EOS device
description: description:
- Sends an aribtrary set of commands to an EOS node and returns the results - Sends an arbitrary set of commands to an EOS node and returns the results
read from the device. The M(eos_command) module includes an read from the device. This module includes an
argument that will cause the module to wait for a specific condition argument that will cause the module to wait for a specific condition
before returning or timing out if the condition is not met. before returning or timing out if the condition is not met.
extends_documentation_fragment: eos extends_documentation_fragment: eos
@ -33,9 +33,9 @@ options:
description: description:
- The commands to send to the remote EOS device over the - The commands to send to the remote EOS device over the
configured provider. The resulting output from the command configured provider. The resulting output from the command
is returned. If the I(waitfor) argument is provided, the is returned. If the I(wait_for) argument is provided, the
module is not returned until the condition is satisfied or module is not returned until the condition is satisfied or
the number of retries has been exceeded. the number of I(retries) has been exceeded.
required: true required: true
wait_for: wait_for:
description: description:
@ -52,8 +52,8 @@ options:
description: description:
- Specifies the number of retries a command should be tried - Specifies the number of retries a command should be tried
before it is considered failed. The command is run on the before it is considered failed. The command is run on the
target device every retry and evaluated against the waitfor target device every retry and evaluated against the I(wait_for)
conditionals conditionals.
required: false required: false
default: 10 default: 10
interval: interval:

@ -22,10 +22,10 @@ version_added: "2.1"
author: "Peter Sprygada (@privateip)" author: "Peter Sprygada (@privateip)"
short_description: Manage Arista EOS configuration sections short_description: Manage Arista EOS configuration sections
description: description:
- Arista EOS configurations use a simple block indent file sytanx - Arista EOS configurations use a simple block indent file syntax
for segementing configuration into sections. This module provides for segmenting configuration into sections. This module provides
an implementation for working with eos configuration sections in an implementation for working with eos configuration sections in
a deterministic way. This module works with either CLI or eapi a deterministic way. This module works with either CLI or eAPI
transports. transports.
extends_documentation_fragment: eos extends_documentation_fragment: eos
options: options:
@ -51,7 +51,7 @@ options:
a change needs to be made. This allows the playbook designer a change needs to be made. This allows the playbook designer
the opportunity to perform configuration commands prior to pushing the opportunity to perform configuration commands prior to pushing
any changes without affecting how the set of commands are matched any changes without affecting how the set of commands are matched
against the system against the system.
required: false required: false
default: null default: null
after: after:
@ -80,7 +80,7 @@ options:
the modified lines are pushed to the device in configuration the modified lines are pushed to the device in configuration
mode. If the replace argument is set to I(block) then the entire mode. If the replace argument is set to I(block) then the entire
command block is pushed to the device in configuration mode if any command block is pushed to the device in configuration mode if any
line is not correct line is not correct.
required: false required: false
default: line default: line
choices: ['line', 'block'] choices: ['line', 'block']
@ -100,8 +100,8 @@ options:
against the contents of source. There are times when it is not against the contents of source. There are times when it is not
desirable to have the task get the current running-config for desirable to have the task get the current running-config for
every task in a playbook. The I(config) argument allows the every task in a playbook. The I(config) argument allows the
implementer to pass in the configuruation to use as the base implementer to pass in the configuration to use as the base
config for comparision. config for comparison.
required: false required: false
default: null default: null
""" """

@ -22,11 +22,13 @@ DOCUMENTATION = """
module: eos_eapi module: eos_eapi
version_added: "2.1" version_added: "2.1"
author: "Chris Houseknecht (@chouseknecht)" author: "Chris Houseknecht (@chouseknecht)"
short_description: Manage and configure EAPI. Requires EOS v4.12 or greater. short_description: Manage and configure eAPI.
requirements:
- "EOS v4.12 or greater"
description: description:
- Use to enable or disable EAPI access, and set the port and state - Use to enable or disable eAPI access, and set the port and state
of http, https, localHttp and unix-socket servers. of http, https, local_http and unix-socket servers.
- When enabling EAPI access the default is to enable HTTP on port - When enabling eAPI access the default is to enable HTTP on port
80, enable HTTPS on port 443, disable local HTTP, and disable 80, enable HTTPS on port 443, disable local HTTP, and disable
Unix socket server. Use the options listed below to override the Unix socket server. Use the options listed below to override the
default configuration. default configuration.
@ -35,13 +37,13 @@ extends_documentation_fragment: eos
options: options:
state: state:
description: description:
- Set to started or stopped. A state of started will - A state of I(started) will
enable EAPI access, and a state of stopped will enable eAPI access, and a state of I(stopped) will
disable or shutdown all EAPI access. disable or shutdown all eAPI access.
choices: choices:
- started - started
- stopped - stopped
requred: false required: false
default: started default: started
http_port: http_port:
description: description:
@ -63,6 +65,9 @@ options:
- Enable HTTP server access. - Enable HTTP server access.
required: false required: false
default: true default: true
choices:
- yes
- no
aliases: aliases:
- enable_http - enable_http
https: https:
@ -70,6 +75,9 @@ options:
- Enable HTTPS server access. - Enable HTTPS server access.
required: false required: false
default: true default: true
choices:
- yes
- no
aliases: aliases:
- enable_https - enable_https
local_http: local_http:
@ -77,6 +85,9 @@ options:
- Enable local HTTP server access. - Enable local HTTP server access.
required: false required: false
default: false default: false
choices:
- yes
- no
aliases: aliases:
- enable_local_http - enable_local_http
socket: socket:
@ -84,17 +95,20 @@ options:
- Enable Unix socket server access. - Enable Unix socket server access.
required: false required: false
default: false default: false
choices:
- yes
- no
aliases: aliases:
- enable_socket - enable_socket
""" """
EXAMPLES = """ EXAMPLES = """
- name: Enable EAPI access with default configuration - name: Enable eAPI access with default configuration
eos_eapi: eos_eapi:
state: started state: started
provider: {{ provider }} provider: {{ provider }}
- name: Enable EAPI with no HTTP, HTTPS at port 9443, local HTTP at port 80, and socket enabled - name: Enable eAPI with no HTTP, HTTPS at port 9443, local HTTP at port 80, and socket enabled
eos_eapi: eos_eapi:
state: started state: started
http: false http: false
@ -104,7 +118,7 @@ EXAMPLES = """
socket: yes socket: yes
provider: {{ provider }} provider: {{ provider }}
- name: Shutdown EAPI access - name: Shutdown eAPI access
eos_eapi: eos_eapi:
state: stopped state: stopped
provider: {{ provider }} provider: {{ provider }}
@ -180,7 +194,7 @@ def config_server(module):
if not config.get('enabled'): if not config.get('enabled'):
if state == 'started': if state == 'started':
# turn on eapi access # turn on eAPI access
commands.append('no shutdown') commands.append('no shutdown')
result['changed'] = True result['changed'] = True
else: else:
@ -188,7 +202,7 @@ def config_server(module):
return result return result
if config.get('enabled') and state == 'stopped': if config.get('enabled') and state == 'stopped':
# turn off eapi access and exit # turn off eAPI access and exit
commands.append('shutdown') commands.append('shutdown')
result['changed'] = True result['changed'] = True
result['commands'] = commands result['commands'] = commands
@ -257,7 +271,7 @@ def main():
socket=dict(aliases=['enable_socket'], default=False, type='bool'), socket=dict(aliases=['enable_socket'], default=False, type='bool'),
local_http=dict(aliases=['enable_local_http'], default=False, type='bool'), local_http=dict(aliases=['enable_local_http'], default=False, type='bool'),
# Only allow use of transport cli when coniguring EAPI # Only allow use of transport cli when configuring eAPI
transport=dict(required=True, choices=['cli']) transport=dict(required=True, choices=['cli'])
) )

@ -23,9 +23,9 @@ author: "Peter sprygada (@privateip)"
short_description: Manage Arista EOS device configurations short_description: Manage Arista EOS device configurations
description: description:
- Manages network device configurations over SSH or eAPI. This module - Manages network device configurations over SSH or eAPI. This module
allows implementors to work with the device running-config. It allows implementers to work with the device running-config. It
provides a way to push a set of commands onto a network device provides a way to push a set of commands onto a network device
by evaluting the current running-config and only pushing configuration by evaluating the current running-config and only pushing configuration
commands that are not already configured. The config source can commands that are not already configured. The config source can
be a set of commands or a template. be a set of commands or a template.
extends_documentation_fragment: eos extends_documentation_fragment: eos
@ -49,9 +49,9 @@ options:
include_defaults: include_defaults:
description: description:
- By default when the M(eos_template) connects to the remote - By default when the M(eos_template) connects to the remote
device to retrieve the configuration it will issue the `show device to retrieve the configuration it will issue the C(show
running-config` command. If this option is set to True then running-config) command. If this option is set to True then
the issued command will be `show running-config all` the issued command will be C(show running-config all).
required: false required: false
default: false default: false
choices: ['yes', 'no'] choices: ['yes', 'no']
@ -69,8 +69,7 @@ options:
- This argument will cause the provided configuration to be replaced - This argument will cause the provided configuration to be replaced
on the destination node. The use of the replace argument will on the destination node. The use of the replace argument will
always cause the task to set changed to true and will implies always cause the task to set changed to true and will implies
I(force) is true. This argument is only valid with I(transport) C(force=true). This argument is only valid with C(transport=eapi).
is eapi.
required: false required: false
default: false default: false
choices: ['yes', 'no'] choices: ['yes', 'no']
@ -81,23 +80,23 @@ options:
against the contents of source. There are times when it is not against the contents of source. There are times when it is not
desirable to have the task get the current running-config for desirable to have the task get the current running-config for
every task in a playbook. The I(config) argument allows the every task in a playbook. The I(config) argument allows the
implementer to pass in the configuruation to use as the base implementer to pass in the configuration to use as the base
config for comparision. config for comparison.
required: false required: false
default: null default: null
""" """
EXAMPLES = """ EXAMPLES = """
- name: push a configuration onto the device - name: Push a configuration onto the device
eos_template: eos_template:
src: config.j2 src: config.j2
- name: forceable push a configuration onto the device - name: Forceable push a configuration onto the device
eos_template: eos_template:
src: config.j2 src: config.j2
force: yes force: yes
- name: provide the base configuration for comparision - name: Provide the base configuration for comparison
eos_template: eos_template:
src: candidate_config.txt src: candidate_config.txt
config: current_config.txt config: current_config.txt

Loading…
Cancel
Save