[WIP] Network module docs 2.3 (#22454)

* Tidy up docs for network 2.3 modules

* Use suboptions

* Correct indentation

* more tidyup

* bulk updates

* more tidyup

* Bulk changes

* nxos_mtu is dead

* revert

* NXOS_mtu is dead, also better layout

* rebase

* rebase
This commit is contained in:
John R Barker
2017-03-15 16:00:43 +00:00
committed by GitHub
parent b606bcec04
commit f82239e1f7
20 changed files with 594 additions and 767 deletions

View File

@@ -36,61 +36,45 @@ extends_documentation_fragment: ios
options:
hostname:
description:
- The C(hostname) argument will configure the device hostname
parameter on Cisco IOS devices. The C(hostname) value is an
ASCII string value.
required: false
default: null
- Configure the device hostname parameter. This option takes an ASCII string value.
domain_name:
description:
- The C(description) argument will configure the IP domain name
on the remote device to the provided value. The C(domain_name)
argument should be in the dotted name form and will be
- Configure the IP domain name
on the remote device to the provided value. Value
should be in the dotted name form and will be
appended to the C(hostname) to create a fully-qualified
domain name
required: false
default: null
domain name.
domain_search:
description:
- The C(domain_list) provides the list of domain suffixes to
- Provides the list of domain suffixes to
append to the hostname for the purpose of doing name resolution.
This argument accepts a list of names and will be reconciled
with the current active configuration on the running node.
required: false
default: null
lookup_source:
description:
- The C(lookup_source) argument provides one or more source
- Provides one or more source
interfaces to use for performing DNS lookups. The interface
provided in C(lookup_source) must be a valid interface configured
on the device.
required: false
default: null
lookup_enabled:
description:
- The C(lookup_enabled) argument provides administrative control
- Administrative control
for enabling or disabling DNS lookups. When this argument is
set to True, lookups are performed and when it is set to False,
lookups are not performed.
required: false
default: null
choices: ['true', 'false']
type: bool
name_servers:
description:
- The C(name_serves) argument accepts a list of DNS name servers by
way of either FQDN or IP address to use to perform name resolution
lookups. This argument accepts wither a list of DNS servers See
- List of DNS name servers by IP address to use to perform name resolution
lookups. This argument accepts either a list of DNS servers See
examples.
required: false
default: null
state:
description:
- The C(state) argument configures the state of the configuration
- State of the configuration
values in the device's current active configuration. When set
to I(present), the values should be configured in the device active
configuration and when set to I(absent) the values should not be
in the device active configuration
required: false
default: present
choices: ['present', 'absent']
"""
@@ -99,18 +83,21 @@ EXAMPLES = """
- name: configure hostname and domain name
ios_system:
hostname: ios01
domain_name: eng.ansible.com
domain_name: test.example.com
domain-search:
- ansible.com
- redhat.com
- cisco.com
- name: remove configuration
ios_system:
state: absent
- name: configure DNS lookup sources
ios_system:
lookup_source: MgmtEth0/0/CPU0/0
lookup_enabled: yes
- name: configure name servers
ios_system:
name_servers:
@@ -125,7 +112,7 @@ commands:
type: list
sample:
- hostname ios01
- ip domain name eng.ansible.com
- ip domain name test.example.com
"""
import re

View File

@@ -40,53 +40,41 @@ options:
IOS device. Ths list entries can either be the VRF name or a hash
of VRF definitions and attributes. This argument is mutually
exclusive with the C(name) argument.
required: false
default: null
name:
description:
- The name of the VRF definition to be managed on the remote IOS
device. The VRF definition name is an ASCII string name used
to uniquely identify the VRF. This argument is mutually exclusive
with the C(vrfs) argument
required: false
default: null
description:
description:
- Provides a short description of the VRF definition in the
current active configuration. The VRF definition value accepts
alphanumberic characters used to provide additional information
alphanumeric characters used to provide additional information
about the VRF.
required: false
default: null
rd:
description:
- The router-distigusher value uniquely identifies the VRF to
- The router-distinguisher value uniquely identifies the VRF to
routing processes on the remote IOS system. The RD value takes
the form of A:B where A and B are both numeric values.
required: false
default: null
the form of C(A:B) where C(A) and C(B) are both numeric values.
interfaces:
description:
- The C(interfaces) argument identifies the set of interfaces that
- Identifies the set of interfaces that
should be configured in the VRF. Interfaces must be routed
interfaces in order to be placed into a VRF.
required: false
default: null
purge:
description:
- The C(purge) argument instructs the module to consider the
- Instructs the module to consider the
VRF definition absolute. It will remove any previously configured
VRFs on the device.
required: false
default: false
state:
description:
- The C(state) argument configures the state of the VRF definition
- Configures the state of the VRF definition
as it relates to the device operational configuration. When set
to I(present), the VRF should be configured in the device active
configuration and when set to I(absent) the VRF should not be
in the device active configuration
required: false
default: present
choices: ['present', 'absent']
"""
@@ -156,7 +144,7 @@ def add_command_to_vrf(name, cmd, commands):
def map_obj_to_commands(updates, module):
commands = list()
state = module.params['state']
state = module.params['state'] # FIXME NOT USED
for update in updates:
want, have = update
@@ -345,7 +333,7 @@ def main():
want = map_params_to_obj(module)
have = map_config_to_obj(module)
commands = map_obj_to_commands(update_objects(want,have), module)
commands = map_obj_to_commands(update_objects(want, have), module)
if module.params['purge']:
want_vrfs = [x['name'] for x in want]