ios & iosxr Documentation improvements (#4321)
This commit is contained in:
parent
2514ec5056
commit
1357e7e83a
7 changed files with 25 additions and 26 deletions
|
@ -24,7 +24,7 @@ author: "Peter Sprygada (@privateip)"
|
||||||
short_description: Run commands on remote devices running Cisco IOS
|
short_description: Run commands on remote devices running Cisco IOS
|
||||||
description:
|
description:
|
||||||
- Sends arbitrary commands to an ios node and returns the results
|
- Sends arbitrary commands to an ios node and returns the results
|
||||||
read from the device. The M(ios_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.
|
||||||
- This module does not support running commands in configuration mode.
|
- This module does not support running commands in configuration mode.
|
||||||
|
@ -35,7 +35,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- List of commands to send to the remote ios device over the
|
- List of commands to send to the remote ios 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 expired.
|
the number of retries has expired.
|
||||||
required: true
|
required: true
|
||||||
|
@ -55,7 +55,7 @@ options:
|
||||||
- Specifies the number of retries a command should by tried
|
- Specifies the number of retries a command should by 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
|
target device every retry and evaluated against the
|
||||||
I(waitfor) conditions.
|
I(wait_for) conditions.
|
||||||
required: false
|
required: false
|
||||||
default: 10
|
default: 10
|
||||||
interval:
|
interval:
|
||||||
|
|
|
@ -52,8 +52,8 @@ options:
|
||||||
- Specifies the source path to the file that contains the configuration
|
- Specifies the source path to the file that contains the configuration
|
||||||
or configuration template to load. The path to the source file can
|
or configuration template to load. The path to the source file can
|
||||||
either be the full path on the Ansible control host or a relative
|
either be the full path on the Ansible control host or a relative
|
||||||
path from the playbook or role root dir. This argument is mutually
|
path from the playbook or role root directory. This argument is mutually
|
||||||
exclusive with O(lines).
|
exclusive with I(lines).
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
version_added: "2.2"
|
version_added: "2.2"
|
||||||
|
@ -62,11 +62,11 @@ options:
|
||||||
- Configures a destination file to write the source template or config
|
- Configures a destination file to write the source template or config
|
||||||
updates to. The path to the destination file can either be a full
|
updates to. The path to the destination file can either be a full
|
||||||
path on the Ansible control host or a relative path from the
|
path on the Ansible control host or a relative path from the
|
||||||
playbook or role root dir. This will, by default, overwrite any
|
playbook or role root directory. This will, by default, overwrite any
|
||||||
previously created file. See O(append) to change the behavior.
|
previously created file. See I(append) to change the behavior.
|
||||||
- When the O(dest) argument is used, the output from processing the
|
- When the I(dest) argument is used, the output from processing the
|
||||||
configuration lines is written to a file and not to the actual
|
configuration lines is written to a file and not to the actual
|
||||||
device. If the O(dest) argument is omitted, then the configuration
|
device. If theI(dest) argument is omitted, then the configuration
|
||||||
is written to the device.
|
is written to the device.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
|
@ -74,7 +74,7 @@ options:
|
||||||
append:
|
append:
|
||||||
description:
|
description:
|
||||||
- Changes the default behavior when writing the configuration out
|
- Changes the default behavior when writing the configuration out
|
||||||
to a remote file on disk. By default if O(dest) is specified, the
|
to a remote file on disk. By default if I(dest) is specified, the
|
||||||
file is overridden. By setting this argument to true, the remote
|
file is overridden. By setting this argument to true, the remote
|
||||||
file (if it exists) is appended to.
|
file (if it exists) is appended to.
|
||||||
required: false
|
required: false
|
||||||
|
|
|
@ -23,8 +23,8 @@ author: "Peter Sprygada (@privateip)"
|
||||||
short_description: Collect facts from remote devices running IOS
|
short_description: Collect facts from remote devices running IOS
|
||||||
description:
|
description:
|
||||||
- Collects a base set of device facts from a remote device that
|
- Collects a base set of device facts from a remote device that
|
||||||
is running IOS. The M(ios_facts) module prepends all of the
|
is running IOS. This module prepends all of the
|
||||||
base network fact keys with U(ansible_net_<fact>). The facts
|
base network fact keys with C(ansible_net_<fact>). The facts
|
||||||
module will always collect a base set of facts from the device
|
module will always collect a base set of facts from the device
|
||||||
and can enable or disable collection of additional facts.
|
and can enable or disable collection of additional facts.
|
||||||
extends_documentation_fragment: ios
|
extends_documentation_fragment: ios
|
||||||
|
@ -184,8 +184,8 @@ class Hardware(FactsBase):
|
||||||
data = self.runner.get_command('show memory statistics | include Processor')
|
data = self.runner.get_command('show memory statistics | include Processor')
|
||||||
match = re.findall('\s(\d+)\s', data)
|
match = re.findall('\s(\d+)\s', data)
|
||||||
if match:
|
if match:
|
||||||
self.facts['memtotal_mb'] = int(match[0])/1024
|
self.facts['memtotal_mb'] = int(match[0]) / 1024
|
||||||
self.facts['memfree_mb'] = int(match[1])/1024
|
self.facts['memfree_mb'] = int(match[1]) / 1024
|
||||||
|
|
||||||
def parse_filesystems(self, data):
|
def parse_filesystems(self, data):
|
||||||
return re.findall(r'^Directory of (\S+)/', data, re.M)
|
return re.findall(r'^Directory of (\S+)/', data, re.M)
|
||||||
|
|
|
@ -55,8 +55,7 @@ options:
|
||||||
issued to add any necessary flags to collect all defaults as
|
issued to add any necessary flags to collect all defaults as
|
||||||
well as the device configuration. If the destination device
|
well as the device configuration. If the destination device
|
||||||
does not support such a flag, this argument is silently ignored.
|
does not support such a flag, this argument is silently ignored.
|
||||||
required: false
|
required: true
|
||||||
default: false
|
|
||||||
choices: [ "true", "false" ]
|
choices: [ "true", "false" ]
|
||||||
backup:
|
backup:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -24,7 +24,7 @@ author: "Peter Sprygada (@privateip)"
|
||||||
short_description: Run arbitrary commands on ios devices.
|
short_description: Run arbitrary commands on ios devices.
|
||||||
description:
|
description:
|
||||||
- Sends arbitrary commands to an IOSXR node and returns the results
|
- Sends arbitrary commands to an IOSXR node and returns the results
|
||||||
read from the device. The M(iosxr_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: iosxr
|
extends_documentation_fragment: iosxr
|
||||||
|
|
|
@ -23,8 +23,8 @@ version_added: "2.1"
|
||||||
author: "Peter Sprygada (@privateip)"
|
author: "Peter Sprygada (@privateip)"
|
||||||
short_description: Manage Cisco IOS XR configuration sections
|
short_description: Manage Cisco IOS XR configuration sections
|
||||||
description:
|
description:
|
||||||
- Cisco IOS XR configurations use a simple block indent file sytanx
|
- Cisco IOS XR 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 IOS XR configuration sections in
|
an implementation for working with IOS XR configuration sections in
|
||||||
a deterministic way. This module works with either CLI or NXAPI
|
a deterministic way. This module works with either CLI or NXAPI
|
||||||
transports.
|
transports.
|
||||||
|
@ -101,8 +101,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
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -23,9 +23,9 @@ author: "Peter sprygada (@privateip)"
|
||||||
short_description: Manage Cisco IOSXR device configurations over SSH
|
short_description: Manage Cisco IOSXR device configurations over SSH
|
||||||
description:
|
description:
|
||||||
- Manages network device configurations over SSH. This module
|
- Manages network device configurations over SSH. 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: ios
|
extends_documentation_fragment: ios
|
||||||
|
@ -64,8 +64,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. The I(config) argument allows the implementer to
|
every task. The I(config) argument allows the implementer to
|
||||||
pass in the configuruation to use as the base config for
|
pass in the configuration to use as the base config for
|
||||||
comparision.
|
comparison.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
"""
|
"""
|
||||||
|
@ -81,7 +81,7 @@ EXAMPLES = """
|
||||||
src: config.j2
|
src: config.j2
|
||||||
force: yes
|
force: yes
|
||||||
|
|
||||||
- name: provide the base configuration for comparision
|
- name: provide the base configuration for comparison
|
||||||
net_config:
|
net_config:
|
||||||
src: candidate_config.txt
|
src: candidate_config.txt
|
||||||
config: current_config.txt
|
config: current_config.txt
|
||||||
|
|
Loading…
Reference in a new issue