mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-06 00:14:02 -07:00
Tidy up validate-modules ignores for modules: net_tools/nios (#1598)
* Added ``normalize_ib_spec()`` * Added suboptions - ``http_pool_connections`` - ``http_pool_maxsize`` - ``silent_ssl_warnings`` * fixed validation-modules for plugins/modules/net_tools/nios/nios_a_record.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_aaaa_record.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_cname_record.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_dns_view.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_fixed_address.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_host_record.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_member.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_mx_record.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_naptr_record.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_network.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_network_view.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_ptr_record.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_srv_record.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_txt_record.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_zone.py * fixed validation-modules for plugins/modules/net_tools/nios/nios_nsgroup.py * Added function to normalize the ``ib_spec`` for ansible usage. * Tidy up validate-modules ignores for net_tools/nios modules * Update plugins/modules/net_tools/nios/nios_nsgroup.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/net_tools/nios/nios_nsgroup.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/net_tools/nios/nios_nsgroup.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/net_tools/nios/nios_nsgroup.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/net_tools/nios/nios_nsgroup.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/net_tools/nios/nios_nsgroup.py Co-authored-by: Felix Fontein <felix@fontein.de> * fixed missing defaults, per PR tests * added changelog fragment * Update changelogs/fragments/nios-fix-ib_spec.yaml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
637571993a
commit
6c7f8f97ad
22 changed files with 326 additions and 276 deletions
|
@ -27,6 +27,7 @@ options:
|
|||
description:
|
||||
- Specifies the name of the NIOS nameserver group to be managed.
|
||||
required: true
|
||||
type: str
|
||||
grid_primary:
|
||||
description:
|
||||
- This host is to be used as primary server in this nameserver group. It must be a grid member.
|
||||
|
@ -38,6 +39,7 @@ options:
|
|||
description:
|
||||
- Provide the name of the grid member to identify the host.
|
||||
required: true
|
||||
type: str
|
||||
enable_preferred_primaries:
|
||||
description:
|
||||
- This flag represents whether the preferred_primaries field values of this member are used (see Infoblox WAPI docs).
|
||||
|
@ -63,6 +65,37 @@ options:
|
|||
- Provide a list of elements like in I(external_primaries) to set the precedence of preferred primary nameservers.
|
||||
type: list
|
||||
elements: dict
|
||||
suboptions:
|
||||
address:
|
||||
description:
|
||||
- Configures the IP address of the preferred primary nameserver.
|
||||
required: true
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Set a label for the preferred primary nameserver.
|
||||
required: true
|
||||
type: str
|
||||
stealth:
|
||||
description:
|
||||
- Configure the preferred primary nameserver as stealth server (without NS record) in the zones.
|
||||
type: bool
|
||||
default: false
|
||||
tsig_key_name:
|
||||
description:
|
||||
- Sets a label for the I(tsig_key) value.
|
||||
required: true
|
||||
type: str
|
||||
tsig_key_alg:
|
||||
description:
|
||||
- Provides the algorithm used for the I(tsig_key) in use.
|
||||
choices: ['HMAC-MD5', 'HMAC-SHA256']
|
||||
default: 'HMAC-MD5'
|
||||
type: str
|
||||
tsig_key:
|
||||
description:
|
||||
- Set a DNS TSIG key for the nameserver to secure zone transfers (AFXRs).
|
||||
type: str
|
||||
grid_secondaries:
|
||||
description:
|
||||
- Configures the list of grid member hosts that act as secondary nameservers.
|
||||
|
@ -74,6 +107,7 @@ options:
|
|||
description:
|
||||
- Provide the name of the grid member to identify the host.
|
||||
required: true
|
||||
type: str
|
||||
enable_preferred_primaries:
|
||||
description:
|
||||
- This flag represents whether the preferred_primaries field values of this member are used (see Infoblox WAPI docs).
|
||||
|
@ -99,6 +133,37 @@ options:
|
|||
- Provide a list of elements like in I(external_primaries) to set the precedence of preferred primary nameservers.
|
||||
type: list
|
||||
elements: dict
|
||||
suboptions:
|
||||
address:
|
||||
description:
|
||||
- Configures the IP address of the preferred primary nameserver.
|
||||
required: true
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Set a label for the preferred primary nameserver.
|
||||
required: true
|
||||
type: str
|
||||
stealth:
|
||||
description:
|
||||
- Configure the preferred primary nameserver as stealth server (without NS record) in the zones.
|
||||
type: bool
|
||||
default: false
|
||||
tsig_key_name:
|
||||
description:
|
||||
- Sets a label for the I(tsig_key) value.
|
||||
type: str
|
||||
required: true
|
||||
tsig_key_alg:
|
||||
description:
|
||||
- Provides the algorithm used for the I(tsig_key) in use.
|
||||
choices: ['HMAC-MD5', 'HMAC-SHA256']
|
||||
default: 'HMAC-MD5'
|
||||
type: str
|
||||
tsig_key:
|
||||
description:
|
||||
- Set a DNS TSIG key for the nameserver to secure zone transfers (AFXRs).
|
||||
type: str
|
||||
is_grid_default:
|
||||
description:
|
||||
- If set to C(True) this nsgroup will become the default nameserver group for new zones.
|
||||
|
@ -123,10 +188,12 @@ options:
|
|||
description:
|
||||
- Configures the IP address of the external nameserver
|
||||
required: true
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Set a label for the external nameserver
|
||||
required: true
|
||||
type: str
|
||||
stealth:
|
||||
description:
|
||||
- Configure the external nameserver as stealth server (without NS record) in the zones.
|
||||
|
@ -135,14 +202,18 @@ options:
|
|||
tsig_key_name:
|
||||
description:
|
||||
- Sets a label for the I(tsig_key) value
|
||||
type: str
|
||||
required: true
|
||||
tsig_key_alg:
|
||||
description:
|
||||
- Provides the algorithm used for the I(tsig_key) in use.
|
||||
choices: ['HMAC-MD5', 'HMAC-SHA256']
|
||||
default: 'HMAC-MD5'
|
||||
type: str
|
||||
tsig_key:
|
||||
description:
|
||||
- Set a DNS TSIG key for the nameserver to secure zone transfers (AFXRs).
|
||||
type: str
|
||||
required: false
|
||||
external_secondaries:
|
||||
description:
|
||||
|
@ -154,10 +225,12 @@ options:
|
|||
description:
|
||||
- Configures the IP address of the external nameserver
|
||||
required: true
|
||||
type: str
|
||||
name:
|
||||
description:
|
||||
- Set a label for the external nameserver
|
||||
required: true
|
||||
type: str
|
||||
stealth:
|
||||
description:
|
||||
- Configure the external nameserver as stealth server (without NS record) in the zones.
|
||||
|
@ -166,26 +239,32 @@ options:
|
|||
tsig_key_name:
|
||||
description:
|
||||
- Sets a label for the I(tsig_key) value
|
||||
type: str
|
||||
required: true
|
||||
tsig_key_alg:
|
||||
description:
|
||||
- Provides the algorithm used for the I(tsig_key) in use.
|
||||
choices: ['HMAC-MD5', 'HMAC-SHA256']
|
||||
default: 'HMAC-MD5'
|
||||
type: str
|
||||
tsig_key:
|
||||
description:
|
||||
- Set a DNS TSIG key for the nameserver to secure zone transfers (AFXRs).
|
||||
type: str
|
||||
extattrs:
|
||||
description:
|
||||
- Allows for the configuration of Extensible Attributes on the
|
||||
instance of the object. This argument accepts a set of key / value
|
||||
pairs for configuration.
|
||||
required: false
|
||||
type: str
|
||||
comment:
|
||||
description:
|
||||
- Configures a text string comment to be associated with the instance
|
||||
of this object. The provided text string will be configured on the
|
||||
object instance.
|
||||
required: false
|
||||
type: str
|
||||
state:
|
||||
description:
|
||||
- Configures the intended state of the instance of the object on
|
||||
|
@ -194,7 +273,8 @@ options:
|
|||
the value is removed (if necessary) from the device.
|
||||
choices: [present, absent]
|
||||
default: present
|
||||
'''
|
||||
type: str
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Create simple infoblox nameserver group
|
||||
|
@ -246,6 +326,7 @@ RETURN = ''' # '''
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiModule
|
||||
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import NIOS_NSGROUP
|
||||
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import normalize_ib_spec
|
||||
|
||||
|
||||
# from infoblox documentation
|
||||
|
@ -314,8 +395,8 @@ def main():
|
|||
return module.params['grid_secondaries']
|
||||
|
||||
extserver_spec = dict(
|
||||
address=dict(required=True, ib_req=True),
|
||||
name=dict(required=True, ib_req=True),
|
||||
address=dict(required=True),
|
||||
name=dict(required=True),
|
||||
stealth=dict(type='bool', default=False),
|
||||
tsig_key=dict(),
|
||||
tsig_key_alg=dict(choices=['HMAC-MD5', 'HMAC-SHA256'], default='HMAC-MD5'),
|
||||
|
@ -323,7 +404,7 @@ def main():
|
|||
)
|
||||
|
||||
memberserver_spec = dict(
|
||||
name=dict(required=True, ib_req=True),
|
||||
name=dict(required=True, ),
|
||||
enable_preferred_primaries=dict(type='bool', default=False),
|
||||
grid_replicate=dict(type='bool', default=False),
|
||||
lead=dict(type='bool', default=False),
|
||||
|
@ -346,7 +427,7 @@ def main():
|
|||
comment=dict(),
|
||||
)
|
||||
|
||||
argument_spec.update(ib_spec)
|
||||
argument_spec.update(normalize_ib_spec(ib_spec))
|
||||
argument_spec.update(WapiModule.provider_spec)
|
||||
|
||||
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue