1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove deprecated params from module argspec nxos modules (#34911)

* Remove deprecated param from module argspec nxos modules

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix nxos_vrrp syntaxerror

* Add choices for version _nxos_ip_interface

* remove check_args function

* remove include_defaults
This commit is contained in:
Trishna Guha 2018-01-16 18:23:58 +05:30 committed by GitHub
parent 0196b6bb69
commit a727930f07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 85 additions and 254 deletions

View file

@ -50,6 +50,12 @@ options:
- IPv4 or IPv6 Address. - IPv4 or IPv6 Address.
required: false required: false
default: null default: null
version:
description:
- Version of IP address. If the IP address is IPV4 version should be v4.
If the IP address is IPV6 version should be v6.
default: v4
choices: ['v4', 'v6']
mask: mask:
description: description:
- Subnet mask for IPv4 or IPv6 Address in decimal format. - Subnet mask for IPv4 or IPv6 Address in decimal format.
@ -73,11 +79,6 @@ options:
required: false required: false
default: false default: false
version_added: "2.4" version_added: "2.4"
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
state: state:
description: description:
- Specify desired state of the resource. - Specify desired state of the resource.
@ -532,10 +533,7 @@ def main():
state=dict(required=False, default='present', state=dict(required=False, default='present',
choices=['present', 'absent']), choices=['present', 'absent']),
allow_secondary=dict(required=False, default=False, allow_secondary=dict(required=False, default=False,
type='bool'), type='bool')
include_defaults=dict(default=True),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -68,11 +68,6 @@ options:
required: false required: false
choices: ['true', 'false'] choices: ['true', 'false']
default: false default: false
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
state: state:
description: description:
- Manage the state of the resource. - Manage the state of the resource.
@ -444,9 +439,6 @@ def main():
members=dict(required=False, default=None, type='list'), members=dict(required=False, default=None, type='list'),
force=dict(required=False, default='false', type='str', choices=['true', 'false']), force=dict(required=False, default='false', type='str', choices=['true', 'false']),
state=dict(required=False, choices=['absent', 'present'], default='present'), state=dict(required=False, choices=['absent', 'present'], default='present'),
include_defaults=dict(default=False),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -192,11 +192,6 @@ options:
choices: ['af11', 'af12', 'af13', 'af21', 'af22', 'af23','af31','af32', choices: ['af11', 'af12', 'af13', 'af21', 'af22', 'af23','af31','af32',
'af33', 'af41', 'af42', 'af43', 'cs1', 'cs2', 'cs3', 'cs4', 'af33', 'af41', 'af42', 'af43', 'cs1', 'cs2', 'cs3', 'cs4',
'cs5', 'cs6', 'cs7', 'default', 'ef'] 'cs5', 'cs6', 'cs7', 'default', 'ef']
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
state: state:
description: description:
- Specify desired state of the resource. - Specify desired state of the resource.
@ -433,14 +428,7 @@ def main():
'cs1', 'cs2', 'cs3', 'cs4', 'cs1', 'cs2', 'cs3', 'cs4',
'cs5', 'cs6', 'cs7', 'default', 'cs5', 'cs6', 'cs7', 'default',
'ef']), 'ef']),
state=dict(choices=['absent', 'present', 'delete_acl'], default='present'), state=dict(choices=['absent', 'present', 'delete_acl'], default='present')
protocol=dict(choices=['http', 'https'], default='http'),
host=dict(required=True),
username=dict(type='str'),
password=dict(no_log=True, type='str'),
include_defaults=dict(default=False),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -71,6 +71,10 @@ options:
required: false required: false
choices: ['true','false'] choices: ['true','false']
default: null default: null
bestpath_compare_neighborid:
description:
- Enable/Disable neighborid. Use this when more paths available than max path config.
choices: ['true', 'false']
bestpath_cost_community_ignore: bestpath_cost_community_ignore:
description: description:
- Enable/Disable Ignores the cost community for BGP best-path - Enable/Disable Ignores the cost community for BGP best-path

View file

