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

Fixed validations in a couple of modules (#2268)

* fixed udm_dns_zone

* fixed udm_dns_record

* removed lines from ignore files

* added changelog fragment

* moved the list elements fix to minor_changes
This commit is contained in:
Alexei Znamensky 2021-04-20 04:48:16 +12:00 committed by GitHub
parent d5c26b6f70
commit fbbd8ecd6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 31 deletions

View file

@ -0,0 +1,4 @@
bugfixes:
- udm_dns_record - fixed default value of parameter ``data`` to match its type (https://github.com/ansible-collections/community.general/pull/2268).
minor_changes:
- udm_dns_zone - elements of list parameters ``nameserver``, ``interfaces``, and ``mx`` are now validated (https://github.com/ansible-collections/community.general/pull/2268).

View file

@ -23,21 +23,24 @@ requirements:
- Univention
options:
state:
required: false
type: str
default: "present"
choices: [ present, absent ]
description:
- Whether the dns record is present or not.
name:
type: str
required: true
description:
- "Name of the record, this is also the DNS record. E.g. www for
www.example.com."
zone:
type: str
required: true
description:
- Corresponding DNS zone for this record, e.g. example.com.
type:
type: str
required: true
description:
- "Define the record type. C(host_record) is a A or AAAA record,
@ -45,8 +48,8 @@ options:
is a SRV record and C(txt_record) is a TXT record."
- "The available choices are: C(host_record), C(alias), C(ptr_record), C(srv_record), C(txt_record)."
data:
required: false
default: []
type: dict
default: {}
description:
- "Additional data for this record, e.g. ['a': '192.0.2.1'].
Required if C(state=present)."
@ -98,7 +101,7 @@ def main():
type='str'),
name=dict(required=True,
type='str'),
data=dict(default=[],
data=dict(default={},
type='dict'),
state=dict(default='present',
choices=['present', 'absent'],

View file

@ -22,58 +22,64 @@ requirements:
- Python >= 2.6
options:
state:
required: false
type: str
default: "present"
choices: [ present, absent ]
description:
- Whether the dns zone is present or not.
type:
type: str
required: true
description:
- Define if the zone is a forward or reverse DNS zone.
- "The available choices are: C(forward_zone), C(reverse_zone)."
zone:
type: str
required: true
description:
- DNS zone name, e.g. C(example.com).
aliases: [name]
nameserver:
required: false
type: list
elements: str
description:
- List of appropriate name servers. Required if C(state=present).
interfaces:
required: false
type: list
elements: str
description:
- List of interface IP addresses, on which the server should
response this zone. Required if C(state=present).
refresh:
required: false
type: int
default: 3600
description:
- Interval before the zone should be refreshed.
retry:
required: false
type: int
default: 1800
description:
- Interval that should elapse before a failed refresh should be retried.
expire:
required: false
type: int
default: 604800
description:
- Specifies the upper limit on the time interval that can elapse before the zone is no longer authoritative.
ttl:
required: false
type: int
default: 600
description:
- Minimum TTL field that should be exported with any RR from this zone.
contact:
required: false
type: str
default: ''
description:
- Contact person in the SOA record.
mx:
required: false
type: list
elements: str
default: []
description:
- List of MX servers. (Must declared as A or AAAA records).
@ -128,9 +134,11 @@ def main():
aliases=['name'],
type='str'),
nameserver=dict(default=[],
type='list'),
type='list',
elements='str'),
interfaces=dict(default=[],
type='list'),
type='list',
elements='str'),
refresh=dict(default=3600,
type='int'),
retry=dict(default=1800,
@ -142,7 +150,8 @@ def main():
contact=dict(default='',
type='str'),
mx=dict(default=[],
type='list'),
type='list',
elements='str'),
state=dict(default='present',
choices=['present', 'absent'],
type='str')

View file

@ -28,10 +28,6 @@ plugins/modules/cloud/smartos/vmadm.py validate-modules:undocumented-parameter
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter
plugins/modules/cloud/univention/udm_dns_record.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:undocumented-parameter
plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type

View file

@ -27,10 +27,6 @@ plugins/modules/cloud/smartos/vmadm.py validate-modules:undocumented-parameter
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter
plugins/modules/cloud/univention/udm_dns_record.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:undocumented-parameter
plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type

View file

@ -27,10 +27,6 @@ plugins/modules/cloud/smartos/vmadm.py validate-modules:undocumented-parameter
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter
plugins/modules/cloud/univention/udm_dns_record.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:undocumented-parameter
plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type

View file

@ -23,9 +23,6 @@ plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-do
plugins/modules/cloud/smartos/vmadm.py validate-modules:undocumented-parameter
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter
plugins/modules/cloud/univention/udm_dns_record.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/univention/udm_dns_zone.py validate-modules:undocumented-parameter
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type
plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter
plugins/modules/packaging/language/composer.py validate-modules:parameter-invalid