summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/dns/plugins
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:18:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:18:41 +0000
commitb643c52cf29ce5bbab738b43290af3556efa1ca9 (patch)
tree21d5c53d7a9b696627a255777cefdf6f78968824 /ansible_collections/community/dns/plugins
parentReleasing progress-linux version 9.5.1+dfsg-1~progress7.99u1. (diff)
downloadansible-b643c52cf29ce5bbab738b43290af3556efa1ca9.tar.xz
ansible-b643c52cf29ce5bbab738b43290af3556efa1ca9.zip
Merging upstream version 10.0.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/dns/plugins')
-rw-r--r--ansible_collections/community/dns/plugins/doc_fragments/inventory_records.py7
-rw-r--r--ansible_collections/community/dns/plugins/doc_fragments/options.py5
-rw-r--r--ansible_collections/community/dns/plugins/inventory/hetzner_dns_records.py12
-rw-r--r--ansible_collections/community/dns/plugins/inventory/hosttech_dns_records.py11
-rw-r--r--ansible_collections/community/dns/plugins/lookup/lookup.py19
-rw-r--r--ansible_collections/community/dns/plugins/lookup/lookup_as_dict.py19
-rw-r--r--ansible_collections/community/dns/plugins/module_utils/conversion/converter.py16
-rw-r--r--ansible_collections/community/dns/plugins/module_utils/options.py2
-rw-r--r--ansible_collections/community/dns/plugins/module_utils/provider.py4
-rw-r--r--ansible_collections/community/dns/plugins/module_utils/resolver.py9
-rw-r--r--ansible_collections/community/dns/plugins/modules/hetzner_dns_record.py7
-rw-r--r--ansible_collections/community/dns/plugins/modules/hetzner_dns_record_set.py7
-rw-r--r--ansible_collections/community/dns/plugins/modules/hosttech_dns_records.py129
-rw-r--r--ansible_collections/community/dns/plugins/plugin_utils/inventory/records.py26
-rw-r--r--ansible_collections/community/dns/plugins/public_suffix_list.dat132
15 files changed, 193 insertions, 212 deletions
diff --git a/ansible_collections/community/dns/plugins/doc_fragments/inventory_records.py b/ansible_collections/community/dns/plugins/doc_fragments/inventory_records.py
index e7a90a7b7..760ba1590 100644
--- a/ansible_collections/community/dns/plugins/doc_fragments/inventory_records.py
+++ b/ansible_collections/community/dns/plugins/doc_fragments/inventory_records.py
@@ -34,11 +34,10 @@ options:
simple_filters:
description:
- A dictionary of filter value pairs.
- - This option has been renamed from O(filters) to O(simple_filters) in community.dns 2.8.0.
- The old name can still be used until community.dns 3.0.0.
+ - This option used to be called O(filters) before community.dns 3.0.0. It has been renamed from
+ O(filters) to O(simple_filters) in community.dns 2.8.0, and the old name was still available
+ as an alias until community.dns 3.0.0. O(filters) is now used for something else.
type: dict
- aliases:
- - filters
default: {}
suboptions:
# (The following must be kept in sync with the equivalent lines in <provider_name>.py!)
diff --git a/ansible_collections/community/dns/plugins/doc_fragments/options.py b/ansible_collections/community/dns/plugins/doc_fragments/options.py
index 55c83f1b2..9b892c711 100644
--- a/ansible_collections/community/dns/plugins/doc_fragments/options.py
+++ b/ansible_collections/community/dns/plugins/doc_fragments/options.py
@@ -55,11 +55,12 @@ options:
description:
- Whether to treat numeric escape sequences (V(\\xyz)) as octal or decimal numbers.
This is only used when O(txt_transformation=quoted).
- - The current default is V(octal) which is deprecated. It will change to V(decimal) in
- community.dns 3.0.0. The value V(decimal) is compatible to L(RFC 1035, https://www.ietf.org/rfc/rfc1035.txt).
+ - The default changed to V(decimal) in community.dns 3.0.0. Before, the default used to be V(octal).
+ The value V(decimal) is compatible to L(RFC 1035, https://www.ietf.org/rfc/rfc1035.txt).
type: str
choices:
- decimal
- octal
+ default: decimal
version_added: 2.5.0
'''
diff --git a/ansible_collections/community/dns/plugins/inventory/hetzner_dns_records.py b/ansible_collections/community/dns/plugins/inventory/hetzner_dns_records.py
index 7982c23f0..8fe1d9465 100644
--- a/ansible_collections/community/dns/plugins/inventory/hetzner_dns_records.py
+++ b/ansible_collections/community/dns/plugins/inventory/hetzner_dns_records.py
@@ -24,12 +24,14 @@ description:
options:
plugin:
description: The name of this plugin. Should always be set to V(community.dns.hetzner_dns_records) for this plugin to recognize it as its own.
- # TODO: add `required: true` in 3.0.0
- # required: true
+ required: true
choices:
- community.dns.hetzner_dns_records
type: str
+ filters:
+ version_added: 3.0.0
+
extends_documentation_fragment:
- community.dns.hetzner
- community.dns.hetzner.plugin
@@ -37,6 +39,7 @@ extends_documentation_fragment:
- community.dns.hetzner.zone_id_type
- community.dns.inventory_records
- community.dns.options.record_transformation
+ - community.library_inventory_filtering_v1.inventory_filter
notes:
- The provider-specific O(hetzner_token) option can be templated.
@@ -58,6 +61,10 @@ zone_name: domain.de
simple_filters:
type:
- TXT
+filters:
+ - include: >-
+ not ansible_host.startswith('v=')
+ - exclude: true
txt_transformation: unquoted
# You can also configure the token by putting secret value into this file,
@@ -67,6 +74,7 @@ hetzner_token: >-
{{ (lookup('community.sops.sops', 'keys/hetzner.sops.yml') | from_yaml).hetzner_dns_token }}
'''
+
from ansible_collections.community.dns.plugins.module_utils.http import (
OpenURLHelper,
)
diff --git a/ansible_collections/community/dns/plugins/inventory/hosttech_dns_records.py b/ansible_collections/community/dns/plugins/inventory/hosttech_dns_records.py
index d14cf73ed..e5573de5d 100644
--- a/ansible_collections/community/dns/plugins/inventory/hosttech_dns_records.py
+++ b/ansible_collections/community/dns/plugins/inventory/hosttech_dns_records.py
@@ -24,8 +24,7 @@ description:
options:
plugin:
description: The name of this plugin. Should always be set to V(community.dns.hosttech_dns_records) for this plugin to recognize it as its own.
- # TODO: add `required: true` in 3.0.0
- # required: true
+ required: true
choices:
- community.dns.hosttech_dns_records
type: str
@@ -38,6 +37,9 @@ options:
# compatibility with previous type=int...
# type: string
+ filters:
+ version_added: 3.0.0
+
extends_documentation_fragment:
- community.dns.hosttech
- community.dns.hosttech.plugin
@@ -45,6 +47,7 @@ extends_documentation_fragment:
- community.dns.hosttech.zone_id_type
- community.dns.inventory_records
- community.dns.options.record_transformation
+ - community.library_inventory_filtering_v1.inventory_filter
notes:
- The provider-specific O(hosttech_username), O(hosttech_password), and O(hosttech_token) options can be templated.
@@ -66,6 +69,10 @@ zone_name: domain.ch
simple_filters:
type:
- AAAA
+filters:
+ - include: >-
+ '*.' not in inventory_hostname
+ - exclude: true
# You can also configure the token by putting secret value into this file,
# but this is discouraged. Use a lookup like below, or leave it away and
diff --git a/ansible_collections/community/dns/plugins/lookup/lookup.py b/ansible_collections/community/dns/plugins/lookup/lookup.py
index 9f18164b1..0e968d81a 100644
--- a/ansible_collections/community/dns/plugins/lookup/lookup.py
+++ b/ansible_collections/community/dns/plugins/lookup/lookup.py
@@ -89,6 +89,17 @@ options:
- fail
- message
default: empty
+ search:
+ description:
+ - If V(false), the input is assumed to be an absolute domain name.
+ - If V(true), the input is assumed to be a relative domain name if it does not end with C(.),
+ the search list configured in the system's resolver configuration will be used for relative
+ names, and the resolver's domain may be added to relative names.
+ - Note that this behavior changed in community.dns 3.0.0. In community.dns 2.x.y, O(search=false)
+ was the only available choice.
+ type: bool
+ default: true
+ version_added: 3.0.0
notes:
- Note that when using this lookup plugin with V(lookup(\)), and the result is a one-element list,
Ansible simply returns the one element not as a list. Since this behavior is surprising and
@@ -151,7 +162,7 @@ except ImportError:
class LookupModule(LookupBase):
@staticmethod
- def _resolve(resolver, name, rdtype, server_addresses, nxdomain_handling):
+ def _resolve(resolver, name, rdtype, server_addresses, nxdomain_handling, target_can_be_relative=True, search=True):
def callback():
try:
rrset = resolver.resolve(
@@ -159,6 +170,8 @@ class LookupModule(LookupBase):
rdtype=rdtype,
server_addresses=server_addresses,
nxdomain_is_empty=nxdomain_handling == 'empty',
+ target_can_be_relative=target_can_be_relative,
+ search=search,
)
if not rrset:
return []
@@ -189,6 +202,8 @@ class LookupModule(LookupBase):
nxdomain_handling = self.get_option('nxdomain_handling')
+ search = self.get_option('search')
+
server_addresses = None
if self.get_option('server'):
server_addresses = []
@@ -206,5 +221,5 @@ class LookupModule(LookupBase):
result = []
for name in terms:
- result.extend(self._resolve(resolver, name, rdtype, server_addresses, nxdomain_handling))
+ result.extend(self._resolve(resolver, name, rdtype, server_addresses, nxdomain_handling, target_can_be_relative=search, search=search))
return result
diff --git a/ansible_collections/community/dns/plugins/lookup/lookup_as_dict.py b/ansible_collections/community/dns/plugins/lookup/lookup_as_dict.py
index 8783d86c1..3650b2094 100644
--- a/ansible_collections/community/dns/plugins/lookup/lookup_as_dict.py
+++ b/ansible_collections/community/dns/plugins/lookup/lookup_as_dict.py
@@ -87,6 +87,17 @@ options:
- empty
- fail
default: empty
+ search:
+ description:
+ - If V(false), the input is assumed to be an absolute domain name.
+ - If V(true), the input is assumed to be a relative domain name if it does not end with C(.),
+ the search list configured in the system's resolver configuration will be used for relative
+ names, and the resolver's domain may be added to relative names.
+ - Note that this behavior changed in community.dns 3.0.0. In community.dns 2.x.y, O(search=false)
+ was the only available choice.
+ type: bool
+ default: true
+ version_added: 3.0.0
notes:
- Note that when using this lookup plugin with V(lookup(\)), and the result is a one-element list,
Ansible simply returns the one element not as a list. Since this behavior is surprising and
@@ -440,7 +451,7 @@ except ImportError:
class LookupModule(LookupBase):
@staticmethod
- def _resolve(resolver, name, rdtype, server_addresses, nxdomain_handling):
+ def _resolve(resolver, name, rdtype, server_addresses, nxdomain_handling, target_can_be_relative=True, search=True):
def callback():
try:
rrset = resolver.resolve(
@@ -448,6 +459,8 @@ class LookupModule(LookupBase):
rdtype=rdtype,
server_addresses=server_addresses,
nxdomain_is_empty=nxdomain_handling == 'empty',
+ target_can_be_relative=target_can_be_relative,
+ search=search,
)
if not rrset:
return []
@@ -476,6 +489,8 @@ class LookupModule(LookupBase):
nxdomain_handling = self.get_option('nxdomain_handling')
+ search = self.get_option('search')
+
server_addresses = None
if self.get_option('server'):
server_addresses = []
@@ -493,5 +508,5 @@ class LookupModule(LookupBase):
result = []
for name in terms:
- result.extend(self._resolve(resolver, name, rdtype, server_addresses, nxdomain_handling))
+ result.extend(self._resolve(resolver, name, rdtype, server_addresses, nxdomain_handling, target_can_be_relative=search, search=search))
return result
diff --git a/ansible_collections/community/dns/plugins/module_utils/conversion/converter.py b/ansible_collections/community/dns/plugins/module_utils/conversion/converter.py
index b8a9f4a8d..c6667d50e 100644
--- a/ansible_collections/community/dns/plugins/module_utils/conversion/converter.py
+++ b/ansible_collections/community/dns/plugins/module_utils/conversion/converter.py
@@ -44,23 +44,9 @@ class RecordConverter(object):
self._txt_transformation = self._option_provider.get_option('txt_transformation')
# Valid values: 'decimal', 'octal'
self._txt_character_encoding = self._option_provider.get_option('txt_character_encoding')
- self._txt_character_encoding_deprecation = False
- if self._txt_character_encoding is None:
- # TODO: remove implicit default in community.dns 3.0.0
- self._txt_character_encoding = 'octal'
- if self._txt_transformation == 'quoted':
- self._txt_character_encoding_deprecation = True
def emit_deprecations(self, deprecator):
- if self._txt_character_encoding_deprecation:
- deprecator(
- 'The default of the txt_character_encoding option will change from "octal" to "decimal" in community.dns 3.0.0.'
- ' This potentially affects you since you use txt_transformation=quoted. You can explicitly set txt_character_encoding'
- ' to "octal" to keep the current behavior, or "decimal" to already now switch to the new behavior. We recommend'
- ' switching to the new behavior, and using check/diff mode to figure out potential changes',
- version='3.0.0',
- collection_name='community.dns',
- )
+ pass
def _handle_txt_api(self, to_api, record):
"""
diff --git a/ansible_collections/community/dns/plugins/module_utils/options.py b/ansible_collections/community/dns/plugins/module_utils/options.py
index 3906b4b6c..3b88ebae8 100644
--- a/ansible_collections/community/dns/plugins/module_utils/options.py
+++ b/ansible_collections/community/dns/plugins/module_utils/options.py
@@ -32,6 +32,6 @@ def create_record_transformation_argspec():
return ArgumentSpec(
argument_spec=dict(
txt_transformation=dict(type='str', default='unquoted', choices=['api', 'quoted', 'unquoted']),
- txt_character_encoding=dict(type='str', choices=['decimal', 'octal']),
+ txt_character_encoding=dict(type='str', default='decimal', choices=['decimal', 'octal']),
),
)
diff --git a/ansible_collections/community/dns/plugins/module_utils/provider.py b/ansible_collections/community/dns/plugins/module_utils/provider.py
index 56282d9c9..f5bf08a81 100644
--- a/ansible_collections/community/dns/plugins/module_utils/provider.py
+++ b/ansible_collections/community/dns/plugins/module_utils/provider.py
@@ -104,6 +104,6 @@ class ProviderInformation(object):
This return value is only used if txt_record_handling returns 'encoded'.
- WARNING: the default return value will change to 'decimal' for community.dns 3.0.0!
+ Note: the default return value changed from 'octal' to 'decimal' in community.dns 3.0.0.
"""
- return 'octal'
+ return 'decimal'
diff --git a/ansible_collections/community/dns/plugins/module_utils/resolver.py b/ansible_collections/community/dns/plugins/module_utils/resolver.py
index 280b697d4..3814b164b 100644
--- a/ansible_collections/community/dns/plugins/module_utils/resolver.py
+++ b/ansible_collections/community/dns/plugins/module_utils/resolver.py
@@ -73,7 +73,7 @@ class _Resolve(object):
response = self._handle_timeout(resolver.resolve, dnsname, lifetime=self.timeout, **kwargs)
except AttributeError:
# For dnspython < 2.0.0
- resolver.search = False
+ resolver.search = kwargs.pop('search', False)
try:
response = self._handle_timeout(resolver.query, dnsname, lifetime=self.timeout, **kwargs)
except TypeError:
@@ -101,8 +101,11 @@ class SimpleResolver(_Resolve):
servfail_retries=servfail_retries,
)
- def resolve(self, target, nxdomain_is_empty=True, server_addresses=None, **kwargs):
- dnsname = dns.name.from_unicode(to_text(target))
+ def resolve(self, target, nxdomain_is_empty=True, server_addresses=None, target_can_be_relative=False, **kwargs):
+ if target_can_be_relative:
+ dnsname = dns.name.from_unicode(to_text(target), origin=None)
+ else:
+ dnsname = dns.name.from_unicode(to_text(target))
resolver = self.default_resolver
if server_addresses:
diff --git a/ansible_collections/community/dns/plugins/modules/hetzner_dns_record.py b/ansible_collections/community/dns/plugins/modules/hetzner_dns_record.py
index 23c873322..c27c152c3 100644
--- a/ansible_collections/community/dns/plugins/modules/hetzner_dns_record.py
+++ b/ansible_collections/community/dns/plugins/modules/hetzner_dns_record.py
@@ -43,11 +43,6 @@ attributes:
diff_mode:
support: full
-options:
- prefix:
- aliases:
- - name
-
author:
- Markus Bergholz (@markuman) <markuman+spambelongstogoogle@gmail.com>
- Felix Fontein (@felixfontein)
@@ -109,8 +104,6 @@ def main():
provider_information = create_hetzner_provider_information()
argument_spec = create_hetzner_argument_spec()
argument_spec.merge(create_module_argument_spec(provider_information=provider_information))
- argument_spec.argument_spec['prefix']['aliases'] = ['name']
- argument_spec.argument_spec['prefix']['deprecated_aliases'] = [dict(name='name', version='3.0.0', collection_name='community.dns')]
module = AnsibleModule(supports_check_mode=True, **argument_spec.to_kwargs())
run_module(module, lambda: create_hetzner_api(ModuleOptionProvider(module), ModuleHTTPHelper(module)), provider_information=provider_information)
diff --git a/ansible_collections/community/dns/plugins/modules/hetzner_dns_record_set.py b/ansible_collections/community/dns/plugins/modules/hetzner_dns_record_set.py
index ce3ad313a..61cfca634 100644
--- a/ansible_collections/community/dns/plugins/modules/hetzner_dns_record_set.py
+++ b/ansible_collections/community/dns/plugins/modules/hetzner_dns_record_set.py
@@ -40,11 +40,6 @@ attributes:
diff_mode:
support: full
-options:
- prefix:
- aliases:
- - name
-
author:
- Markus Bergholz (@markuman) <markuman+spambelongstogoogle@gmail.com>
- Felix Fontein (@felixfontein)
@@ -224,8 +219,6 @@ def main():
provider_information = create_hetzner_provider_information()
argument_spec = create_hetzner_argument_spec()
argument_spec.merge(create_module_argument_spec(provider_information=provider_information))
- argument_spec.argument_spec['prefix']['aliases'] = ['name']
- argument_spec.argument_spec['prefix']['deprecated_aliases'] = [dict(name='name', version='3.0.0', collection_name='community.dns')]
module = AnsibleModule(supports_check_mode=True, **argument_spec.to_kwargs())
run_module(module, lambda: create_hetzner_api(ModuleOptionProvider(module), ModuleHTTPHelper(module)), provider_information=provider_information)
diff --git a/ansible_collections/community/dns/plugins/modules/hosttech_dns_records.py b/ansible_collections/community/dns/plugins/modules/hosttech_dns_records.py
deleted file mode 100644
index 583cfa58e..000000000
--- a/ansible_collections/community/dns/plugins/modules/hosttech_dns_records.py
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2017-2021 Felix Fontein
-# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-
-DOCUMENTATION = '''
----
-module: hosttech_dns_record_sets
-
-short_description: Bulk synchronize DNS record sets in Hosttech DNS service
-
-version_added: 2.0.0
-
-description:
- - Bulk synchronize DNS record sets in Hosttech DNS service.
- - This module replaces C(hosttech_dns_records) from community.dns before 2.0.0.
-
-extends_documentation_fragment:
- - community.dns.hosttech
- - community.dns.hosttech.record_notes
- - community.dns.hosttech.record_type_choices_record_sets_module
- - community.dns.hosttech.zone_id_type
- - community.dns.module_record_sets
- - community.dns.options.record_transformation
- - community.dns.attributes
- - community.dns.attributes.actiongroup_hosttech
-
-attributes:
- action_group:
- version_added: 2.4.0
- check_mode:
- support: full
- diff_mode:
- support: full
-
-author:
- - Felix Fontein (@felixfontein)
-
-'''
-
-EXAMPLES = '''
-- name: Make sure some records exist and have the expected values
- community.dns.hosttech_dns_record_sets:
- zone_name: foo.com
- records:
- - prefix: new
- type: A
- ttl: 7200
- value:
- - 1.1.1.1
- - 2.2.2.2
- - prefix: new
- type: AAAA
- ttl: 7200
- value:
- - "::1"
- - record: foo.com
- type: TXT
- value:
- - test
- hosttech_token: access_token
-
-- name: Synchronize DNS zone with a fixed set of records
- # If a record exists that is not mentioned here, it will be deleted
- community.dns.hosttech_dns_record_sets:
- zone_id: 23
- purge: true
- records:
- - prefix: ''
- type: A
- value: 127.0.0.1
- - prefix: ''
- type: AAAA
- value: "::1"
- - prefix: ''
- type: NS
- value:
- - ns-1.hoster.com
- - ns-2.hoster.com
- - ns-3.hoster.com
- hosttech_token: access_token
-'''
-
-RETURN = '''
-zone_id:
- description: The ID of the zone.
- type: int
- returned: success
- sample: 23
-'''
-
-from ansible.module_utils.basic import AnsibleModule
-
-from ansible_collections.community.dns.plugins.module_utils.argspec import (
- ModuleOptionProvider,
-)
-
-from ansible_collections.community.dns.plugins.module_utils.http import (
- ModuleHTTPHelper,
-)
-
-from ansible_collections.community.dns.plugins.module_utils.hosttech.api import (
- create_hosttech_argument_spec,
- create_hosttech_api,
- create_hosttech_provider_information,
-)
-
-from ansible_collections.community.dns.plugins.module_utils.module.record_sets import (
- create_module_argument_spec,
- run_module,
-)
-
-
-def main():
- provider_information = create_hosttech_provider_information()
- argument_spec = create_hosttech_argument_spec()
- argument_spec.merge(create_module_argument_spec(provider_information=provider_information))
- module = AnsibleModule(supports_check_mode=True, **argument_spec.to_kwargs())
- run_module(module, lambda: create_hosttech_api(ModuleOptionProvider(module), ModuleHTTPHelper(module)), provider_information=provider_information)
-
-
-if __name__ == '__main__':
- main()
diff --git a/ansible_collections/community/dns/plugins/plugin_utils/inventory/records.py b/ansible_collections/community/dns/plugins/plugin_utils/inventory/records.py
index 1d6827f2f..2ecfb1949 100644
--- a/ansible_collections/community/dns/plugins/plugin_utils/inventory/records.py
+++ b/ansible_collections/community/dns/plugins/plugin_utils/inventory/records.py
@@ -17,6 +17,8 @@ from ansible.plugins.inventory import BaseInventoryPlugin
from ansible.utils.display import Display
from ansible.template import Templar
+from ansible_collections.community.library_inventory_filtering_v1.plugins.plugin_utils.inventory_filter import parse_filters, filter_host
+
from ansible_collections.community.dns.plugins.module_utils.provider import (
ensure_type,
)
@@ -67,15 +69,7 @@ class RecordsInventoryModule(BaseInventoryPlugin):
def parse(self, inventory, loader, path, cache=False):
super(RecordsInventoryModule, self).parse(inventory, loader, path, cache)
- orig_config = self._read_config_data(path)
-
- if 'filters' in orig_config:
- display.deprecated(
- 'The `filters` option of the %s inventory plugin has been renamed to `simple_filters`. '
- 'The old name will stop working in community.dns 3.0.0.' % self.NAME,
- collection_name='community.dns',
- version='3.0.0',
- )
+ self._read_config_data(path)
self.templar = Templar(loader=loader)
@@ -119,9 +113,10 @@ class RecordsInventoryModule(BaseInventoryPlugin):
except DNSAPIError as e:
raise AnsibleError('Error: %s' % e)
- filters = self.get_option('simple_filters')
+ simple_filters = self.get_option('simple_filters')
+ filters = parse_filters(self.get_option('filters'))
- filter_types = filters.get('type') or ['A', 'AAAA', 'CNAME']
+ filter_types = simple_filters.get('type') or ['A', 'AAAA', 'CNAME']
if not isinstance(filter_types, Sequence) or isinstance(filter_types, six.string_types):
filter_types = [filter_types]
@@ -130,5 +125,12 @@ class RecordsInventoryModule(BaseInventoryPlugin):
name = zone_with_records.zone.name
if record.prefix:
name = '%s.%s' % (record.prefix, name)
+ facts = {
+ 'ansible_host': make_unsafe(record.target),
+ }
+ if not filter_host(self, name, facts, filters):
+ continue
+
self.inventory.add_host(name)
- self.inventory.set_variable(name, 'ansible_host', make_unsafe(record.target))
+ for key, value in facts.items():
+ self.inventory.set_variable(name, key, value)
diff --git a/ansible_collections/community/dns/plugins/public_suffix_list.dat b/ansible_collections/community/dns/plugins/public_suffix_list.dat
index 125f1e3d7..05df0af89 100644
--- a/ansible_collections/community/dns/plugins/public_suffix_list.dat
+++ b/ansible_collections/community/dns/plugins/public_suffix_list.dat
@@ -6710,7 +6710,7 @@ org.zw
// newGTLDs
-// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2024-03-28T15:13:37Z
+// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2024-05-04T15:12:50Z
// This list is auto-generated, don't edit it manually.
// aaa : American Automobile Association, Inc.
// https://www.iana.org/domains/root/db/aaa.html
@@ -6896,7 +6896,7 @@ anquan
// https://www.iana.org/domains/root/db/anz.html
anz
-// aol : Oath Inc.
+// aol : Yahoo Inc.
// https://www.iana.org/domains/root/db/aol.html
aol
@@ -11120,7 +11120,7 @@ xyz
// https://www.iana.org/domains/root/db/yachts.html
yachts
-// yahoo : Oath Inc.
+// yahoo : Yahoo Inc.
// https://www.iana.org/domains/root/db/yahoo.html
yahoo
@@ -11200,6 +11200,10 @@ ltd.ua
// 611coin : https://611project.org/
611.to
+// AAA workspace : https://aaa.vodka
+// Submitted by Kirill Rezraf <admin@aaa.vodka>
+aaa.vodka
+
// A2 Hosting
// Submitted by Tyler Hall <sysadmin@a2hosting.com>
a2hosted.com
@@ -11346,23 +11350,28 @@ cloudfront.net
// Amazon Cognito
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: 7bee1013-f456-47df-bfe8-03c78d946d61
+// Reference: 09588633-91fe-49d8-b4e7-ec36496d11f3
auth.af-south-1.amazoncognito.com
auth.ap-northeast-1.amazoncognito.com
auth.ap-northeast-2.amazoncognito.com
auth.ap-northeast-3.amazoncognito.com
auth.ap-south-1.amazoncognito.com
+auth.ap-south-2.amazoncognito.com
auth.ap-southeast-1.amazoncognito.com
auth.ap-southeast-2.amazoncognito.com
auth.ap-southeast-3.amazoncognito.com
+auth.ap-southeast-4.amazoncognito.com
auth.ca-central-1.amazoncognito.com
auth.eu-central-1.amazoncognito.com
+auth.eu-central-2.amazoncognito.com
auth.eu-north-1.amazoncognito.com
auth.eu-south-1.amazoncognito.com
+auth.eu-south-2.amazoncognito.com
auth.eu-west-1.amazoncognito.com
auth.eu-west-2.amazoncognito.com
auth.eu-west-3.amazoncognito.com
auth.il-central-1.amazoncognito.com
+auth.me-central-1.amazoncognito.com
auth.me-south-1.amazoncognito.com
auth.sa-east-1.amazoncognito.com
auth.us-east-1.amazoncognito.com
@@ -11385,7 +11394,7 @@ us-east-1.amazonaws.com
// Amazon EMR
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: 597f3f8e-9283-4e48-8e32-7ee25a1ff6ab
+// Reference: 82f43f9f-bbb8-400e-8349-854f5a62f20d
emrappui-prod.cn-north-1.amazonaws.com.cn
emrnotebooks-prod.cn-north-1.amazonaws.com.cn
emrstudio-prod.cn-north-1.amazonaws.com.cn
@@ -11410,6 +11419,9 @@ emrstudio-prod.ap-northeast-3.amazonaws.com
emrappui-prod.ap-south-1.amazonaws.com
emrnotebooks-prod.ap-south-1.amazonaws.com
emrstudio-prod.ap-south-1.amazonaws.com
+emrappui-prod.ap-south-2.amazonaws.com
+emrnotebooks-prod.ap-south-2.amazonaws.com
+emrstudio-prod.ap-south-2.amazonaws.com
emrappui-prod.ap-southeast-1.amazonaws.com
emrnotebooks-prod.ap-southeast-1.amazonaws.com
emrstudio-prod.ap-southeast-1.amazonaws.com
@@ -11419,18 +11431,30 @@ emrstudio-prod.ap-southeast-2.amazonaws.com
emrappui-prod.ap-southeast-3.amazonaws.com
emrnotebooks-prod.ap-southeast-3.amazonaws.com
emrstudio-prod.ap-southeast-3.amazonaws.com
+emrappui-prod.ap-southeast-4.amazonaws.com
+emrnotebooks-prod.ap-southeast-4.amazonaws.com
+emrstudio-prod.ap-southeast-4.amazonaws.com
emrappui-prod.ca-central-1.amazonaws.com
emrnotebooks-prod.ca-central-1.amazonaws.com
emrstudio-prod.ca-central-1.amazonaws.com
+emrappui-prod.ca-west-1.amazonaws.com
+emrnotebooks-prod.ca-west-1.amazonaws.com
+emrstudio-prod.ca-west-1.amazonaws.com
emrappui-prod.eu-central-1.amazonaws.com
emrnotebooks-prod.eu-central-1.amazonaws.com
emrstudio-prod.eu-central-1.amazonaws.com
+emrappui-prod.eu-central-2.amazonaws.com
+emrnotebooks-prod.eu-central-2.amazonaws.com
+emrstudio-prod.eu-central-2.amazonaws.com
emrappui-prod.eu-north-1.amazonaws.com
emrnotebooks-prod.eu-north-1.amazonaws.com
emrstudio-prod.eu-north-1.amazonaws.com
emrappui-prod.eu-south-1.amazonaws.com
emrnotebooks-prod.eu-south-1.amazonaws.com
emrstudio-prod.eu-south-1.amazonaws.com
+emrappui-prod.eu-south-2.amazonaws.com
+emrnotebooks-prod.eu-south-2.amazonaws.com
+emrstudio-prod.eu-south-2.amazonaws.com
emrappui-prod.eu-west-1.amazonaws.com
emrnotebooks-prod.eu-west-1.amazonaws.com
emrstudio-prod.eu-west-1.amazonaws.com
@@ -11440,6 +11464,9 @@ emrstudio-prod.eu-west-2.amazonaws.com
emrappui-prod.eu-west-3.amazonaws.com
emrnotebooks-prod.eu-west-3.amazonaws.com
emrstudio-prod.eu-west-3.amazonaws.com
+emrappui-prod.il-central-1.amazonaws.com
+emrnotebooks-prod.il-central-1.amazonaws.com
+emrstudio-prod.il-central-1.amazonaws.com
emrappui-prod.me-central-1.amazonaws.com
emrnotebooks-prod.me-central-1.amazonaws.com
emrstudio-prod.me-central-1.amazonaws.com
@@ -11470,9 +11497,11 @@ emrstudio-prod.us-west-2.amazonaws.com
// Amazon Managed Workflows for Apache Airflow
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: 4ab55e6f-90c0-4a8d-b6a0-52ca5dbb1c2e
+// Reference: 87f24ece-a77e-40e8-bb4a-f6b74fe9f975
*.cn-north-1.airflow.amazonaws.com.cn
*.cn-northwest-1.airflow.amazonaws.com.cn
+*.af-south-1.airflow.amazonaws.com
+*.ap-east-1.airflow.amazonaws.com
*.ap-northeast-1.airflow.amazonaws.com
*.ap-northeast-2.airflow.amazonaws.com
*.ap-south-1.airflow.amazonaws.com
@@ -11481,12 +11510,15 @@ emrstudio-prod.us-west-2.amazonaws.com
*.ca-central-1.airflow.amazonaws.com
*.eu-central-1.airflow.amazonaws.com
*.eu-north-1.airflow.amazonaws.com
+*.eu-south-1.airflow.amazonaws.com
*.eu-west-1.airflow.amazonaws.com
*.eu-west-2.airflow.amazonaws.com
*.eu-west-3.airflow.amazonaws.com
+*.me-south-1.airflow.amazonaws.com
*.sa-east-1.airflow.amazonaws.com
*.us-east-1.airflow.amazonaws.com
*.us-east-2.airflow.amazonaws.com
+*.us-west-1.airflow.amazonaws.com
*.us-west-2.airflow.amazonaws.com
// Amazon S3
@@ -11780,9 +11812,25 @@ s3-fips.us-west-2.amazonaws.com
s3-object-lambda.us-west-2.amazonaws.com
s3-website.us-west-2.amazonaws.com
+// Amazon SageMaker Ground Truth
+// Submitted by AWS Security <psl-maintainers@amazon.com>
+// Reference: 98dbfde4-7802-48c3-8751-b60f204e0d9c
+labeling.ap-northeast-1.sagemaker.aws
+labeling.ap-northeast-2.sagemaker.aws
+labeling.ap-south-1.sagemaker.aws
+labeling.ap-southeast-1.sagemaker.aws
+labeling.ap-southeast-2.sagemaker.aws
+labeling.ca-central-1.sagemaker.aws
+labeling.eu-central-1.sagemaker.aws
+labeling.eu-west-1.sagemaker.aws
+labeling.eu-west-2.sagemaker.aws
+labeling.us-east-1.sagemaker.aws
+labeling.us-east-2.sagemaker.aws
+labeling.us-west-2.sagemaker.aws
+
// Amazon SageMaker Notebook Instances
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: ce8ae0b1-0070-496d-be88-37c31837af9d
+// Reference: b5ea56df-669e-43cc-9537-14aa172f5dfc
notebook.af-south-1.sagemaker.aws
notebook.ap-east-1.sagemaker.aws
notebook.ap-northeast-1.sagemaker.aws
@@ -11819,6 +11867,7 @@ notebook-fips.us-gov-east-1.sagemaker.aws
notebook.us-gov-west-1.sagemaker.aws
notebook-fips.us-gov-west-1.sagemaker.aws
notebook.us-west-1.sagemaker.aws
+notebook-fips.us-west-1.sagemaker.aws
notebook.us-west-2.sagemaker.aws
notebook-fips.us-west-2.sagemaker.aws
notebook.cn-north-1.sagemaker.com.cn
@@ -11826,7 +11875,7 @@ notebook.cn-northwest-1.sagemaker.com.cn
// Amazon SageMaker Studio
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: 057ee397-6bf8-4f20-b807-d7bc145ac980
+// Reference: 69c723d9-6e1a-4bff-a203-48eecd203183
studio.af-south-1.sagemaker.aws
studio.ap-east-1.sagemaker.aws
studio.ap-northeast-1.sagemaker.aws
@@ -11840,6 +11889,7 @@ studio.ca-central-1.sagemaker.aws
studio.eu-central-1.sagemaker.aws
studio.eu-north-1.sagemaker.aws
studio.eu-south-1.sagemaker.aws
+studio.eu-south-2.sagemaker.aws
studio.eu-west-1.sagemaker.aws
studio.eu-west-2.sagemaker.aws
studio.eu-west-3.sagemaker.aws
@@ -11951,6 +12001,11 @@ webview-assets.aws-cloud9.us-west-2.amazonaws.com
vfs.cloud9.us-west-2.amazonaws.com
webview-assets.cloud9.us-west-2.amazonaws.com
+// AWS Directory Service
+// Submitted by AWS Security <psl-maintainers@amazon.com>
+// Reference: a13203e8-42dc-4045-a0d2-2ee67bed1068
+awsapps.com
+
// AWS Elastic Beanstalk
// Submitted by AWS Security <psl-maintainers@amazon.com>
// Reference: bb5a965c-dec3-4967-aa22-e306ad064797
@@ -12144,6 +12199,10 @@ pages.gay
// Submitted by Adrian <adrian@betainabox.com>
betainabox.com
+// University of Bielsko-Biala regional domain: http://dns.bielsko.pl/
+// Submitted by Marcin <dns@ath.bielsko.pl>
+bielsko.pl
+
// BinaryLane : http://www.binarylane.com
// Submitted by Nathan O'Sullivan <nathan@mammoth.com.au>
bnr.la
@@ -12190,7 +12249,8 @@ square7.net
*.s.brave.io
// Brendly : https://brendly.rs
-// Submitted by Dusan Radovanovic <dusan.radovanovic@brendly.rs>
+// Submitted by Dusan Radovanovic <administracija@brendly.rs>
+shop.brendly.hr
shop.brendly.rs
// BrowserSafetyMark
@@ -12307,7 +12367,10 @@ discourse.team
// Clever Cloud : https://www.clever-cloud.com/
// Submitted by Quentin Adam <noc@clever-cloud.com>
+cleverapps.cc
+*.services.clever-cloud.com
cleverapps.io
+cleverapps.tech
// Clerk : https://www.clerk.dev
// Submitted by Colin Sidoti <systems@clerk.dev>
@@ -13093,6 +13156,11 @@ us-2.evennode.com
us-3.evennode.com
us-4.evennode.com
+// Expo : https://expo.dev/
+// Submitted by James Ide <psl@expo.dev>
+expo.app
+staging.expo.app
+
// eDirect Corp. : https://hosting.url.com.tw/
// Submitted by C.S. chang <cschang@corp.url.com.tw>
twmail.cc
@@ -13391,10 +13459,6 @@ localcert.net
localhostcert.net
corpnet.work
-// Ghost Foundation : https://ghost.org
-// Submitted by Matt Hanley <security@ghost.org>
-ghost.io
-
// GignoSystemJapan: http://gsj.bz
// Submitted by GignoSystemJapan <kakutou-ec@gsj.bz>
gsj.bz
@@ -13559,7 +13623,8 @@ ro.im
goip.de
// Google, Inc.
-// Submitted by Eduardo Vela <evn@google.com>
+// Submitted by Shannon McCabe <public-suffix-editors@google.com>
+*.hosted.app
*.run.app
web.app
*.0emm.com
@@ -14063,10 +14128,6 @@ co.network
co.place
co.technology
-// Lightmaker Property Manager, Inc. : https://app.lmpm.com/
-// Submitted by Greg Holland <greg.holland@lmpm.com>
-app.lmpm.com
-
// linkyard ldt: https://www.linkyard.ch/
// Submitted by Mario Siegenthaler <mario.siegenthaler@linkyard.ch>
linkyard.cloud
@@ -14312,6 +14373,10 @@ netlify.app
// Submitted by Trung Tran <Trung.Tran@neustar.biz>
4u.com
+// NGO.US Registry : https://nic.ngo.us
+// Submitted by Alstra Solutions Ltd. Networking Team <admin@alstra.org>
+ngo.us
+
// ngrok : https://ngrok.com/
// Submitted by Alan Shreve <alan@ngrok.com>
ngrok.app
@@ -14362,6 +14427,10 @@ noop.app
// Submitted by Laurent Pellegrino <security@noticeable.io>
noticeable.news
+// Notion Labs, Inc : https://www.notion.so/
+// Submitted by Jess Yao <trust-core-team@makenotion.com>
+notion.site
+
// Now-DNS : https://now-dns.com
// Submitted by Steve Russell <steve@now-dns.com>
dnsking.ch
@@ -14495,8 +14564,13 @@ pcloud.host
// Submitted by Matthew Brown <mattbrown@nyc.mn>
nyc.mn
+// O3O.Foundation : https://o3o.foundation/
+// Submitted by the prvcy.page Registry Team <psl@registry.prvcy.page>
+prvcy.page
+
// Observable, Inc. : https://observablehq.com
// Submitted by Mike Bostock <dns@observablehq.com>
+observablehq.cloud
static.observableusercontent.com
// Octopodal Solutions, LLC. : https://ulterius.io/
@@ -14624,6 +14698,7 @@ pagexl.com
// pcarrier.ca Software Inc: https://pcarrier.ca/
// Submitted by Pierre Carrier <pc@rrier.ca>
*.xmit.co
+xmit.dev
srv.us
gh.srv.us
gl.srv.us
@@ -14714,10 +14789,6 @@ xen.prgmr.com
// Submitted by registry <lendl@nic.at>
priv.at
-// privacytools.io : https://www.privacytools.io/
-// Submitted by Jonah Aragon <jonah@privacytools.io>
-prvcy.page
-
// Protocol Labs : https://protocol.ai/
// Submitted by Michael Burns <noc@protocol.ai>
*.dweb.link
@@ -15062,6 +15133,10 @@ biz.ua
co.ua
pp.ua
+// Sheezy.Art : https://sheezy.art
+// Submitted by Nyoom <admin@sheezy.art>
+sheezy.games
+
// Shift Crypto AG : https://shiftcrypto.ch
// Submitted by alex <alex@shiftcrypto.ch>
shiftcrypto.dev
@@ -15484,6 +15559,11 @@ dnsupdate.info
// Submitted by Ed Moore <Ed.Moore@lib.de.us>
lib.de.us
+// Val Town, Inc : https://val.town/
+// Submitted by Tom MacWright <security@val.town>
+express.val.run
+web.val.run
+
// VeryPositive SIA : http://very.lv
// Submitted by Danko Aleksejevs <danko@very.lv>
2038.io
@@ -15548,6 +15628,10 @@ wedeploy.sh
// Submitted by Jung Jin <jungseok.jin@wdc.com>
remotewd.com
+// Whatbox Inc. : https://whatbox.ca/
+// Submitted by Anthony Ryan <servers@whatbox.ca>
+box.ca
+
// WIARD Enterprises : https://wiardweb.com
// Submitted by Kidd Hustle <kiddhustle@wiardweb.com>
pages.wiardweb.com
@@ -15650,6 +15734,10 @@ za.org
// Submitted by Julian Alker <security@zap-hosting.com>
zap.cloud
+// Zeabur : https://zeabur.com/
+// Submitted by Zeabur Team <contact@zeabur.com>
+zeabur.app
+
// Zine EOOD : https://zine.bg/
// Submitted by Martin Angelov <martin@zine.bg>
bss.design