@ -446,8 +446,7 @@ def main():
timers_holdtime=dict(required=False, type='str'), timers_holdtime=dict(required=False, type='str'),
transport_passive_only=dict(required=False, type='bool'), transport_passive_only=dict(required=False, type='bool'),
update_source=dict(required=False, type='str'), update_source=dict(required=False, type='str'),
m_facts=dict(required=False, default=False, type='bool'), state=dict(choices=['present', 'absent'], default='present', required=False)
state=dict(choices=['present', 'absent'], default='present', required=False),
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -44,6 +44,7 @@ options:
device config parser. device config parser.
required: false required: false
default: null default: null
aliases: ['commands']
parents: parents:
description: description:
- The ordered set of parents that uniquely identify the section - The ordered set of parents that uniquely identify the section
@ -287,7 +288,6 @@ backup_path:
sample: /playbooks/ansible/backup/nxos_config.2016-07-16@22:28:34 sample: /playbooks/ansible/backup/nxos_config.2016-07-16@22:28:34
""" """
import os
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.config import NetworkConfig, dumps from ansible.module_utils.network.common.config import NetworkConfig, dumps

View file

@ -57,20 +57,9 @@ from ansible.module_utils.network.nxos.nxos import get_config, load_config
from ansible.module_utils.network.nxos.nxos import get_capabilities, nxos_argument_spec from ansible.module_utils.network.nxos.nxos import get_capabilities, nxos_argument_spec
def check_args(module, warnings):
for key in ('include_defaults', 'config', 'save'):
if module.params[key] is not None:
warnings.append('argument %s is no longer supported, ignoring value' % key)
def main(): def main():
argument_spec = dict( argument_spec = dict(
nv_overlay_evpn=dict(required=True, type='bool'), nv_overlay_evpn=dict(required=True, type='bool'),
# deprecated in Ans2.3
include_defaults=dict(),
config=dict(),
save=dict()
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)
@ -80,7 +69,6 @@ def main():
result = {'changed': False} result = {'changed': False}
warnings = list() warnings = list()
check_args(module, warnings)
if warnings: if warnings:
result['warnings'] = warnings result['warnings'] = warnings

View file

@ -74,11 +74,6 @@ options:
- Sets the route-target 'import' extended communities. - Sets the route-target 'import' extended communities.
required: false required: false
default: null default: null
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
state: state:
description: description:
- Determines whether the config should be present or not - Determines whether the config should be present or not
@ -243,10 +238,7 @@ def main():
route_target_both=dict(required=False, type='list'), route_target_both=dict(required=False, type='list'),
route_target_import=dict(required=False, type='list'), route_target_import=dict(required=False, type='list'),
route_target_export=dict(required=False, type='list'), route_target_export=dict(required=False, type='list'),
state=dict(choices=['present', 'absent'], default='present', required=False), state=dict(choices=['present', 'absent'], default='present', required=False)
include_defaults=dict(default=True),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -76,12 +76,6 @@ from ansible.module_utils.network.nxos.nxos import load_config, run_commands
from ansible.module_utils.network.nxos.nxos import get_capabilities, nxos_argument_spec from ansible.module_utils.network.nxos.nxos import get_capabilities, nxos_argument_spec
def check_args(module, warnings):
for key in ('include_defaults', 'config', 'save'):
if module.params[key] is not None:
warnings.append('argument %s is no longer supported, ignoring value' % key)
def get_available_features(feature, module): def get_available_features(feature, module):
available_features = {} available_features = {}
feature_regex = r'(?P<feature>\S+)\s+\d+\s+(?P<state>.*)' feature_regex = r'(?P<feature>\S+)\s+\d+\s+(?P<state>.*)'
@ -213,12 +207,7 @@ def validate_feature(module, mode='show'):
def main(): def main():
argument_spec = dict( argument_spec = dict(
feature=dict(type='str', required=True), feature=dict(type='str', required=True),
state=dict(choices=['enabled', 'disabled'], default='enabled'), state=dict(choices=['enabled', 'disabled'], default='enabled')
# deprecated in Ans2.3
include_defaults=dict(),
config=dict(),
save=dict()
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)
@ -226,7 +215,6 @@ def main():
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
warnings = list() warnings = list()
check_args(module, warnings)
results = dict(changed=False, warnings=warnings) results = dict(changed=False, warnings=warnings)
feature = validate_feature(module) feature = validate_feature(module)

View file

@ -53,18 +53,6 @@ options:
required: false required: false
default: present default: present
choices: ['present','absent'] choices: ['present','absent']
include_defaults:
description:
- Specify to retrieve or not the complete running configuration
for module operations.
required: false
default: false
choices: ['true','false']
config:
description:
- Specify the configuration string to be used for module operations.
required: false
default: null
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -74,16 +62,11 @@ EXAMPLES = '''
commands: commands:
- router eigrp 11 - router eigrp 11
- isolate - isolate
host: "{{ inventory_hostname }}"
username: "{{ un }}"
password: "{{ pwd }}"
# Remove the maintenance-mode profile # Remove the maintenance-mode profile
- nxos_gir_profile_management: - nxos_gir_profile_management:
mode: maintenance mode: maintenance
state: absent state: absent
host: "{{ inventory_hostname }}"
username: "{{ un }}"
password: "{{ pwd }}"
''' '''
RETURN = ''' RETURN = '''
@ -120,7 +103,7 @@ changed:
import re import re
from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands
from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args from ansible.module_utils.network.nxos.nxos import nxos_argument_spec
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.config import CustomNetworkConfig from ansible.module_utils.network.common.config import CustomNetworkConfig
@ -175,10 +158,7 @@ def main():
argument_spec = dict( argument_spec = dict(
commands=dict(required=False, type='list'), commands=dict(required=False, type='list'),
mode=dict(required=True, choices=['maintenance', 'normal']), mode=dict(required=True, choices=['maintenance', 'normal']),
state=dict(choices=['absent', 'present'], state=dict(choices=['absent', 'present'], default='present')
default='present'),
include_defaults=dict(default=False),
config=dict()
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)
@ -187,7 +167,6 @@ def main():
supports_check_mode=True) supports_check_mode=True)
warnings = list() warnings = list()
check_args(module, warnings)
state = module.params['state'] state = module.params['state']
commands = module.params['commands'] or [] commands = module.params['commands'] or []

View file

@ -61,6 +61,10 @@ options:
- HSRP priority. - HSRP priority.
required: false required: false
default: null default: null
preempt:
description:
- Enable/Disable preempt.
choices: ['enabled', 'disabled']
vip: vip:
description: description:
- HSRP virtual IP address. - HSRP virtual IP address.

View file

@ -59,11 +59,6 @@ options:
required: false required: false
default: null default: null
choices: ['true', 'false'] choices: ['true', 'false']
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
state: state:
description: description:
- Manages desired state of the resource. - Manages desired state of the resource.
@ -75,18 +70,15 @@ EXAMPLES = '''
- name: Default igmp global params (all params except restart) - name: Default igmp global params (all params except restart)
nxos_igmp: nxos_igmp:
state: default state: default
host: "{{ inventory_hostname }}"
- name: Ensure the following igmp global config exists on the device - name: Ensure the following igmp global config exists on the device
nxos_igmp: nxos_igmp:
flush_routes: true flush_routes: true
enforce_rtr_alert: true enforce_rtr_alert: true
host: "{{ inventory_hostname }}"
- name: Restart the igmp process - name: Restart the igmp process
nxos_igmp: nxos_igmp:
restart: true restart: true
host: "{{ inventory_hostname }}"
''' '''
RETURN = ''' RETURN = '''
@ -121,12 +113,7 @@ def main():
flush_routes=dict(type='bool'), flush_routes=dict(type='bool'),
enforce_rtr_alert=dict(type='bool'), enforce_rtr_alert=dict(type='bool'),
restart=dict(type='bool', default=False), restart=dict(type='bool', default=False),
state=dict(choices=['present', 'default'], default='present')
state=dict(choices=['present', 'default'], default='present'),
include_defaults=dict(default=False),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -159,11 +159,6 @@ options:
required: false required: false
choices: ['true', 'false'] choices: ['true', 'false']
default: null default: null
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
state: state:
description: description:
- Manages desired state of the resource. - Manages desired state of the resource.
@ -176,11 +171,7 @@ EXAMPLES = '''
interface: ethernet1/32 interface: ethernet1/32
startup_query_interval: 30 startup_query_interval: 30
state: present state: present
username: "{{ un }}"
password: "{{ pwd }}"
host: "{{ inventory_hostname }}"
''' '''
RETURN = ''' RETURN = '''
proposed: proposed:
description: k/v pairs of parameters passed into module description: k/v pairs of parameters passed into module
@ -539,10 +530,7 @@ def main():
oif_source=dict(required=False, type='str'), oif_source=dict(required=False, type='str'),
restart=dict(type='bool', default=False), restart=dict(type='bool', default=False),
state=dict(choices=['present', 'absent', 'default'], state=dict(choices=['present', 'absent', 'default'],
default='present'), default='present')
include_defaults=dict(default=True),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -129,6 +129,11 @@ options:
required: true required: true
default: present default: present
choices: ['present','absent','default'] choices: ['present','absent','default']
delay:
description:
- Time in seconds to wait before checking for the operational state on remote
device. This wait is applicable for operational state arguments.
default: 10
""" """
EXAMPLES = """ EXAMPLES = """

View file

@ -111,11 +111,6 @@ options:
- Specifies the message_digest password. Valid value is a string. - Specifies the message_digest password. Valid value is a string.
required: false required: false
default: null default: null
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
state: state:
description: description:
- Determines whether the config should be present or not - Determines whether the config should be present or not
@ -386,10 +381,7 @@ def main():
message_digest_algorithm_type=dict(required=False, type='str', choices=['md5']), message_digest_algorithm_type=dict(required=False, type='str', choices=['md5']),
message_digest_encryption_type=dict(required=False, type='str', choices=['cisco_type_7', '3des']), message_digest_encryption_type=dict(required=False, type='str', choices=['cisco_type_7', '3des']),
message_digest_password=dict(required=False, type='str', no_log=True), message_digest_password=dict(required=False, type='str', no_log=True),
state=dict(choices=['present', 'absent'], default='present', required=False), state=dict(choices=['present', 'absent'], default='present', required=False)
include_defaults=dict(default=True),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -68,6 +68,10 @@ options:
required: false required: false
default: present default: present
choices: ['present','absent'] choices: ['present','absent']
purge:
description:
- Purge links not defined in the I(aggregate) parameter.
default: no
""" """
EXAMPLES = """ EXAMPLES = """

View file

@ -45,7 +45,8 @@ options:
- Facility name for logging. - Facility name for logging.
dest_level: dest_level:
description: description:
- Set logging severity levels. C(alias level). - Set logging severity levels.
aliases: ['level']
facility_level: facility_level:
description: description:
- Set logging serverity levels for facility based log messages. - Set logging serverity levels for facility based log messages.

View file

@ -153,10 +153,6 @@ def check_args(module, warnings):
warnings.append('state=stopped is deprecated and will be removed in a ' warnings.append('state=stopped is deprecated and will be removed in a '
'a future release. Please use state=absent instead') 'a future release. Please use state=absent instead')
for key in ['config']:
if module.params[key]:
warnings.append('argument %s is deprecated and will be ignored' % key)
for key in ['http_port', 'https_port']: for key in ['http_port', 'https_port']:
if module.params[key] is not None: if module.params[key] is not None:
if not 1 <= module.params[key] <= 65535: if not 1 <= module.params[key] <= 65535:
@ -271,15 +267,9 @@ def main():
argument_spec = dict( argument_spec = dict(
http=dict(aliases=['enable_http'], type='bool'), http=dict(aliases=['enable_http'], type='bool'),
http_port=dict(type='int'), http_port=dict(type='int'),
https=dict(aliases=['enable_https'], type='bool'), https=dict(aliases=['enable_https'], type='bool'),
https_port=dict(type='int'), https_port=dict(type='int'),
sandbox=dict(aliases=['enable_sandbox'], type='bool'), sandbox=dict(aliases=['enable_sandbox'], type='bool'),
# deprecated (Ansible 2.3) arguments
config=dict(),
state=dict(default='present', choices=['started', 'stopped', 'present', 'absent']) state=dict(default='present', choices=['started', 'stopped', 'present', 'absent'])
) )

View file

@ -41,11 +41,6 @@ options:
required: false required: false
default: present default: present
choices: ['present','absent'] choices: ['present','absent']
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -116,10 +111,7 @@ def state_absent(module, proposed, candidate):
def main(): def main():
argument_spec = dict( argument_spec = dict(
ospf=dict(required=True, type='str'), ospf=dict(required=True, type='str'),
state=dict(choices=['present', 'absent'], default='present', required=False), state=dict(choices=['present', 'absent'], default='present', required=False)
include_defaults=dict(default=True),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -120,11 +120,11 @@ options:
required: false required: false
choices: ['true','false'] choices: ['true','false']
default: null default: null
include_defaults: state:
description: description:
- Specify if the complete running configuration for module operations should be used. - State of ospf vrf configuration.
default: true default: present
type: bool choices: ['present', 'absent']
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -361,10 +361,7 @@ def main():
timer_throttle_spf_max=dict(required=False, type='str'), timer_throttle_spf_max=dict(required=False, type='str'),
auto_cost=dict(required=False, type='str'), auto_cost=dict(required=False, type='str'),
passive_interface=dict(required=False, type='bool'), passive_interface=dict(required=False, type='bool'),
state=dict(choices=['present', 'absent'], default='present', required=False), state=dict(choices=['present', 'absent'], default='present', required=False)
include_defaults=dict(default=True),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -54,6 +54,9 @@ options:
required: false required: false
default: true default: true
choices: ['true', 'false'] choices: ['true', 'false']
dr_prio:
description:
- Configures priority for PIM DR election on interface.
hello_auth_key: hello_auth_key:
description: description:
- Authentication for hellos on this interface. - Authentication for hellos on this interface.

View file

@ -64,6 +64,12 @@ options:
required: false required: false
choices: ['true','false'] choices: ['true','false']
default: null default: null
state:
description:
- Specify desired state of the resource.
required: true
default: present
choices: ['present','absent','default']
''' '''
EXAMPLES = ''' EXAMPLES = '''
- nxos_pim_rp_address: - nxos_pim_rp_address:

View file

@ -47,9 +47,6 @@ options:
EXAMPLES = ''' EXAMPLES = '''
- nxos_reboot: - nxos_reboot:
confirm: true confirm: true
host: "{{ inventory_hostname }}"
username: "{{ username }}"
password: "{{ password }}"
''' '''
RETURN = ''' RETURN = '''
@ -74,7 +71,9 @@ def reboot(module):
def main(): def main():
argument_spec = {} argument_spec = dict(
confirm=dict(default=False, type='bool')
)
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
@ -83,6 +82,7 @@ def main():
check_args(module, warnings) check_args(module, warnings)
results = dict(changed=False, warnings=warnings) results = dict(changed=False, warnings=warnings)
if module.params['confirm']:
if not module.check_mode: if not module.check_mode:
reboot(module) reboot(module)
results['changed'] = True results['changed'] = True

View file

@ -50,11 +50,6 @@ options:
with checkpoint_file. with checkpoint_file.
required: false required: false
default: null default: null
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -109,10 +104,7 @@ def rollback(filename, module):
def main(): def main():
argument_spec = dict( argument_spec = dict(
checkpoint_file=dict(required=False), checkpoint_file=dict(required=False),
rollback_to=dict(required=False), rollback_to=dict(required=False)
include_defaults=dict(default=True),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -46,6 +46,10 @@ options:
required: false required: false
default: v2c default: v2c
choices: ['v2c', 'v3'] choices: ['v2c', 'v3']
v3:
description:
- Use this when verion is v3. SNMPv3 Security level.
choices: ['noauth', 'auth', 'priv']
community: community:
description: description:
- Community string or v3 username. - Community string or v3 username.
@ -56,11 +60,11 @@ options:
- UDP port number (0-65535). - UDP port number (0-65535).
required: false required: false
default: null default: null
type: snmp_type:
description: description:
- type of message to send to host. - type of message to send to host.
required: false required: false
default: traps default: trap
choices: ['trap', 'inform'] choices: ['trap', 'inform']
vrf: vrf:
description: description:

View file

@ -347,7 +347,6 @@ def main():
name_servers=dict(type='list'), name_servers=dict(type='list'),
system_mtu=dict(type='int'), system_mtu=dict(type='int'),
lookup_source=dict(),
state=dict(default='present', choices=['present', 'absent']) state=dict(default='present', choices=['present', 'absent'])
) )

View file

@ -88,6 +88,15 @@ options:
aggregate: aggregate:
description: List of VLANs definitions. description: List of VLANs definitions.
version_added: "2.5" version_added: "2.5"
purge:
description:
- Purge VLANs not defined in the I(aggregate) parameter.
default: no
delay:
description:
- Time in seconds to wait before checking for the operational state on remote
device. This wait is applicable for operational state arguments.
default: 10
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -95,6 +95,11 @@ options:
- Description of the VRF. - Description of the VRF.
required: false required: false
default: null default: null
delay:
description:
- Time in seconds to wait before checking for the operational state on remote
device. This wait is applicable for operational state arguments.
default: 10
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -93,8 +93,6 @@ def main():
afi=dict(required=True, choices=['ipv4', 'ipv6']), afi=dict(required=True, choices=['ipv4', 'ipv6']),
route_target_both_auto_evpn=dict(required=False, type='bool'), route_target_both_auto_evpn=dict(required=False, type='bool'),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
m_facts=dict(default=False, type='bool', removed_in_version="2.4"),
safi=dict(choices=['unicast', 'multicast'], removed_in_version="2.4"), safi=dict(choices=['unicast', 'multicast'], removed_in_version="2.4"),
) )

View file

@ -54,6 +54,10 @@ options:
- VRRP priority. - VRRP priority.
required: false required: false
default: null default: null
preempt:
description:
- Enable/Disable preempt.
choices: ['True', 'False']
vip: vip:
description: description:
- VRRP virtual IP address. - VRRP virtual IP address.
@ -70,12 +74,6 @@ options:
required: false required: false
choices: ['shutdown', 'no shutdown'] choices: ['shutdown', 'no shutdown']
default: no shutdown default: no shutdown
version_added: "2.2"
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
state: state:
description: description:
- Specify desired state of the resource. - Specify desired state of the resource.
@ -338,10 +336,7 @@ def main():
choices=['shutdown', 'no shutdown'], choices=['shutdown', 'no shutdown'],
default='no shutdown'), default='no shutdown'),
authentication=dict(required=False, type='str'), authentication=dict(required=False, type='str'),
state=dict(choices=['absent', 'present'], required=False, default='present'), state=dict(choices=['absent', 'present'], required=False, default='present')
include_defaults=dict(default=False),
config=dict(),
save=dict(type='bool', default=False)
) )
argument_spec.update(nxos_argument_spec) argument_spec.update(nxos_argument_spec)

View file

@ -1,68 +0,0 @@
---
- debug: msg="START {{ connection.transport }}/set_lookup_source.yaml"
- name: setup
nxos_config:
lines:
- no ip domain lookup source-interface
- vrf definition ansible
match: none
provider: "{{ connection }}"
- name: configure lookup_source
nxos_system:
lookup_source: Management1
provider: "{{ connection }}"
register: result
- assert:
that:
- result.changed == true
- "'ip domain lookup source-interface Management1' in result.commands"
- name: verify lookup_source
nxos_system:
lookup_source: Management1
provider: "{{ connection }}"
register: result
- assert:
that:
- result.changed == false
- name: change to vrf
nxos_system:
lookup_source:
- interface: Management1
vrf: ansible
provider: "{{ connection }}"
register: result
- assert:
that:
- result.changed == true
- "'no ip domain lookup source-interface Management1' in result.commands"
- "'ip domain lookup vrf ansible source-interface Management1' in result.commands"
- result.commands|length == 2
- name: verify change to vrf
nxos_system:
lookup_source:
- interface: Management1
vrf: ansible
provider: "{{ connection }}"
register: result
- assert:
that:
- result.changed == false
- name: teardown
nxos_config:
lines:
- no ip domain lookup source-interface
- no vrf definition ansible
match: none
provider: "{{ connection }}"
- debug: msg="END {{ connection.transport }}/set_lookup_source.yaml"