Skip to content

Commit

Permalink
[pfsense_dns_resover] Fixup defaults; Add wiki link
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Jan 3, 2024
1 parent af7679f commit ebb5dbc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The following modules are currently available:
* [pfsense_cert](https://github.com/pfsensible/core/wiki/pfsense_cert) for Certificates
* [pfsense_default_gateway](https://github.com/pfsensible/core/wiki/pfsense_default_gateway) for setting the default gateways
* [pfsense_dhcp_static](https://github.com/pfsensible/core/wiki/pfsense_dhcp_static) for static DHCP entries
* pfsense_dns_resolver for DNS resolver (unbound) settings
* [pfsense_dns_resolver](https://github.com/pfsensible/core/wiki/pfsense_dns_resolver) for DNS resolver (unbound) settings
* [pfsense_gateway](https://github.com/pfsensible/core/wiki/pfsense_gateway) for routing gateways
* [pfsense_group](https://github.com/pfsensible/core/wiki/pfsense_group) for user groups
* [pfsense_interface](https://github.com/pfsensible/core/wiki/pfsense_interface) for interfaces
Expand Down
15 changes: 10 additions & 5 deletions plugins/modules/pfsense_dns_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@
descr:
description: A description may be entered here for administrative reference.
required: false
default: ""
type: str
aliases:
description: Additional names for this host.
required: false
default: []
type: list
elements: dict
suboptions:
Expand All @@ -144,7 +146,6 @@
domainoverrides:
description: Domains for which the resolver's standard DNS lookup should be overridden.
required: false
default: []
type: list
elements: dict
suboptions:
Expand Down Expand Up @@ -216,7 +217,7 @@
edns_buffer_size:
description: Number of bytes to advertise as the EDNS reassembly buffer size.
required: false
default: "4096"
default: "auto"
choices: [ "auto", "512", "1220", "1232", "1432", "1480", "4096" ]
type: str
num_queries_per_thread:
Expand Down Expand Up @@ -303,7 +304,7 @@
DNS_RESOLVER_DOMAIN_OVERRIDE_SPEC = dict(
domain=dict(required=True, type='str'),
ip=dict(required=True, type='str'),
descr=dict(default='', type='str'),
descr=dict(type='str'),
tls_hostname=dict(default='', type='str'),
forward_tls_upstream=dict(default='', type='str'),
)
Expand Down Expand Up @@ -347,7 +348,7 @@
regovpnclients=dict(default=False, type='bool'),
custom_options=dict(default="", type='str'),
hosts=dict(default=[], type='list', elements='dict', options=DNS_RESOLVER_HOST_SPEC),
domainoverrides=dict(default=[], type='list', elements='dict', options=DNS_RESOLVER_DOMAIN_OVERRIDE_SPEC),
domainoverrides=dict(type='list', elements='dict', options=DNS_RESOLVER_DOMAIN_OVERRIDE_SPEC),
# Advanced Settings
hideidentity=dict(default=True, type='bool'),
hideversion=dict(default=True, type='bool'),
Expand All @@ -361,7 +362,7 @@
msgcachesize=dict(default=4, type='int', choices=[4, 10, 20, 50, 100, 250, 512]),
outgoing_num_tcp=dict(default=10, type='int', choices=[0, 10, 20, 30, 50]),
incoming_num_tcp=dict(default=10, type='int', choices=[0, 10, 20, 30, 50]),
edns_buffer_size=dict(default="4096", type='str', choices=["auto", "512", "1220", "1232", "1432", "1480", "4096"]),
edns_buffer_size=dict(default="auto", type='str', choices=["auto", "512", "1220", "1232", "1432", "1480", "4096"]),
num_queries_per_thread=dict(default=512, type='int', choices=[512, 1024, 2048]),
jostle_timeout=dict(default=200, type='int', choices=[100, 200, 500, 1000]),
cache_max_ttl=dict(default=86400, type='int'),
Expand Down Expand Up @@ -462,6 +463,10 @@ def _params_to_obj(self):
host["aliases"] = {
"item": tmp_aliases
}
else:
# Default is an empty element
host["aliases"] = "\n\t\t\t"


return obj

Expand Down

0 comments on commit ebb5dbc

Please sign in to comment.