summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/dns
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/dns')
-rw-r--r--ansible_collections/community/dns/.github/workflows/ansible-test.yml8
-rw-r--r--ansible_collections/community/dns/.github/workflows/docs-pr.yml1
-rw-r--r--ansible_collections/community/dns/.github/workflows/docs-push.yml1
-rw-r--r--ansible_collections/community/dns/CHANGELOG.md362
-rw-r--r--ansible_collections/community/dns/CHANGELOG.rst23
-rw-r--r--ansible_collections/community/dns/FILES.json103
-rw-r--r--ansible_collections/community/dns/MANIFEST.json4
-rw-r--r--ansible_collections/community/dns/README.md4
-rw-r--r--ansible_collections/community/dns/changelogs/changelog.yaml20
-rw-r--r--ansible_collections/community/dns/docs/docsite/config.yml7
-rw-r--r--ansible_collections/community/dns/docs/docsite/rst/filter_guide.rst5
-rw-r--r--ansible_collections/community/dns/plugins/filter/quote_txt.yml46
-rw-r--r--ansible_collections/community/dns/plugins/filter/txt.py47
-rw-r--r--ansible_collections/community/dns/plugins/filter/unquote_txt.yml42
-rw-r--r--ansible_collections/community/dns/plugins/plugin_utils/inventory/records.py3
-rw-r--r--ansible_collections/community/dns/plugins/plugin_utils/unsafe.py41
-rw-r--r--ansible_collections/community/dns/plugins/public_suffix_list.dat211
-rw-r--r--ansible_collections/community/dns/tests/integration/targets/filter_txt/aliases6
-rw-r--r--ansible_collections/community/dns/tests/integration/targets/filter_txt/tasks/main.yml49
-rw-r--r--ansible_collections/community/dns/tests/sanity/ignore-2.18.txt1
-rw-r--r--ansible_collections/community/dns/tests/sanity/ignore-2.18.txt.license3
-rw-r--r--ansible_collections/community/dns/tests/unit/plugins/inventory/test_hetzner_dns_records.py72
-rw-r--r--ansible_collections/community/dns/tests/unit/plugins/inventory/test_hosttech_dns_records.py76
-rw-r--r--ansible_collections/community/dns/tests/unit/requirements-stable-2.10.txt2
24 files changed, 880 insertions, 257 deletions
diff --git a/ansible_collections/community/dns/.github/workflows/ansible-test.yml b/ansible_collections/community/dns/.github/workflows/ansible-test.yml
index 7ed813e13..186079a41 100644
--- a/ansible_collections/community/dns/.github/workflows/ansible-test.yml
+++ b/ansible_collections/community/dns/.github/workflows/ansible-test.yml
@@ -37,6 +37,7 @@ jobs:
- stable-2.14
- stable-2.15
- stable-2.16
+ - stable-2.17
- devel
# Ansible-test on various stable branches does not yet work well with cgroups v2.
# Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
@@ -78,6 +79,7 @@ jobs:
- stable-2.14
- stable-2.15
- stable-2.16
+ - stable-2.17
- devel
steps:
@@ -111,7 +113,6 @@ jobs:
ansible:
- devel
python:
- - 3.7
- 3.8
- 3.9
- "3.10"
@@ -150,6 +151,11 @@ jobs:
python: "3.6"
- ansible: stable-2.16
python: "3.11"
+ # 2.17
+ - ansible: stable-2.17
+ python: "3.7"
+ - ansible: stable-2.17
+ python: "3.12"
steps:
- name: >-
diff --git a/ansible_collections/community/dns/.github/workflows/docs-pr.yml b/ansible_collections/community/dns/.github/workflows/docs-pr.yml
index cc71d2492..63c021d46 100644
--- a/ansible_collections/community/dns/.github/workflows/docs-pr.yml
+++ b/ansible_collections/community/dns/.github/workflows/docs-pr.yml
@@ -32,6 +32,7 @@ jobs:
init-extra-html-theme-options: |
documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/
render-file-line: '> * `$<status>` [$<path_tail>](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$<path_tail>)'
+ extra-collections: community.library_inventory_filtering_v1
publish-docs-gh-pages:
# for now we won't run this on forks
diff --git a/ansible_collections/community/dns/.github/workflows/docs-push.yml b/ansible_collections/community/dns/.github/workflows/docs-push.yml
index 85274e17d..f03ef77fb 100644
--- a/ansible_collections/community/dns/.github/workflows/docs-push.yml
+++ b/ansible_collections/community/dns/.github/workflows/docs-push.yml
@@ -37,6 +37,7 @@ jobs:
init-html-short-title: Community.Dns Collection Docs
init-extra-html-theme-options: |
documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/
+ extra-collections: community.library_inventory_filtering_v1
publish-docs-gh-pages:
# for now we won't run this on forks
diff --git a/ansible_collections/community/dns/CHANGELOG.md b/ansible_collections/community/dns/CHANGELOG.md
index fbce77c60..9881ee7ed 100644
--- a/ansible_collections/community/dns/CHANGELOG.md
+++ b/ansible_collections/community/dns/CHANGELOG.md
@@ -2,188 +2,216 @@
**Topics**
-- <a href="#v2-8-3">v2\.8\.3</a>
+- <a href="#v2-9-0">v2\.9\.0</a>
- <a href="#release-summary">Release Summary</a>
- <a href="#bugfixes">Bugfixes</a>
-- <a href="#v2-8-2">v2\.8\.2</a>
+ - <a href="#new-plugins">New Plugins</a>
+ - <a href="#filter">Filter</a>
+- <a href="#v2-8-3">v2\.8\.3</a>
- <a href="#release-summary-1">Release Summary</a>
- - <a href="#security-fixes">Security Fixes</a>
- <a href="#bugfixes-1">Bugfixes</a>
-- <a href="#v2-8-1">v2\.8\.1</a>
+- <a href="#v2-8-2">v2\.8\.2</a>
- <a href="#release-summary-2">Release Summary</a>
+ - <a href="#security-fixes">Security Fixes</a>
- <a href="#bugfixes-2">Bugfixes</a>
-- <a href="#v2-8-0">v2\.8\.0</a>
+- <a href="#v2-8-1">v2\.8\.1</a>
- <a href="#release-summary-3">Release Summary</a>
- - <a href="#minor-changes">Minor Changes</a>
- - <a href="#deprecated-features">Deprecated Features</a>
- <a href="#bugfixes-3">Bugfixes</a>
-- <a href="#v2-7-0">v2\.7\.0</a>
+- <a href="#v2-8-0">v2\.8\.0</a>
- <a href="#release-summary-4">Release Summary</a>
- - <a href="#minor-changes-1">Minor Changes</a>
+ - <a href="#minor-changes">Minor Changes</a>
+ - <a href="#deprecated-features">Deprecated Features</a>
- <a href="#bugfixes-4">Bugfixes</a>
-- <a href="#v2-6-4">v2\.6\.4</a>
+- <a href="#v2-7-0">v2\.7\.0</a>
- <a href="#release-summary-5">Release Summary</a>
+ - <a href="#minor-changes-1">Minor Changes</a>
- <a href="#bugfixes-5">Bugfixes</a>
-- <a href="#v2-6-3">v2\.6\.3</a>
+- <a href="#v2-6-4">v2\.6\.4</a>
- <a href="#release-summary-6">Release Summary</a>
- <a href="#bugfixes-6">Bugfixes</a>
-- <a href="#v2-6-2">v2\.6\.2</a>
+- <a href="#v2-6-3">v2\.6\.3</a>
- <a href="#release-summary-7">Release Summary</a>
- <a href="#bugfixes-7">Bugfixes</a>
-- <a href="#v2-6-1">v2\.6\.1</a>
+- <a href="#v2-6-2">v2\.6\.2</a>
- <a href="#release-summary-8">Release Summary</a>
- <a href="#bugfixes-8">Bugfixes</a>
-- <a href="#v2-6-0">v2\.6\.0</a>
+- <a href="#v2-6-1">v2\.6\.1</a>
- <a href="#release-summary-9">Release Summary</a>
- - <a href="#minor-changes-2">Minor Changes</a>
- <a href="#bugfixes-9">Bugfixes</a>
- - <a href="#new-plugins">New Plugins</a>
+- <a href="#v2-6-0">v2\.6\.0</a>
+ - <a href="#release-summary-10">Release Summary</a>
+ - <a href="#minor-changes-2">Minor Changes</a>
+ - <a href="#bugfixes-10">Bugfixes</a>
+ - <a href="#new-plugins-1">New Plugins</a>
- <a href="#lookup">Lookup</a>
- <a href="#new-modules">New Modules</a>
- <a href="#v2-5-7">v2\.5\.7</a>
- - <a href="#release-summary-10">Release Summary</a>
- - <a href="#bugfixes-10">Bugfixes</a>
-- <a href="#v2-5-6">v2\.5\.6</a>
- <a href="#release-summary-11">Release Summary</a>
+ - <a href="#bugfixes-11">Bugfixes</a>
+- <a href="#v2-5-6">v2\.5\.6</a>
+ - <a href="#release-summary-12">Release Summary</a>
- <a href="#known-issues">Known Issues</a>
- <a href="#v2-5-5">v2\.5\.5</a>
- - <a href="#release-summary-12">Release Summary</a>
- - <a href="#bugfixes-11">Bugfixes</a>
-- <a href="#v2-5-4">v2\.5\.4</a>
- <a href="#release-summary-13">Release Summary</a>
- <a href="#bugfixes-12">Bugfixes</a>
-- <a href="#v2-5-3">v2\.5\.3</a>
+- <a href="#v2-5-4">v2\.5\.4</a>
- <a href="#release-summary-14">Release Summary</a>
- <a href="#bugfixes-13">Bugfixes</a>
-- <a href="#v2-5-2">v2\.5\.2</a>
+- <a href="#v2-5-3">v2\.5\.3</a>
- <a href="#release-summary-15">Release Summary</a>
- <a href="#bugfixes-14">Bugfixes</a>
-- <a href="#v2-5-1">v2\.5\.1</a>
+- <a href="#v2-5-2">v2\.5\.2</a>
- <a href="#release-summary-16">Release Summary</a>
- <a href="#bugfixes-15">Bugfixes</a>
-- <a href="#v2-5-0">v2\.5\.0</a>
+- <a href="#v2-5-1">v2\.5\.1</a>
- <a href="#release-summary-17">Release Summary</a>
- - <a href="#minor-changes-3">Minor Changes</a>
- - <a href="#deprecated-features-1">Deprecated Features</a>
- <a href="#bugfixes-16">Bugfixes</a>
-- <a href="#v2-4-2">v2\.4\.2</a>
+- <a href="#v2-5-0">v2\.5\.0</a>
- <a href="#release-summary-18">Release Summary</a>
+ - <a href="#minor-changes-3">Minor Changes</a>
+ - <a href="#deprecated-features-1">Deprecated Features</a>
- <a href="#bugfixes-17">Bugfixes</a>
-- <a href="#v2-4-1">v2\.4\.1</a>
+- <a href="#v2-4-2">v2\.4\.2</a>
- <a href="#release-summary-19">Release Summary</a>
- <a href="#bugfixes-18">Bugfixes</a>
-- <a href="#v2-4-0">v2\.4\.0</a>
+- <a href="#v2-4-1">v2\.4\.1</a>
- <a href="#release-summary-20">Release Summary</a>
- - <a href="#minor-changes-4">Minor Changes</a>
- <a href="#bugfixes-19">Bugfixes</a>
-- <a href="#v2-3-4">v2\.3\.4</a>
+- <a href="#v2-4-0">v2\.4\.0</a>
- <a href="#release-summary-21">Release Summary</a>
+ - <a href="#minor-changes-4">Minor Changes</a>
- <a href="#bugfixes-20">Bugfixes</a>
-- <a href="#v2-3-3">v2\.3\.3</a>
+- <a href="#v2-3-4">v2\.3\.4</a>
- <a href="#release-summary-22">Release Summary</a>
- <a href="#bugfixes-21">Bugfixes</a>
-- <a href="#v2-3-2">v2\.3\.2</a>
+- <a href="#v2-3-3">v2\.3\.3</a>
- <a href="#release-summary-23">Release Summary</a>
- <a href="#bugfixes-22">Bugfixes</a>
-- <a href="#v2-3-1">v2\.3\.1</a>
+- <a href="#v2-3-2">v2\.3\.2</a>
- <a href="#release-summary-24">Release Summary</a>
- - <a href="#minor-changes-5">Minor Changes</a>
- <a href="#bugfixes-23">Bugfixes</a>
-- <a href="#v2-3-0">v2\.3\.0</a>
+- <a href="#v2-3-1">v2\.3\.1</a>
- <a href="#release-summary-25">Release Summary</a>
- - <a href="#minor-changes-6">Minor Changes</a>
+ - <a href="#minor-changes-5">Minor Changes</a>
- <a href="#bugfixes-24">Bugfixes</a>
-- <a href="#v2-2-1">v2\.2\.1</a>
+- <a href="#v2-3-0">v2\.3\.0</a>
- <a href="#release-summary-26">Release Summary</a>
+ - <a href="#minor-changes-6">Minor Changes</a>
- <a href="#bugfixes-25">Bugfixes</a>
-- <a href="#v2-2-0">v2\.2\.0</a>
+- <a href="#v2-2-1">v2\.2\.1</a>
- <a href="#release-summary-27">Release Summary</a>
- - <a href="#minor-changes-7">Minor Changes</a>
- <a href="#bugfixes-26">Bugfixes</a>
-- <a href="#v2-1-1">v2\.1\.1</a>
+- <a href="#v2-2-0">v2\.2\.0</a>
- <a href="#release-summary-28">Release Summary</a>
+ - <a href="#minor-changes-7">Minor Changes</a>
- <a href="#bugfixes-27">Bugfixes</a>
-- <a href="#v2-1-0">v2\.1\.0</a>
+- <a href="#v2-1-1">v2\.1\.1</a>
- <a href="#release-summary-29">Release Summary</a>
- - <a href="#minor-changes-8">Minor Changes</a>
- <a href="#bugfixes-28">Bugfixes</a>
-- <a href="#v2-0-9">v2\.0\.9</a>
+- <a href="#v2-1-0">v2\.1\.0</a>
- <a href="#release-summary-30">Release Summary</a>
+ - <a href="#minor-changes-8">Minor Changes</a>
- <a href="#bugfixes-29">Bugfixes</a>
-- <a href="#v2-0-8">v2\.0\.8</a>
+- <a href="#v2-0-9">v2\.0\.9</a>
- <a href="#release-summary-31">Release Summary</a>
- <a href="#bugfixes-30">Bugfixes</a>
-- <a href="#v2-0-7">v2\.0\.7</a>
+- <a href="#v2-0-8">v2\.0\.8</a>
- <a href="#release-summary-32">Release Summary</a>
- <a href="#bugfixes-31">Bugfixes</a>
-- <a href="#v2-0-6">v2\.0\.6</a>
+- <a href="#v2-0-7">v2\.0\.7</a>
- <a href="#release-summary-33">Release Summary</a>
- <a href="#bugfixes-32">Bugfixes</a>
-- <a href="#v2-0-5">v2\.0\.5</a>
+- <a href="#v2-0-6">v2\.0\.6</a>
- <a href="#release-summary-34">Release Summary</a>
- <a href="#bugfixes-33">Bugfixes</a>
-- <a href="#v2-0-4">v2\.0\.4</a>
+- <a href="#v2-0-5">v2\.0\.5</a>
- <a href="#release-summary-35">Release Summary</a>
- <a href="#bugfixes-34">Bugfixes</a>
-- <a href="#v2-0-3">v2\.0\.3</a>
+- <a href="#v2-0-4">v2\.0\.4</a>
- <a href="#release-summary-36">Release Summary</a>
+ - <a href="#bugfixes-35">Bugfixes</a>
+- <a href="#v2-0-3">v2\.0\.3</a>
+ - <a href="#release-summary-37">Release Summary</a>
- <a href="#minor-changes-9">Minor Changes</a>
- <a href="#v2-0-2">v2\.0\.2</a>
- - <a href="#release-summary-37">Release Summary</a>
- - <a href="#bugfixes-35">Bugfixes</a>
-- <a href="#v2-0-1">v2\.0\.1</a>
- <a href="#release-summary-38">Release Summary</a>
- <a href="#bugfixes-36">Bugfixes</a>
-- <a href="#v2-0-0">v2\.0\.0</a>
+- <a href="#v2-0-1">v2\.0\.1</a>
- <a href="#release-summary-39">Release Summary</a>
+ - <a href="#bugfixes-37">Bugfixes</a>
+- <a href="#v2-0-0">v2\.0\.0</a>
+ - <a href="#release-summary-40">Release Summary</a>
- <a href="#minor-changes-10">Minor Changes</a>
- <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a>
- <a href="#deprecated-features-2">Deprecated Features</a>
- - <a href="#bugfixes-37">Bugfixes</a>
- - <a href="#new-plugins-1">New Plugins</a>
+ - <a href="#bugfixes-38">Bugfixes</a>
+ - <a href="#new-plugins-2">New Plugins</a>
- <a href="#inventory">Inventory</a>
- <a href="#new-modules-1">New Modules</a>
- <a href="#v1-2-0">v1\.2\.0</a>
- - <a href="#release-summary-40">Release Summary</a>
- - <a href="#minor-changes-11">Minor Changes</a>
- - <a href="#bugfixes-38">Bugfixes</a>
-- <a href="#v1-1-0">v1\.1\.0</a>
- <a href="#release-summary-41">Release Summary</a>
- - <a href="#minor-changes-12">Minor Changes</a>
+ - <a href="#minor-changes-11">Minor Changes</a>
- <a href="#bugfixes-39">Bugfixes</a>
-- <a href="#v1-0-1">v1\.0\.1</a>
+- <a href="#v1-1-0">v1\.1\.0</a>
- <a href="#release-summary-42">Release Summary</a>
+ - <a href="#minor-changes-12">Minor Changes</a>
- <a href="#bugfixes-40">Bugfixes</a>
-- <a href="#v1-0-0">v1\.0\.0</a>
+- <a href="#v1-0-1">v1\.0\.1</a>
- <a href="#release-summary-43">Release Summary</a>
- <a href="#bugfixes-41">Bugfixes</a>
-- <a href="#v0-3-0">v0\.3\.0</a>
+- <a href="#v1-0-0">v1\.0\.0</a>
- <a href="#release-summary-44">Release Summary</a>
- - <a href="#minor-changes-13">Minor Changes</a>
- <a href="#bugfixes-42">Bugfixes</a>
+- <a href="#v0-3-0">v0\.3\.0</a>
+ - <a href="#release-summary-45">Release Summary</a>
+ - <a href="#minor-changes-13">Minor Changes</a>
+ - <a href="#bugfixes-43">Bugfixes</a>
- <a href="#new-modules-2">New Modules</a>
- <a href="#v0-2-0">v0\.2\.0</a>
- - <a href="#release-summary-45">Release Summary</a>
+ - <a href="#release-summary-46">Release Summary</a>
- <a href="#major-changes">Major Changes</a>
- <a href="#minor-changes-14">Minor Changes</a>
- <a href="#breaking-changes--porting-guide-1">Breaking Changes / Porting Guide</a>
- - <a href="#bugfixes-43">Bugfixes</a>
+ - <a href="#bugfixes-44">Bugfixes</a>
- <a href="#new-modules-3">New Modules</a>
- <a href="#v0-1-0">v0\.1\.0</a>
- - <a href="#release-summary-46">Release Summary</a>
- - <a href="#new-plugins-2">New Plugins</a>
- - <a href="#filter">Filter</a>
+ - <a href="#release-summary-47">Release Summary</a>
+ - <a href="#new-plugins-3">New Plugins</a>
+ - <a href="#filter-1">Filter</a>
- <a href="#new-modules-4">New Modules</a>
+<a id="v2-9-0"></a>
+## v2\.9\.0
+
+<a id="release-summary"></a>
+### Release Summary
+
+Feature and bugfix release\.
+
+<a id="bugfixes"></a>
+### Bugfixes
+
+* Update Public Suffix List\.
+* inventory plugins \- add unsafe wrapper to avoid marking strings that do not contain <code>\{</code> or <code>\}</code> as unsafe\, to work around a bug in AWX \([https\://github\.com/ansible\-collections/community\.dns/pull/197](https\://github\.com/ansible\-collections/community\.dns/pull/197)\)\.
+
+<a id="new-plugins"></a>
+### New Plugins
+
+<a id="filter"></a>
+#### Filter
+
+* community\.dns\.quote\_txt \- Quotes a string to use as a TXT record entry
+* community\.dns\.unquote\_txt \- Unquotes a TXT record entry to a string
+
<a id="v2-8-3"></a>
## v2\.8\.3
-<a id="release-summary"></a>
+<a id="release-summary-1"></a>
### Release Summary
Bugfix release\.
-<a id="bugfixes"></a>
+<a id="bugfixes-1"></a>
### Bugfixes
* DNS record modules\, inventory plugins \- fix the TXT entry encoder to avoid splitting up escape sequences for quotes and backslashes over multiple TXT strings \([https\://github\.com/ansible\-collections/community\.dns/issues/190](https\://github\.com/ansible\-collections/community\.dns/issues/190)\, [https\://github\.com/ansible\-collections/community\.dns/pull/191](https\://github\.com/ansible\-collections/community\.dns/pull/191)\)\.
@@ -192,7 +220,7 @@ Bugfix release\.
<a id="v2-8-2"></a>
## v2\.8\.2
-<a id="release-summary-1"></a>
+<a id="release-summary-2"></a>
### Release Summary
Bugfix release\.
@@ -202,7 +230,7 @@ Bugfix release\.
* hosttech\_dns\_records and hetzner\_dns\_records inventory plugins \- make sure all data received from the remote servers is marked as unsafe\, so remote code execution by obtaining texts that can be evaluated as templates is not possible \([https\://www\.die\-welt\.net/2024/03/remote\-code\-execution\-in\-ansible\-dynamic\-inventory\-plugins/](https\://www\.die\-welt\.net/2024/03/remote\-code\-execution\-in\-ansible\-dynamic\-inventory\-plugins/)\, [https\://github\.com/ansible\-collections/community\.dns/pull/189](https\://github\.com/ansible\-collections/community\.dns/pull/189)\)\.
-<a id="bugfixes-1"></a>
+<a id="bugfixes-2"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -210,12 +238,12 @@ Bugfix release\.
<a id="v2-8-1"></a>
## v2\.8\.1
-<a id="release-summary-2"></a>
+<a id="release-summary-3"></a>
### Release Summary
Maintenance release with updated PSL\.
-<a id="bugfixes-2"></a>
+<a id="bugfixes-3"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -223,7 +251,7 @@ Maintenance release with updated PSL\.
<a id="v2-8-0"></a>
## v2\.8\.0
-<a id="release-summary-3"></a>
+<a id="release-summary-4"></a>
### Release Summary
Feature and maintenance release with updated PSL\.
@@ -238,7 +266,7 @@ Feature and maintenance release with updated PSL\.
* hetzner\_dns\_records and hosttech\_dns\_records inventory plugins \- the <code>filters</code> option has been renamed to <code>simple\_filters</code>\. The old name will stop working in community\.hrobot 2\.0\.0 \([https\://github\.com/ansible\-collections/community\.dns/pull/181](https\://github\.com/ansible\-collections/community\.dns/pull/181)\)\.
-<a id="bugfixes-3"></a>
+<a id="bugfixes-4"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -246,7 +274,7 @@ Feature and maintenance release with updated PSL\.
<a id="v2-7-0"></a>
## v2\.7\.0
-<a id="release-summary-4"></a>
+<a id="release-summary-5"></a>
### Release Summary
Bugfix and feature release with updated PSL\.
@@ -257,7 +285,7 @@ Bugfix and feature release with updated PSL\.
* nameserver\_info and nameserver\_record\_info \- add <code>server</code> parameter to specify custom DNS servers \([https\://github\.com/ansible\-collections/community\.dns/pull/168](https\://github\.com/ansible\-collections/community\.dns/pull/168)\, [https\://github\.com/ansible\-collections/community\.dns/pull/178](https\://github\.com/ansible\-collections/community\.dns/pull/178)\)\.
* wait\_for\_txt \- add <code>server</code> parameter to specify custom DNS servers \([https\://github\.com/ansible\-collections/community\.dns/pull/178](https\://github\.com/ansible\-collections/community\.dns/pull/178)\)\.
-<a id="bugfixes-4"></a>
+<a id="bugfixes-5"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -266,12 +294,12 @@ Bugfix and feature release with updated PSL\.
<a id="v2-6-4"></a>
## v2\.6\.4
-<a id="release-summary-5"></a>
+<a id="release-summary-6"></a>
### Release Summary
Bugfix and maintenance version\.
-<a id="bugfixes-5"></a>
+<a id="bugfixes-6"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -280,12 +308,12 @@ Bugfix and maintenance version\.
<a id="v2-6-3"></a>
## v2\.6\.3
-<a id="release-summary-6"></a>
+<a id="release-summary-7"></a>
### Release Summary
Maintenance release with updated PSL\.
-<a id="bugfixes-6"></a>
+<a id="bugfixes-7"></a>
### Bugfixes
* HTTP module utils \- make compatible with ansible\-core 2\.17 \([https\://github\.com/ansible\-collections/community\.dns/pull/165](https\://github\.com/ansible\-collections/community\.dns/pull/165)\)\.
@@ -294,12 +322,12 @@ Maintenance release with updated PSL\.
<a id="v2-6-2"></a>
## v2\.6\.2
-<a id="release-summary-7"></a>
+<a id="release-summary-8"></a>
### Release Summary
Maintenance release with updated PSL\.
-<a id="bugfixes-7"></a>
+<a id="bugfixes-8"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -307,12 +335,12 @@ Maintenance release with updated PSL\.
<a id="v2-6-1"></a>
## v2\.6\.1
-<a id="release-summary-8"></a>
+<a id="release-summary-9"></a>
### Release Summary
Maintenance release with updated PSL\.
-<a id="bugfixes-8"></a>
+<a id="bugfixes-9"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -320,7 +348,7 @@ Maintenance release with updated PSL\.
<a id="v2-6-0"></a>
## v2\.6\.0
-<a id="release-summary-9"></a>
+<a id="release-summary-10"></a>
### Release Summary
Feature release with an updated Public Suffix List\.
@@ -331,13 +359,13 @@ Feature release with an updated Public Suffix List\.
* wait\_for\_txt \- add <code>servfail\_retries</code> parameter that allows retrying after SERVFAIL errors \([https\://github\.com/ansible\-collections/community\.dns/pull/159](https\://github\.com/ansible\-collections/community\.dns/pull/159)\)\.
* wait\_for\_txt\, resolver module utils \- use [EDNS](https\://en\.wikipedia\.org/wiki/Extension\_Mechanisms\_for\_DNS) \([https\://github\.com/ansible\-collections/community\.dns/pull/158](https\://github\.com/ansible\-collections/community\.dns/pull/158)\)\.
-<a id="bugfixes-9"></a>
+<a id="bugfixes-10"></a>
### Bugfixes
* Update Public Suffix List\.
* wait\_for\_txt\, resolver module utils \- improve error handling \([https\://github\.com/ansible\-collections/community\.dns/pull/158](https\://github\.com/ansible\-collections/community\.dns/pull/158)\)\.
-<a id="new-plugins"></a>
+<a id="new-plugins-1"></a>
### New Plugins
<a id="lookup"></a>
@@ -355,12 +383,12 @@ Feature release with an updated Public Suffix List\.
<a id="v2-5-7"></a>
## v2\.5\.7
-<a id="release-summary-10"></a>
+<a id="release-summary-11"></a>
### Release Summary
Regular maintenance release with updated Public Suffix List\.
-<a id="bugfixes-10"></a>
+<a id="bugfixes-11"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -368,7 +396,7 @@ Regular maintenance release with updated Public Suffix List\.
<a id="v2-5-6"></a>
## v2\.5\.6
-<a id="release-summary-11"></a>
+<a id="release-summary-12"></a>
### Release Summary
Maintenance release\.
@@ -389,12 +417,12 @@ for the rendered HTML version of the documentation of the latest release\.
<a id="v2-5-5"></a>
## v2\.5\.5
-<a id="release-summary-12"></a>
+<a id="release-summary-13"></a>
### Release Summary
Maintenance release with updated PSL\.
-<a id="bugfixes-11"></a>
+<a id="bugfixes-12"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -402,12 +430,12 @@ Maintenance release with updated PSL\.
<a id="v2-5-4"></a>
## v2\.5\.4
-<a id="release-summary-13"></a>
+<a id="release-summary-14"></a>
### Release Summary
Maintenance release with updated PSL\.
-<a id="bugfixes-12"></a>
+<a id="bugfixes-13"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -415,12 +443,12 @@ Maintenance release with updated PSL\.
<a id="v2-5-3"></a>
## v2\.5\.3
-<a id="release-summary-14"></a>
+<a id="release-summary-15"></a>
### Release Summary
Maintenance release with updated PSL\.
-<a id="bugfixes-13"></a>
+<a id="bugfixes-14"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -428,12 +456,12 @@ Maintenance release with updated PSL\.
<a id="v2-5-2"></a>
## v2\.5\.2
-<a id="release-summary-15"></a>
+<a id="release-summary-16"></a>
### Release Summary
Maintenance release with improved documentation and updated PSL\.
-<a id="bugfixes-14"></a>
+<a id="bugfixes-15"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -441,12 +469,12 @@ Maintenance release with improved documentation and updated PSL\.
<a id="v2-5-1"></a>
## v2\.5\.1
-<a id="release-summary-16"></a>
+<a id="release-summary-17"></a>
### Release Summary
Maintenance release \(updated PSL\)\.
-<a id="bugfixes-15"></a>
+<a id="bugfixes-16"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -454,7 +482,7 @@ Maintenance release \(updated PSL\)\.
<a id="v2-5-0"></a>
## v2\.5\.0
-<a id="release-summary-17"></a>
+<a id="release-summary-18"></a>
### Release Summary
Feature and bugfix release with updated PSL\.
@@ -470,7 +498,7 @@ Feature and bugfix release with updated PSL\.
* The default of the newly added option <code>txt\_character\_encoding</code> will change from <code>octal</code> to <code>decimal</code> in community\.dns 3\.0\.0\. The new default will be compatible with [RFC 1035](https\://www\.ietf\.org/rfc/rfc1035\.txt) \([https\://github\.com/ansible\-collections/community\.dns/pull/134](https\://github\.com/ansible\-collections/community\.dns/pull/134)\)\.
-<a id="bugfixes-16"></a>
+<a id="bugfixes-17"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -479,12 +507,12 @@ Feature and bugfix release with updated PSL\.
<a id="v2-4-2"></a>
## v2\.4\.2
-<a id="release-summary-18"></a>
+<a id="release-summary-19"></a>
### Release Summary
Maintenance release with updated Public Suffix List\.
-<a id="bugfixes-17"></a>
+<a id="bugfixes-18"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -492,12 +520,12 @@ Maintenance release with updated Public Suffix List\.
<a id="v2-4-1"></a>
## v2\.4\.1
-<a id="release-summary-19"></a>
+<a id="release-summary-20"></a>
### Release Summary
Regular maintenance release\.
-<a id="bugfixes-18"></a>
+<a id="bugfixes-19"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -506,7 +534,7 @@ Regular maintenance release\.
<a id="v2-4-0"></a>
## v2\.4\.0
-<a id="release-summary-20"></a>
+<a id="release-summary-21"></a>
### Release Summary
Feature and maintenance release\.
@@ -518,7 +546,7 @@ Feature and maintenance release\.
* Added a <code>community\.dns\.hosttech</code> module defaults group / action group\. Use with <code>group/community\.dns\.hosttech</code> to provide options for all Hosttech DNS modules \([https\://github\.com/ansible\-collections/community\.dns/pull/119](https\://github\.com/ansible\-collections/community\.dns/pull/119)\)\.
* wait\_for\_txt \- the module now supports check mode\. The only practical change in behavior is that in check mode\, the module is now executed instead of skipped\. Since the module does not change anything\, it should have been marked as supporting check mode since it was originally added \([https\://github\.com/ansible\-collections/community\.dns/pull/119](https\://github\.com/ansible\-collections/community\.dns/pull/119)\)\.
-<a id="bugfixes-19"></a>
+<a id="bugfixes-20"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -526,12 +554,12 @@ Feature and maintenance release\.
<a id="v2-3-4"></a>
## v2\.3\.4
-<a id="release-summary-21"></a>
+<a id="release-summary-22"></a>
### Release Summary
Maintenance release with updated Public Suffix List\.
-<a id="bugfixes-20"></a>
+<a id="bugfixes-21"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -539,12 +567,12 @@ Maintenance release with updated Public Suffix List\.
<a id="v2-3-3"></a>
## v2\.3\.3
-<a id="release-summary-22"></a>
+<a id="release-summary-23"></a>
### Release Summary
Maintenance release including an updated Public Suffix List\.
-<a id="bugfixes-21"></a>
+<a id="bugfixes-22"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -552,12 +580,12 @@ Maintenance release including an updated Public Suffix List\.
<a id="v2-3-2"></a>
## v2\.3\.2
-<a id="release-summary-23"></a>
+<a id="release-summary-24"></a>
### Release Summary
Maintenance release with updated Public Suffix List\.
-<a id="bugfixes-22"></a>
+<a id="bugfixes-23"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -565,7 +593,7 @@ Maintenance release with updated Public Suffix List\.
<a id="v2-3-1"></a>
## v2\.3\.1
-<a id="release-summary-24"></a>
+<a id="release-summary-25"></a>
### Release Summary
Maintenance release including an updated Public Suffix List\.
@@ -575,7 +603,7 @@ Maintenance release including an updated Public Suffix List\.
* The collection repository conforms to the [REUSE specification](https\://reuse\.software/spec/) except for the changelog fragments \([https\://github\.com/ansible\-collections/community\.dns/pull/112](https\://github\.com/ansible\-collections/community\.dns/pull/112)\)\.
-<a id="bugfixes-23"></a>
+<a id="bugfixes-24"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -583,7 +611,7 @@ Maintenance release including an updated Public Suffix List\.
<a id="v2-3-0"></a>
## v2\.3\.0
-<a id="release-summary-25"></a>
+<a id="release-summary-26"></a>
### Release Summary
Maintenance release including an updated Public Suffix List\.
@@ -593,7 +621,7 @@ Maintenance release including an updated Public Suffix List\.
* All software licenses are now in the <code>LICENSES/</code> directory of the collection root\. Moreover\, <code>SPDX\-License\-Identifier\:</code> is used to declare the applicable license for every file that is not automatically generated \([https\://github\.com/ansible\-collections/community\.dns/pull/109](https\://github\.com/ansible\-collections/community\.dns/pull/109)\)\.
-<a id="bugfixes-24"></a>
+<a id="bugfixes-25"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -601,12 +629,12 @@ Maintenance release including an updated Public Suffix List\.
<a id="v2-2-1"></a>
## v2\.2\.1
-<a id="release-summary-26"></a>
+<a id="release-summary-27"></a>
### Release Summary
Maintenance release with updated Public Suffix List\.
-<a id="bugfixes-25"></a>
+<a id="bugfixes-26"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -614,7 +642,7 @@ Maintenance release with updated Public Suffix List\.
<a id="v2-2-0"></a>
## v2\.2\.0
-<a id="release-summary-27"></a>
+<a id="release-summary-28"></a>
### Release Summary
Feature release\.
@@ -625,7 +653,7 @@ Feature release\.
* hetzner\_dns\_records and hosttech\_dns\_records inventory plugins \- allow to template provider\-specific credentials and the <code>zone\_name</code>\, <code>zone\_id</code> options \([https\://github\.com/ansible\-collections/community\.dns/pull/106](https\://github\.com/ansible\-collections/community\.dns/pull/106)\)\.
* wait\_for\_txt \- improve error messages so that in case of SERVFAILs or other DNS errors it is clear which record was queried from which DNS server \([https\://github\.com/ansible\-collections/community\.dns/pull/105](https\://github\.com/ansible\-collections/community\.dns/pull/105)\)\.
-<a id="bugfixes-26"></a>
+<a id="bugfixes-27"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -633,12 +661,12 @@ Feature release\.
<a id="v2-1-1"></a>
## v2\.1\.1
-<a id="release-summary-28"></a>
+<a id="release-summary-29"></a>
### Release Summary
Maintenance release with updated Public Suffix List\.
-<a id="bugfixes-27"></a>
+<a id="bugfixes-28"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -646,7 +674,7 @@ Maintenance release with updated Public Suffix List\.
<a id="v2-1-0"></a>
## v2\.1\.0
-<a id="release-summary-29"></a>
+<a id="release-summary-30"></a>
### Release Summary
Feature and maintenance release with updated PSL\.
@@ -656,7 +684,7 @@ Feature and maintenance release with updated PSL\.
* Prepare collection for inclusion in an Execution Environment by declaring its dependencies \([https\://github\.com/ansible\-collections/community\.dns/pull/93](https\://github\.com/ansible\-collections/community\.dns/pull/93)\)\.
-<a id="bugfixes-28"></a>
+<a id="bugfixes-29"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -664,12 +692,12 @@ Feature and maintenance release with updated PSL\.
<a id="v2-0-9"></a>
## v2\.0\.9
-<a id="release-summary-30"></a>
+<a id="release-summary-31"></a>
### Release Summary
Maintenance release with updated Public Suffix List and added collection links file\.
-<a id="bugfixes-29"></a>
+<a id="bugfixes-30"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -677,12 +705,12 @@ Maintenance release with updated Public Suffix List and added collection links f
<a id="v2-0-8"></a>
## v2\.0\.8
-<a id="release-summary-31"></a>
+<a id="release-summary-32"></a>
### Release Summary
Maintenance release with updated Public Suffix List\.
-<a id="bugfixes-30"></a>
+<a id="bugfixes-31"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -690,12 +718,12 @@ Maintenance release with updated Public Suffix List\.
<a id="v2-0-7"></a>
## v2\.0\.7
-<a id="release-summary-32"></a>
+<a id="release-summary-33"></a>
### Release Summary
Maintenance release with updated Public Suffix List\.
-<a id="bugfixes-31"></a>
+<a id="bugfixes-32"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -703,12 +731,12 @@ Maintenance release with updated Public Suffix List\.
<a id="v2-0-6"></a>
## v2\.0\.6
-<a id="release-summary-33"></a>
+<a id="release-summary-34"></a>
### Release Summary
Bugfix release\.
-<a id="bugfixes-32"></a>
+<a id="bugfixes-33"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -717,12 +745,12 @@ Bugfix release\.
<a id="v2-0-5"></a>
## v2\.0\.5
-<a id="release-summary-34"></a>
+<a id="release-summary-35"></a>
### Release Summary
Maintenance release with updated Public Suffix List\.
-<a id="bugfixes-33"></a>
+<a id="bugfixes-34"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -730,12 +758,12 @@ Maintenance release with updated Public Suffix List\.
<a id="v2-0-4"></a>
## v2\.0\.4
-<a id="release-summary-35"></a>
+<a id="release-summary-36"></a>
### Release Summary
Maintenance release with updated Public Suffix List\.
-<a id="bugfixes-34"></a>
+<a id="bugfixes-35"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -743,7 +771,7 @@ Maintenance release with updated Public Suffix List\.
<a id="v2-0-3"></a>
## v2\.0\.3
-<a id="release-summary-36"></a>
+<a id="release-summary-37"></a>
### Release Summary
Bugfix release\.
@@ -756,12 +784,12 @@ Bugfix release\.
<a id="v2-0-2"></a>
## v2\.0\.2
-<a id="release-summary-37"></a>
+<a id="release-summary-38"></a>
### Release Summary
Regular maintenance release\.
-<a id="bugfixes-35"></a>
+<a id="bugfixes-36"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -769,12 +797,12 @@ Regular maintenance release\.
<a id="v2-0-1"></a>
## v2\.0\.1
-<a id="release-summary-38"></a>
+<a id="release-summary-39"></a>
### Release Summary
Maintenance release with Public Suffix List updates\.
-<a id="bugfixes-36"></a>
+<a id="bugfixes-37"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -782,7 +810,7 @@ Maintenance release with Public Suffix List updates\.
<a id="v2-0-0"></a>
## v2\.0\.0
-<a id="release-summary-39"></a>
+<a id="release-summary-40"></a>
### Release Summary
This release contains many new features\, modules and plugins\, but also has several breaking changes to the 1\.x\.y versions\. Please read the changelog carefully to determine what to change if you used an earlier version of this collection\.
@@ -822,7 +850,7 @@ This release contains many new features\, modules and plugins\, but also has sev
* The hosttech\_dns\_records module has been renamed to hosttech\_dns\_record\_sets\. The old name will stop working in community\.dns 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.dns/pull/31](https\://github\.com/ansible\-collections/community\.dns/pull/31)\)\.
-<a id="bugfixes-37"></a>
+<a id="bugfixes-38"></a>
### Bugfixes
* Hetzner API \- interpret missing TTL as 300\, which is what the web console also does \([https\://github\.com/ansible\-collections/community\.dns/pull/42](https\://github\.com/ansible\-collections/community\.dns/pull/42)\)\.
@@ -834,7 +862,7 @@ This release contains many new features\, modules and plugins\, but also has sev
* wait\_for\_txt \- fix handling of too long TXT values \([https\://github\.com/ansible\-collections/community\.dns/pull/65](https\://github\.com/ansible\-collections/community\.dns/pull/65)\)\.
* wait\_for\_txt \- resolving nameservers sometimes resulted in an empty list\, yielding wrong results \([https\://github\.com/ansible\-collections/community\.dns/pull/64](https\://github\.com/ansible\-collections/community\.dns/pull/64)\)\.
-<a id="new-plugins-1"></a>
+<a id="new-plugins-2"></a>
### New Plugins
<a id="inventory"></a>
@@ -860,7 +888,7 @@ This release contains many new features\, modules and plugins\, but also has sev
<a id="v1-2-0"></a>
## v1\.2\.0
-<a id="release-summary-40"></a>
+<a id="release-summary-41"></a>
### Release Summary
Last minor 1\.x\.0 version\. The 2\.0\.0 version will have some backwards incompatible changes to the <code>hosttech\_dns\_record</code> and <code>hosttech\_dns\_records</code> modules which will require user intervention\. These changes should result in a better UX\.
@@ -872,7 +900,7 @@ Last minor 1\.x\.0 version\. The 2\.0\.0 version will have some backwards incomp
* hosttech\_dns\_record \- in <code>diff</code> mode\, also return <code>diff</code> data structure when <code>changed</code> is <code>false</code> \([https\://github\.com/ansible\-collections/community\.dns/pull/28](https\://github\.com/ansible\-collections/community\.dns/pull/28)\)\.
* module utils \- add default implementation for some zone/record API functions\, and move common JSON API code to helper class \([https\://github\.com/ansible\-collections/community\.dns/pull/26](https\://github\.com/ansible\-collections/community\.dns/pull/26)\)\.
-<a id="bugfixes-38"></a>
+<a id="bugfixes-39"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -881,7 +909,7 @@ Last minor 1\.x\.0 version\. The 2\.0\.0 version will have some backwards incomp
<a id="v1-1-0"></a>
## v1\.1\.0
-<a id="release-summary-41"></a>
+<a id="release-summary-42"></a>
### Release Summary
Regular maintenance release\.
@@ -891,7 +919,7 @@ Regular maintenance release\.
* Avoid internal ansible\-core module\_utils in favor of equivalent public API available since at least Ansible 2\.9 \([https\://github\.com/ansible\-collections/community\.dns/pull/24](https\://github\.com/ansible\-collections/community\.dns/pull/24)\)\.
-<a id="bugfixes-39"></a>
+<a id="bugfixes-40"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -899,12 +927,12 @@ Regular maintenance release\.
<a id="v1-0-1"></a>
## v1\.0\.1
-<a id="release-summary-42"></a>
+<a id="release-summary-43"></a>
### Release Summary
Regular maintenance release\.
-<a id="bugfixes-40"></a>
+<a id="bugfixes-41"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -912,12 +940,12 @@ Regular maintenance release\.
<a id="v1-0-0"></a>
## v1\.0\.0
-<a id="release-summary-43"></a>
+<a id="release-summary-44"></a>
### Release Summary
First stable release\.
-<a id="bugfixes-41"></a>
+<a id="bugfixes-42"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -925,7 +953,7 @@ First stable release\.
<a id="v0-3-0"></a>
## v0\.3\.0
-<a id="release-summary-44"></a>
+<a id="release-summary-45"></a>
### Release Summary
Fixes bugs\, adds rate limiting for Hosttech JSON API\, and adds a new bulk synchronization module\.
@@ -935,7 +963,7 @@ Fixes bugs\, adds rate limiting for Hosttech JSON API\, and adds a new bulk sync
* hosttech\_dns\_\* \- handle <code>419 Too Many Requests</code> with proper rate limiting for JSON API \([https\://github\.com/ansible\-collections/community\.dns/pull/14](https\://github\.com/ansible\-collections/community\.dns/pull/14)\)\.
-<a id="bugfixes-42"></a>
+<a id="bugfixes-43"></a>
### Bugfixes
* Avoid converting ASCII labels which contain underscores or other printable ASCII characters outside <code>\[a\-zA\-Z0\-9\-\]</code> to alabels during normalization \([https\://github\.com/ansible\-collections/community\.dns/pull/13](https\://github\.com/ansible\-collections/community\.dns/pull/13)\)\.
@@ -949,7 +977,7 @@ Fixes bugs\, adds rate limiting for Hosttech JSON API\, and adds a new bulk sync
<a id="v0-2-0"></a>
## v0\.2\.0
-<a id="release-summary-45"></a>
+<a id="release-summary-46"></a>
### Release Summary
Major refactoring release\, which adds a zone information module and supports HostTech\'s new REST API\.
@@ -974,7 +1002,7 @@ Major refactoring release\, which adds a zone information module and supports Ho
* hosttech\_\* module\_utils \- completely rewrite and refactor to support new JSON API and allow to reuse provider\-independent module logic \([https\://github\.com/ansible\-collections/community\.dns/pull/4](https\://github\.com/ansible\-collections/community\.dns/pull/4)\)\.
-<a id="bugfixes-43"></a>
+<a id="bugfixes-44"></a>
### Bugfixes
* Update Public Suffix List\.
@@ -989,15 +1017,15 @@ Major refactoring release\, which adds a zone information module and supports Ho
<a id="v0-1-0"></a>
## v0\.1\.0
-<a id="release-summary-46"></a>
+<a id="release-summary-47"></a>
### Release Summary
Initial public release\.
-<a id="new-plugins-2"></a>
+<a id="new-plugins-3"></a>
### New Plugins
-<a id="filter"></a>
+<a id="filter-1"></a>
#### Filter
* community\.dns\.get\_public\_suffix \- Returns the public suffix of a DNS name
diff --git a/ansible_collections/community/dns/CHANGELOG.rst b/ansible_collections/community/dns/CHANGELOG.rst
index 37b4a2500..e91d83ebf 100644
--- a/ansible_collections/community/dns/CHANGELOG.rst
+++ b/ansible_collections/community/dns/CHANGELOG.rst
@@ -4,6 +4,29 @@ Community DNS Collection Release Notes
.. contents:: Topics
+v2.9.0
+======
+
+Release Summary
+---------------
+
+Feature and bugfix release.
+
+Bugfixes
+--------
+
+- Update Public Suffix List.
+- inventory plugins - add unsafe wrapper to avoid marking strings that do not contain ``{`` or ``}`` as unsafe, to work around a bug in AWX (https://github.com/ansible-collections/community.dns/pull/197).
+
+New Plugins
+-----------
+
+Filter
+~~~~~~
+
+- community.dns.quote_txt - Quotes a string to use as a TXT record entry
+- community.dns.unquote_txt - Unquotes a TXT record entry to a string
+
v2.8.3
======
diff --git a/ansible_collections/community/dns/FILES.json b/ansible_collections/community/dns/FILES.json
index 8bda06632..52b3239cd 100644
--- a/ansible_collections/community/dns/FILES.json
+++ b/ansible_collections/community/dns/FILES.json
@@ -25,7 +25,7 @@
"name": ".github/workflows/ansible-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cb9ff13908693ca232d8a96c732b37b686549b5a18c58241a40c14cafe97dec0",
+ "chksum_sha256": "4ef2a19d9715b2b9a70a6fe716ec40726b3c425f3c2b96d9bfe5d12489f74574",
"format": 1
},
{
@@ -39,14 +39,14 @@
"name": ".github/workflows/docs-pr.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "fa2c8b94ec1355012d9b65d624ad400b327dfbb062cdc7407eb780a892524316",
+ "chksum_sha256": "dc9bab4e75bea6ee0b6887dd79d1f60ee31f938dc2b1992bfcd263cc623f290c",
"format": 1
},
{
"name": ".github/workflows/docs-push.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "88f3e91fc95a639fc831039a0503838f9850c51aedc52de0ef7adcfc7939ba4a",
+ "chksum_sha256": "005d031f01cb3322476bff7beec23f958cea6a2a9790e913771d40c360d2dcb2",
"format": 1
},
{
@@ -151,7 +151,7 @@
"name": "changelogs/changelog.yaml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "86ce7da485fe12025925410c18b8b391fccc9b84dffff900037604813663277f",
+ "chksum_sha256": "d6afad220bd94bbf6ffd765666b7589d04b014238a3e02973e066958c44acf43",
"format": 1
},
{
@@ -193,7 +193,7 @@
"name": "docs/docsite/rst/filter_guide.rst",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b407b72d65102202fc82d449bef8dd026f4d2debb9f7140fa6ac664a4cd4f5fc",
+ "chksum_sha256": "1af966088512f426e9ed72ce98dac4324fc02ddeafc33a0f70459b2c9bfe9ed7",
"format": 1
},
{
@@ -211,6 +211,13 @@
"format": 1
},
{
+ "name": "docs/docsite/config.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0c5ec9ff76cf4db33b5d3f771419ef50d448e5d510cb7a98fc07dd9ecee69c4e",
+ "format": 1
+ },
+ {
"name": "docs/docsite/extra-docs.yml",
"ftype": "file",
"chksum_type": "sha256",
@@ -379,6 +386,13 @@
"format": 1
},
{
+ "name": "plugins/filter/quote_txt.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0539523d52bfbe0e0eb6b6d40a5e371fb4cc4705a3eab73eeb3c52198a74023b",
+ "format": 1
+ },
+ {
"name": "plugins/filter/remove_public_suffix.yml",
"ftype": "file",
"chksum_type": "sha256",
@@ -393,6 +407,20 @@
"format": 1
},
{
+ "name": "plugins/filter/txt.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1b6220db5e9ea678b67c1a5c31f60df50f6624c6cbd89e9531b95358f2675267",
+ "format": 1
+ },
+ {
+ "name": "plugins/filter/unquote_txt.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58f2b5e0a6c736160a540b4ea3b7106465223d7c82c5480f71d3e39c7736c56e",
+ "format": 1
+ },
+ {
"name": "plugins/inventory",
"ftype": "dir",
"chksum_type": null,
@@ -802,7 +830,7 @@
"name": "plugins/plugin_utils/inventory/records.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c77b1d234e40d804759699724336db0683f6c9173f8e36c69b8b0e3d3a33a50c",
+ "chksum_sha256": "768ceedc4f0b624a22f9b777452f143e0b88639c1bd7e5f861d789ec0269e6e1",
"format": 1
},
{
@@ -834,10 +862,17 @@
"format": 1
},
{
+ "name": "plugins/plugin_utils/unsafe.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "93ccc2e18634405c7ff21a91a1df4f17261ac24b0f41bf3c46dbec2f254538c3",
+ "format": 1
+ },
+ {
"name": "plugins/public_suffix_list.dat",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "9bf809262c4506519ef0c2d89681b77c8a87d2bcf5d17d7b0496840c1451cfd9",
+ "chksum_sha256": "27ae0b652366e8c5675942482de87819cf7947f5f4dc7bc661dc82b9b5da2d04",
"format": 1
},
{
@@ -960,6 +995,34 @@
"format": 1
},
{
+ "name": "tests/integration/targets/filter_txt",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/filter_txt/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/filter_txt/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec0d81efcabab342ec8b892fdf9bcd54bf488a3b92a81a0efbe09f26e2d80c27",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/filter_txt/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92c856873b6b98a3a818dc09e1ba4cdd2e0e01449f1a28d6716eff605f1d2b01",
+ "format": 1
+ },
+ {
"name": "tests/integration/targets/hetzner",
"ftype": "dir",
"chksum_type": null,
@@ -1464,6 +1527,20 @@
"format": 1
},
{
+ "name": "tests/sanity/ignore-2.18.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6ba33006d3aa232443f145cbbc66c1eb5a4c06e75b6a9c63e89972c990d2786",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.18.txt.license",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1",
+ "format": 1
+ },
+ {
"name": "tests/sanity/ignore-2.9.txt",
"ftype": "file",
"chksum_type": "sha256",
@@ -1502,14 +1579,14 @@
"name": "tests/unit/plugins/inventory/test_hetzner_dns_records.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b0a2245e3bc7a899c5ba90f7ea85471fa5f3c26aa612ac859e3cf0ede691ea44",
+ "chksum_sha256": "fcb263ece98ce1696cd5bbe594b86911d3365d9e8dfd9858ffbf6735c5dd46d2",
"format": 1
},
{
"name": "tests/unit/plugins/inventory/test_hosttech_dns_records.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c8c44d2037060fbfbaab8d05fc3af1d78513af2a5d91d872199aa75768a82b93",
+ "chksum_sha256": "20aafd958aa2e24b07b610c7d4efbee67cab74ecaada25876889564de7fe01d6",
"format": 1
},
{
@@ -1859,7 +1936,7 @@
"name": "tests/unit/requirements-stable-2.10.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "1404c050017797dba43f1a8963794f33afaf0e5667abc792c062adf8ac84c254",
+ "chksum_sha256": "08f43f18582bbe66234f21183103b9c101b9f3a77248c8a27789283b9d6b4306",
"format": 1
},
{
@@ -1894,7 +1971,7 @@
"name": "CHANGELOG.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ab12a2e489b31f469f321b053a4cb432216fe20e8374cd0ffb4ecf68bc8c7348",
+ "chksum_sha256": "bc56ad1ca72650697ca9f41b004a70f54ef329c79938268b1430d0dac8fa51d6",
"format": 1
},
{
@@ -1908,7 +1985,7 @@
"name": "CHANGELOG.rst",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a2deefeaf4feaee535b1f34f517495188be0c31c22c1e5a33e470f86245dc92f",
+ "chksum_sha256": "6dd1dbacede2c19ab983288d1fccde3d6369642593b1da10029cdf53e6b3176c",
"format": 1
},
{
@@ -1936,7 +2013,7 @@
"name": "README.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "9083e4932c4b72abbc6c7382b3c964df7826b1a12a49f4d2e34cc36155380fd7",
+ "chksum_sha256": "61615f641d8efd57833806770c66a86dfe2ceb595df9fe1e9ef1fc0d9e2bfab4",
"format": 1
},
{
diff --git a/ansible_collections/community/dns/MANIFEST.json b/ansible_collections/community/dns/MANIFEST.json
index fcbfda5d6..0c60fe528 100644
--- a/ansible_collections/community/dns/MANIFEST.json
+++ b/ansible_collections/community/dns/MANIFEST.json
@@ -2,7 +2,7 @@
"collection_info": {
"namespace": "community",
"name": "dns",
- "version": "2.8.3",
+ "version": "2.9.0",
"authors": [
"Felix Fontein (github.com/felixfontein)",
"Markus Bergholz (github.com/markuman)"
@@ -30,7 +30,7 @@
"name": "FILES.json",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8234c71782176e94860f305e6a9e4365b2167e2bd47e59e9c580a1011fc96b39",
+ "chksum_sha256": "723a758354360ce388c0f83a88527e05dc67d3bcad6495e66deca44b8a169d12",
"format": 1
},
"format": 1
diff --git a/ansible_collections/community/dns/README.md b/ansible_collections/community/dns/README.md
index 8a404fa3a..32257a110 100644
--- a/ansible_collections/community/dns/README.md
+++ b/ansible_collections/community/dns/README.md
@@ -16,7 +16,7 @@ Please note that this collection does **not** support Windows targets.
## Tested with Ansible
-Tested with the current Ansible 2.9, ansible-base 2.10, ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, ansible-core 2.14, ansible-core 2.15, and ansible-core 2.16 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.
+Tested with the current Ansible 2.9, ansible-base 2.10, ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, ansible-core 2.14, ansible-core 2.15, ansible-core 2.16, and ansible-core 2.17 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.
## External requirements
@@ -61,6 +61,8 @@ If you use the Ansible package and do not update collections independently, use
- `get_registrable_domain`: given a domain name, returns the *registrable domain name* (also called *registered domain name*). For example, `"www.ansible.com" | community.dns.get_registrable_domain == "ansible.com"` and `"some.random.prefixes.ansible.co.uk" | community.dns.get_registrable_domain == "ansible.co.uk"`.
- `remove_public_suffix`: given a domain name, returns the part before the public suffix. For example, `"www.ansible.com" | community.dns.remove_public_suffix == "www.ansible"` and `"some.random.prefixes.ansible.co.uk" | community.dns.remove_public_suffix == "some.random.prefixes.ansible"`.
- `remove_registrable_domain`: given a domain name, returns the part before the DNS zone. For example, `"www.ansible.com" | community.dns.remove_registrable_domain == "www"` and `"some.random.prefixes.ansible.co.uk" | community.dns.remove_registrable_domain == "some.random.prefixes"`.
+ - `quote_txt`: quotes a string for use as a TXT record entry. For example, `"this is a test" | community.dns.quote_txt == '"this is a test"'`.
+ - `unquote_txt`: unquotes a TXT record entry. For example, `'"foo" "bar"' | community.dns.unquote_txt == "foobar"`.
## Using this collection
diff --git a/ansible_collections/community/dns/changelogs/changelog.yaml b/ansible_collections/community/dns/changelogs/changelog.yaml
index 626ad4abf..3eafad115 100644
--- a/ansible_collections/community/dns/changelogs/changelog.yaml
+++ b/ansible_collections/community/dns/changelogs/changelog.yaml
@@ -809,3 +809,23 @@ releases:
- 2.8.3.yml
- update-psl.yml
release_date: '2024-03-24'
+ 2.9.0:
+ changes:
+ bugfixes:
+ - Update Public Suffix List.
+ - inventory plugins - add unsafe wrapper to avoid marking strings that do not
+ contain ``{`` or ``}`` as unsafe, to work around a bug in AWX (https://github.com/ansible-collections/community.dns/pull/197).
+ release_summary: Feature and bugfix release.
+ fragments:
+ - 197-unsafe.yml
+ - 3.9.0.yml
+ - update-psl.yml
+ plugins:
+ filter:
+ - description: Quotes a string to use as a TXT record entry
+ name: quote_txt
+ namespace: null
+ - description: Unquotes a TXT record entry to a string
+ name: unquote_txt
+ namespace: null
+ release_date: '2024-04-21'
diff --git a/ansible_collections/community/dns/docs/docsite/config.yml b/ansible_collections/community/dns/docs/docsite/config.yml
new file mode 100644
index 000000000..1d6cf8554
--- /dev/null
+++ b/ansible_collections/community/dns/docs/docsite/config.yml
@@ -0,0 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# 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
+
+changelog:
+ write_changelog: true
diff --git a/ansible_collections/community/dns/docs/docsite/rst/filter_guide.rst b/ansible_collections/community/dns/docs/docsite/rst/filter_guide.rst
index aee397f8a..5643b2b4e 100644
--- a/ansible_collections/community/dns/docs/docsite/rst/filter_guide.rst
+++ b/ansible_collections/community/dns/docs/docsite/rst/filter_guide.rst
@@ -23,6 +23,11 @@ These filters allow to work with `public suffixes <https://en.wikipedia.org/wiki
The label directly before the public suffix together with the suffix is called the *registrable domain name* or *registered domain name*, since these are usually the names that people can register. Examples for registrable domain names are ``example.com`` and ``example.co.uk``, while ``www.example.com`` is not a registrable domain name. A public suffix itself is also not a registrable domain name, as for example ``github.io``.
+The collection also contains filters for working with TXT records:
+
+- :ansplugin:`community.dns.quote_txt#filter`: quote a string for use as a TXT record;
+- :ansplugin:`community.dns.unquote_txt#filter`: extract the value from a (quoted) TXT record.
+
Working with public suffixes
----------------------------
diff --git a/ansible_collections/community/dns/plugins/filter/quote_txt.yml b/ansible_collections/community/dns/plugins/filter/quote_txt.yml
new file mode 100644
index 000000000..c42274718
--- /dev/null
+++ b/ansible_collections/community/dns/plugins/filter/quote_txt.yml
@@ -0,0 +1,46 @@
+---
+# Copyright (c) Ansible Project
+# 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
+
+DOCUMENTATION:
+ name: quote_txt
+ short_description: Quotes a string to use as a TXT record entry
+ version_added: 2.9.0
+ description:
+ - Given a string, quotes it so it can be used in a TXT record entry.
+ options:
+ _input:
+ description:
+ - The string to quote.
+ type: string
+ required: true
+ always_quote:
+ description:
+ - Whether to always quote the resulting string in double quotes.
+ type: bool
+ default: false
+ character_encoding:
+ description:
+ - Whether to treat numeric escape sequences (V(\\xyz)) as octal or decimal numbers.
+ - The default value V(decimal) is compatible to L(RFC 1035, https://www.ietf.org/rfc/rfc1035.txt).
+ type: str
+ default: decimal
+ choices:
+ - decimal
+ - octal
+ author:
+ - Felix Fontein (@felixfontein)
+
+EXAMPLES: |
+ - name: Quote a TXT entry
+ ansible.builtin.set_fact:
+ public_suffix: "{{ value | community.dns.quote_txt }}"
+ # Should result in '"this is a test"'
+ vars:
+ value: this is a test
+
+RETURN:
+ _value:
+ description: The quoted string that can be used for a TXT entry.
+ type: string
diff --git a/ansible_collections/community/dns/plugins/filter/txt.py b/ansible_collections/community/dns/plugins/filter/txt.py
new file mode 100644
index 000000000..4f2d3a16f
--- /dev/null
+++ b/ansible_collections/community/dns/plugins/filter/txt.py
@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2020-2021, Felix Fontein <felix@fontein.de>
+# 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
+
+from ansible.errors import AnsibleFilterError
+from ansible.module_utils.common.text.converters import to_text
+from ansible.module_utils.six import string_types
+
+from ansible_collections.community.dns.plugins.module_utils.conversion.txt import (
+ decode_txt_value,
+ encode_txt_value,
+)
+
+
+def quote_txt(value, always_quote=False, character_encoding='decimal'):
+ if not isinstance(value, string_types):
+ raise AnsibleFilterError('Input for community.dns.quote_txt must be a string')
+ if not isinstance(always_quote, bool):
+ raise AnsibleFilterError('always_quote must be a boolean, not {value!r}'.format(value=always_quote))
+ if character_encoding not in ('decimal', 'octal'):
+ raise AnsibleFilterError('character_encoding must be "decimal" or "octal", not {value!r}'.format(value=character_encoding))
+ value = to_text(value)
+ return encode_txt_value(value, always_quote=always_quote, character_encoding=character_encoding)
+
+
+def unquote_txt(value, character_encoding='decimal'):
+ if not isinstance(value, string_types):
+ raise AnsibleFilterError('Input for community.dns.unquote_txt must be a string')
+ if character_encoding not in ('decimal', 'octal'):
+ raise AnsibleFilterError('character_encoding must be "decimal" or "octal", not {value!r}'.format(value=character_encoding))
+ value = to_text(value)
+ return decode_txt_value(value, character_encoding=character_encoding)
+
+
+class FilterModule(object):
+ '''Ansible jinja2 filters'''
+
+ def filters(self):
+ return {
+ 'quote_txt': quote_txt,
+ 'unquote_txt': unquote_txt,
+ }
diff --git a/ansible_collections/community/dns/plugins/filter/unquote_txt.yml b/ansible_collections/community/dns/plugins/filter/unquote_txt.yml
new file mode 100644
index 000000000..712cf3ad4
--- /dev/null
+++ b/ansible_collections/community/dns/plugins/filter/unquote_txt.yml
@@ -0,0 +1,42 @@
+---
+# Copyright (c) Ansible Project
+# 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
+
+DOCUMENTATION:
+ name: unquote_txt
+ short_description: Unquotes a TXT record entry to a string
+ version_added: 2.9.0
+ description:
+ - Given a (quoted) TXT entry content, extracts its value.
+ options:
+ _input:
+ description:
+ - The string to unquote.
+ type: string
+ required: true
+ character_encoding:
+ description:
+ - Whether to treat numeric escape sequences (V(\\xyz)) as octal or decimal numbers.
+ - The default value V(decimal) is compatible to L(RFC 1035, https://www.ietf.org/rfc/rfc1035.txt).
+ type: str
+ default: decimal
+ choices:
+ - decimal
+ - octal
+ author:
+ - Felix Fontein (@felixfontein)
+
+EXAMPLES: |
+ - name: Unquote a TXT entry
+ ansible.builtin.set_fact:
+ public_suffix: "{{ value | community.dns.unquote_txt }}"
+ # Should result in 'this is a test'
+ vars:
+ value: >-
+ "this is " "a test"
+
+RETURN:
+ _value:
+ description: The extracted string.
+ type: string
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 30fa11bdc..1d6827f2f 100644
--- a/ansible_collections/community/dns/plugins/plugin_utils/inventory/records.py
+++ b/ansible_collections/community/dns/plugins/plugin_utils/inventory/records.py
@@ -15,7 +15,6 @@ from ansible.module_utils import six
from ansible.module_utils.common._collections_compat import Sequence
from ansible.plugins.inventory import BaseInventoryPlugin
from ansible.utils.display import Display
-from ansible.utils.unsafe_proxy import wrap_var as make_unsafe
from ansible.template import Templar
from ansible_collections.community.dns.plugins.module_utils.provider import (
@@ -35,6 +34,8 @@ from ansible_collections.community.dns.plugins.module_utils.conversion.converter
RecordConverter,
)
+from ansible_collections.community.dns.plugins.plugin_utils.unsafe import make_unsafe
+
display = Display()
diff --git a/ansible_collections/community/dns/plugins/plugin_utils/unsafe.py b/ansible_collections/community/dns/plugins/plugin_utils/unsafe.py
new file mode 100644
index 000000000..1eb61bea0
--- /dev/null
+++ b/ansible_collections/community/dns/plugins/plugin_utils/unsafe.py
@@ -0,0 +1,41 @@
+# Copyright (c) 2023, Felix Fontein <felix@fontein.de>
+# 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
+
+import re
+
+from ansible.module_utils.six import binary_type, text_type
+from ansible.module_utils.common._collections_compat import Mapping, Set
+from ansible.module_utils.common.collections import is_sequence
+from ansible.utils.unsafe_proxy import (
+ AnsibleUnsafe,
+ wrap_var as _make_unsafe,
+)
+
+_RE_TEMPLATE_CHARS = re.compile(u'[{}]')
+_RE_TEMPLATE_CHARS_BYTES = re.compile(b'[{}]')
+
+
+def make_unsafe(value):
+ if value is None or isinstance(value, AnsibleUnsafe):
+ return value
+
+ if isinstance(value, Mapping):
+ return dict((make_unsafe(key), make_unsafe(val)) for key, val in value.items())
+ elif isinstance(value, Set):
+ return set(make_unsafe(elt) for elt in value)
+ elif is_sequence(value):
+ return type(value)(make_unsafe(elt) for elt in value)
+ elif isinstance(value, binary_type):
+ if _RE_TEMPLATE_CHARS_BYTES.search(value):
+ value = _make_unsafe(value)
+ return value
+ elif isinstance(value, text_type):
+ if _RE_TEMPLATE_CHARS.search(value):
+ value = _make_unsafe(value)
+ return value
+
+ return value
diff --git a/ansible_collections/community/dns/plugins/public_suffix_list.dat b/ansible_collections/community/dns/plugins/public_suffix_list.dat
index dd8bd923e..125f1e3d7 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-06T15:14:58Z
+// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2024-03-28T15:13:37Z
// This list is auto-generated, don't edit it manually.
// aaa : American Automobile Association, Inc.
// https://www.iana.org/domains/root/db/aaa.html
@@ -6988,10 +6988,6 @@ auto
// https://www.iana.org/domains/root/db/autos.html
autos
-// avianca : Avianca Inc.
-// https://www.iana.org/domains/root/db/avianca.html
-avianca
-
// aws : AWS Registry LLC
// https://www.iana.org/domains/root/db/aws.html
aws
@@ -12080,6 +12076,7 @@ autocode.dev
// AVM : https://avm.de
// Submitted by Andreas Weise <a.weise@avm.de>
+myfritz.link
myfritz.net
// AVStack Pte. Ltd. : https://avstack.io
@@ -12357,6 +12354,12 @@ pages.dev
r2.dev
workers.dev
+// cloudscale.ch AG : https://www.cloudscale.ch/
+// Submitted by Gaudenz Steinlin <support@cloudscale.ch>
+cust.cloudscale.ch
+objects.lpg.cloudscale.ch
+objects.rma.cloudscale.ch
+
// Clovyr : https://clovyr.io
// Submitted by Patrick Nielsen <patrick@clovyr.io>
wnext.app
@@ -12374,22 +12377,33 @@ co.cz
// CDN77.com : http://www.cdn77.com
// Submitted by Jan Krpes <jan.krpes@cdn77.com>
-c.cdn77.org
+cdn77-storage.com
+rsc.contentproxy9.cz
cdn77-ssl.net
r.cdn77.net
-rsc.cdn77.org
ssl.origin.cdn77-secure.org
+c.cdn77.org
+rsc.cdn77.org
// Cloud DNS Ltd : http://www.cloudns.net
-// Submitted by Aleksander Hristov <noc@cloudns.net>
+// Submitted by Aleksander Hristov <noc@cloudns.net> & Boyan Peychev <boyan@cloudns.net>
cloudns.asia
+cloudns.be
cloudns.biz
-cloudns.club
cloudns.cc
+cloudns.ch
+cloudns.cl
+cloudns.club
+dnsabr.com
+cloudns.cx
cloudns.eu
cloudns.in
cloudns.info
+dns-cloud.net
+dns-dynamic.net
+cloudns.nz
cloudns.org
+cloudns.ph
cloudns.pro
cloudns.pw
cloudns.us
@@ -12402,6 +12416,11 @@ cnpy.gdn
// Submitted by Moritz Marquardt <git@momar.de>
codeberg.page
+// CodeSandbox B.V. : https://codesandbox.io
+// Submitted by Ives van Hoorne <abuse@codesandbox.io>
+csb.app
+preview.csb.app
+
// CoDNS B.V.
co.nl
co.no
@@ -12520,6 +12539,7 @@ dyndns.dappnode.io
// Dark, Inc. : https://darklang.com
// Submitted by Paul Biggar <ops@darklang.com>
builtwithdark.com
+darklang.io
// DataDetect, LLC. : https://datadetect.com
// Submitted by Andrew Banchich <abanchich@sceven.com>
@@ -12918,6 +12938,10 @@ ondigitalocean.app
// Submitted by Robin H. Johnson <psl-maintainers@digitalocean.com>
*.digitaloceanspaces.com
+// DigitalPlat : https://www.digitalplat.org/
+// Submitted by Edward Hsing <contact@digitalplat.org>
+us.kg
+
// dnstrace.pro : https://dnstrace.pro/
// Submitted by Chris Partridge <chris@partridge.tech>
bci.dnstrace.pro
@@ -12959,6 +12983,14 @@ easypanel.host
// Submitted by <infracloudteam@namecheap.com>
*.ewp.live
+// Electromagnetic Field : https://www.emfcamp.org
+// Submitted by <noc@emfcamp.org>
+at.emf.camp
+
+// Elefunc, Inc. : https://elefunc.com
+// Submitted by Cetin Sert <domains@elefunc.com>
+rt.ht
+
// Elementor : Elementor Ltd.
// Submitted by Anton Barkan <antonb@elementor.com>
elementor.cloud
@@ -13250,7 +13282,8 @@ forgeblocks.com
id.forgerock.io
// Framer : https://www.framer.com
-// Submitted by Koen Rouwhorst <koenrh@framer.com>
+// Submitted by Koen Rouwhorst <security@framer.com>
+framer.ai
framer.app
framercanvas.com
framer.media
@@ -13291,6 +13324,24 @@ freemyip.com
// Submitted by Daniel A. Maierhofer <vorstand@funkfeuer.at>
wien.funkfeuer.at
+// Future Versatile Group. :https://www.fvg-on.net/
+// T.Kabu <webmaster@fvg-on.net>
+daemon.asia
+dix.asia
+mydns.bz
+0am.jp
+0g0.jp
+0j0.jp
+0t0.jp
+mydns.jp
+pgw.jp
+wjg.jp
+keyword-on.net
+live-on.net
+server-on.net
+mydns.tw
+mydns.vc
+
// Futureweb GmbH : https://www.futureweb.at
// Submitted by Andreas Schnederle-Wagner <schnederle@futureweb.at>
*.futurecms.at
@@ -13334,6 +13385,12 @@ gentlentapis.com
lab.ms
cdn-edges.net
+// Getlocalcert: https://www.getlocalcert.net
+// Submitted by Robert Alexander <support@getlocalcert.net>
+localcert.net
+localhostcert.net
+corpnet.work
+
// Ghost Foundation : https://ghost.org
// Submitted by Matt Hanley <security@ghost.org>
ghost.io
@@ -13480,6 +13537,10 @@ whitesnow.jp
zombie.jp
heteml.net
+// GoDaddy Registry : https://registry.godaddy
+// Submitted by Rohan Durrant <tldns@registry.godaddy>
+graphic.design
+
// GOV.UK Platform as a Service : https://www.cloud.service.gov.uk/
// Submitted by Tom Whitwell <gov-uk-paas-support@digital.cabinet-office.gov.uk>
cloudapps.digital
@@ -13599,6 +13660,10 @@ goupile.fr
// Submitted by <domeinnaam@minaz.nl>
gov.nl
+// GrayJay Web Solutions Inc. : https://grayjaysports.ca
+// Submitted by Matt Yamkowy <info@grayjaysports.ca>
+grayjayleagues.com
+
// Group 53, LLC : https://www.group53.com
// Submitted by Tyler Todd <noc@nova53.net>
awsmppl.com
@@ -13633,6 +13698,11 @@ hasura-app.io
// Submitted by Richard Zowalla <mi-admin@hs-heilbronn.de>
pages.it.hs-heilbronn.de
+// Helio Networks : https://heliohost.org
+// Submitted by Ben Frede <admin@heliohost.org>
+helioho.st
+heliohost.us
+
// Hepforge : https://www.hepforge.org
// Submitted by David Grellscheid <admin@hepforge.org>
hepforge.org
@@ -13646,7 +13716,6 @@ herokussl.com
// Submitted by Oren Eini <oren@ravendb.net>
ravendb.cloud
ravendb.community
-ravendb.me
development.run
ravendb.run
@@ -13737,7 +13806,7 @@ biz.at
info.at
// info.cx : http://info.cx
-// Submitted by Jacob Slater <whois@igloo.to>
+// Submitted by June Slater <whois@igloo.to>
info.cx
// Interlegis : http://www.interlegis.leg.br
@@ -13786,6 +13855,14 @@ iopsys.se
// Submitted by Matthew Hardeman <mhardeman@ipifony.com>
ipifony.net
+// is-a.dev : https://www.is-a.dev
+// Submitted by William Harrison <admin@maintainers.is-a.dev>
+is-a.dev
+
+// ir.md : https://nic.ir.md
+// Submitted by Ali Soizi <info@nic.ir.md>
+ir.md
+
// IServ GmbH : https://iserv.de
// Submitted by Mario Hoberg <info@iserv.de>
iservschule.de
@@ -13894,6 +13971,11 @@ myjino.ru
// Submitted by Daniel Fariña <ingenieria@jotelulu.com>
jotelulu.cloud
+// JouwWeb B.V. : https://www.jouwweb.nl
+// Submitted by Camilo Sperberg <tech@webador.com>
+jouwweb.site
+webadorsite.com
+
// Joyent : https://www.joyent.com/
// Submitted by Brian Bennett <brian.bennett@joyent.com>
*.triton.zone
@@ -13967,6 +14049,10 @@ lpusercontent.com
// Submitted by Lelux Admin <publisuffix@lelux.site>
lelux.site
+// Libre IT Ltd : https://libre.nz
+// Submitted by Tomas Maggio <support@libre.nz>
+runcontainers.dev
+
// Lifetime Hosting : https://Lifetime.Hosting/
// Submitted by Mike Fillator <support@lifetime.hosting>
co.business
@@ -14141,7 +14227,6 @@ co.pl
// Managed by Corporate Domains
// Microsoft Azure : https://home.azure
*.azurecontainer.io
-cloudapp.azure.com
azure-api.net
azureedge.net
azurefd.net
@@ -14248,13 +14333,18 @@ ngrok.pro
torun.pl
// Nimbus Hosting Ltd. : https://www.nimbushosting.co.uk/
-// Submitted by Nicholas Ford <nick@nimbushosting.co.uk>
+// Submitted by Nicholas Ford <dev@nimbushosting.co.uk>
nh-serv.co.uk
+nimsite.uk
// NFSN, Inc. : https://www.NearlyFreeSpeech.NET/
// Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net>
nfshost.com
+// NFT.Storage : https://nft.storage/
+// Submitted by Vasco Santos <vasco.santos@protocol.ai> or <support@nft.storage>
+ipfs.nftstorage.link
+
// Noop : https://noop.app
// Submitted by Nathaniel Schweinberg <noop@rearc.io>
*.developer.app
@@ -14434,7 +14524,6 @@ omniwe.site
123minsida.se
123miweb.es
123paginaweb.pt
-123sait.ru
123siteweb.fr
123webseite.at
123webseite.de
@@ -14452,6 +14541,13 @@ simplesite.pl
// Submitted by Eddie Jones <eddie@onefoldmedia.com>
nid.io
+// Open Domains : https://open-domains.net
+// Submitted by William Harrison <admin@open-domains.net>
+is-cool.dev
+is-not-a.dev
+localplayer.dev
+is-local.org
+
// Open Social : https://www.getopensocial.com/
// Submitted by Alexander Varwijk <security@getopensocial.com>
opensocial.site
@@ -14472,6 +14568,11 @@ operaunite.com
// Submitted by Alexandre Linte <alexandre.linte@orange.com>
tech.orange
+// OsSav Technology Ltd. : https://ossav.com/
+// TLD Nic: http://nic.can.re - TLD Whois Server: whois.can.re
+// Submitted by OsSav Technology Ltd. <support@ossav.com>
+can.re
+
// Oursky Limited : https://authgear.com/, https://skygear.io/
// Submitted by Authgear Team <hello@authgear.com>, Skygear Developer <hello@skygear.io>
authgear-staging.com
@@ -14522,10 +14623,10 @@ pagexl.com
// pcarrier.ca Software Inc: https://pcarrier.ca/
// Submitted by Pierre Carrier <pc@rrier.ca>
-bar0.net
-bar1.net
-bar2.net
-rdv.to
+*.xmit.co
+srv.us
+gh.srv.us
+gl.srv.us
// .pl domains (grandfathered)
art.pl
@@ -14683,9 +14784,12 @@ qcx.io
*.sys.qcx.io
// QNAP System Inc : https://www.qnap.com
-// Submitted by Nick Chang <nickchang@qnap.com>
-dev-myqnapcloud.com
+// Submitted by Nick Chang <cloudadmin@qnap.com>
+myqnapcloud.cn
alpha-myqnapcloud.com
+dev-myqnapcloud.com
+mycloudnas.com
+mynascloud.com
myqnapcloud.com
// Quip : https://quip.com
@@ -14915,6 +15019,10 @@ service.gov.scot
// Submitted by Shante Adam <shante@skyhat.io>
scrysec.com
+// Scrypted : https://scrypted.app
+// Submitted by Koushik Dutta <public-suffix-list@scrypted.app>
+client.scrypted.io
+
// Securepoint GmbH : https://www.securepoint.de
// Submitted by Erik Anders <erik.anders@securepoint.de>
firewall-gateway.com
@@ -15024,9 +15132,9 @@ small-web.org
vp4.me
// Snowflake Inc : https://www.snowflake.com/
-// Submitted by Faith Olapade <faith.olapade@snowflake.com>
-snowflake.app
-privatelink.snowflake.app
+// Submitted by Sam Haar <psl@snowflake.com>
+*.snowflake.app
+*.privatelink.snowflake.app
streamlit.app
streamlitapp.com
@@ -15038,6 +15146,12 @@ try-snowplow.com
// Submitted by Drew DeVault <sir@cmpwn.com>
srht.site
+// StackBlitz : https://stackblitz.com
+// Submitted by Dominic Elm <hello@stackblitz.com>
+w-corp-staticblitz.com
+w-credentialless-staticblitz.com
+w-staticblitz.com
+
// Stackhero : https://www.stackhero.io
// Submitted by Adrien Gillon <adrien+public-suffix-list@stackhero.io>
stackhero-network.com
@@ -15339,6 +15453,10 @@ inc.hk
// Submitted by ITComdomains <to@it.com>
it.com
+// Unison Computing, PBC : https://unison.cloud
+// Submitted by Simon Højberg <security@unison.cloud>
+unison-services.cloud
+
// UNIVERSAL DOMAIN REGISTRY : https://www.udr.org.yt/
// see also: whois -h whois.udr.org.yt help
// Submitted by Atanunu Igbunuroghene <publicsuffixlist@udr.org.yt>
@@ -15388,47 +15506,6 @@ v-info.info
// Submitted by Nathan van Bakel <info@voorloper.com>
voorloper.cloud
-// Voxel.sh DNS : https://voxel.sh/dns/
-// Submitted by Mia Rehlinger <dns@voxel.sh>
-neko.am
-nyaa.am
-be.ax
-cat.ax
-es.ax
-eu.ax
-gg.ax
-mc.ax
-us.ax
-xy.ax
-nl.ci
-xx.gl
-app.gp
-blog.gt
-de.gt
-to.gt
-be.gy
-cc.hn
-io.kg
-jp.kg
-tv.kg
-uk.kg
-us.kg
-de.ls
-at.md
-de.md
-jp.md
-to.md
-indie.porn
-vxl.sh
-ch.tc
-me.tc
-we.tc
-nyan.to
-at.vg
-blog.vu
-dev.vu
-me.vu
-
// V.UA Domain Administrator : https://domain.v.ua/
// Submitted by Serhii Rostilo <sergey@rostilo.kiev.ua>
v.ua
@@ -15457,6 +15534,10 @@ reserve-online.com
bookonline.app
hotelwithflight.com
+// WebWaddle Ltd: https://webwaddle.com/
+// Submitted by Merlin Glander <hostmaster@webwaddle.com>
+*.wadl.top
+
// WeDeploy by Liferay, Inc. : https://www.wedeploy.com
// Submitted by Henrique Vicente <security@wedeploy.com>
wedeploy.io
diff --git a/ansible_collections/community/dns/tests/integration/targets/filter_txt/aliases b/ansible_collections/community/dns/tests/integration/targets/filter_txt/aliases
new file mode 100644
index 000000000..b7419a24d
--- /dev/null
+++ b/ansible_collections/community/dns/tests/integration/targets/filter_txt/aliases
@@ -0,0 +1,6 @@
+# Copyright (c) Ansible Project
+# 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
+
+shippable/posix/group1
+skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller
diff --git a/ansible_collections/community/dns/tests/integration/targets/filter_txt/tasks/main.yml b/ansible_collections/community/dns/tests/integration/targets/filter_txt/tasks/main.yml
new file mode 100644
index 000000000..c0afffcea
--- /dev/null
+++ b/ansible_collections/community/dns/tests/integration/targets/filter_txt/tasks/main.yml
@@ -0,0 +1,49 @@
+---
+# Copyright (c) Ansible Project
+# 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
+
+- name: "Test quote_txt filter"
+ assert:
+ that:
+ - >-
+ '' | community.dns.quote_txt == '""'
+ - >-
+ "this is a test" | community.dns.quote_txt == '"this is a test"'
+ - >-
+ "test" | community.dns.quote_txt == 'test'
+ - >-
+ "test" | community.dns.quote_txt(always_quote=true) == '"test"'
+ - >-
+ '"' | community.dns.quote_txt == '\\"'
+ - >-
+ ' ' | community.dns.quote_txt == '" "'
+ - >-
+ "ä" | community.dns.quote_txt() == '\\195\\164'
+ - >-
+ "ä" | community.dns.quote_txt(character_encoding='octal') == '\\303\\244'
+ - >-
+ "ä" | community.dns.quote_txt(character_encoding='octal', always_quote=true) == '"\\303\\244"'
+ - >-
+ very_long_input | community.dns.quote_txt == very_long_output
+ vars:
+ very_long_input: >-
+ this is a very1, very2, very3, very4, very5, very6, very7, very8, very9, very10, very11, very12, very13, very14, very15,
+ very16, very17, very18, very19, very20, very21, very22, very23, very24, very25, very26, very27, very28, very29, very30,
+ very31, very32, very33, very34, very35, very36, very37, very38, very39 long text
+ very_long_output: >-
+ "this is a very1, very2, very3, very4, very5, very6, very7, very8, very9, very10, very11, very12, very13, very14, very15,
+ very16, very17, very18, very19, very20, very21, very22, very23, very24, very25, very26, very27, very28, very29, very30,
+ very31, very32" ", very33, very34, very35, very36, very37, very38, very39 long text"
+
+- name: "Test unquote_txt filter"
+ assert:
+ that:
+ - >-
+ '' | community.dns.unquote_txt == ''
+ - >-
+ '""' | community.dns.unquote_txt == ''
+ - >
+ '"foo" "bar"' | community.dns.unquote_txt == "foobar"
+ - >
+ 'foo "bar baz" bam' | community.dns.unquote_txt == "foobar bazbam"
diff --git a/ansible_collections/community/dns/tests/sanity/ignore-2.18.txt b/ansible_collections/community/dns/tests/sanity/ignore-2.18.txt
new file mode 100644
index 000000000..dc9da1161
--- /dev/null
+++ b/ansible_collections/community/dns/tests/sanity/ignore-2.18.txt
@@ -0,0 +1 @@
+plugins/public_suffix_list.dat no-smart-quotes
diff --git a/ansible_collections/community/dns/tests/sanity/ignore-2.18.txt.license b/ansible_collections/community/dns/tests/sanity/ignore-2.18.txt.license
new file mode 100644
index 000000000..edff8c768
--- /dev/null
+++ b/ansible_collections/community/dns/tests/sanity/ignore-2.18.txt.license
@@ -0,0 +1,3 @@
+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
+SPDX-FileCopyrightText: Ansible Project
diff --git a/ansible_collections/community/dns/tests/unit/plugins/inventory/test_hetzner_dns_records.py b/ansible_collections/community/dns/tests/unit/plugins/inventory/test_hetzner_dns_records.py
index bfaa4886d..44f694708 100644
--- a/ansible_collections/community/dns/tests/unit/plugins/inventory/test_hetzner_dns_records.py
+++ b/ansible_collections/community/dns/tests/unit/plugins/inventory/test_hetzner_dns_records.py
@@ -108,6 +108,68 @@ HETZNER_JSON_DEFAULT_ENTRIES = [
},
]
+HETZNER_JSON_DEFAULT_ENTRIES_UNSAFE = [
+ {
+ 'id': '125',
+ 'type': 'A',
+ 'name': '@',
+ 'value': '1.2.{3.4',
+ 'ttl': 3600,
+ 'zone_id': '42',
+ 'created': '2021-07-09T11:18:37Z',
+ 'modified': '2021-07-09T11:18:37Z',
+ },
+ {
+ 'id': '126',
+ 'type': 'A',
+ 'name': '*',
+ 'value': '1.2.{3.5',
+ 'ttl': 3600,
+ 'zone_id': '42',
+ 'created': '2021-07-09T11:18:37Z',
+ 'modified': '2021-07-09T11:18:37Z',
+ },
+ {
+ 'id': '127',
+ 'type': 'AAAA',
+ 'name': '@',
+ 'value': '2001:1:2::{3',
+ 'ttl': 3600,
+ 'zone_id': '42',
+ 'created': '2021-07-09T11:18:37Z',
+ 'modified': '2021-07-09T11:18:37Z',
+ },
+ {
+ 'id': '128',
+ 'type': 'AAAA',
+ 'name': 'foo',
+ 'value': '2001:1:2::{4',
+ 'ttl': 3600,
+ 'zone_id': '42',
+ 'created': '2021-07-09T11:18:37Z',
+ 'modified': '2021-07-09T11:18:37Z',
+ },
+ {
+ 'id': '129',
+ 'type': 'MX',
+ 'name': '@',
+ 'value': '10 example.com',
+ 'ttl': 3600,
+ 'zone_id': '42',
+ 'created': '2021-07-09T11:18:37Z',
+ 'modified': '2021-07-09T11:18:37Z',
+ },
+ {
+ 'id': '130',
+ 'type': 'CNAME',
+ 'name': 'bar',
+ 'value': 'example.org.',
+ 'zone_id': '42',
+ 'created': '2021-07-09T11:18:37Z',
+ 'modified': '2021-07-09T11:18:37Z',
+ },
+]
+
HETZNER_JSON_BAD_ENTRIES = [
{
'id': '125',
@@ -135,6 +197,10 @@ HETZNER_JSON_ZONE_RECORDS_GET_RESULT = {
'records': HETZNER_JSON_DEFAULT_ENTRIES,
}
+HETZNER_JSON_ZONE_RECORDS_GET_RESULT_UNSAFE = {
+ 'records': HETZNER_JSON_DEFAULT_ENTRIES_UNSAFE,
+}
+
HETZNER_JSON_ZONE_RECORDS_GET_RESULT_2 = {
'records': HETZNER_JSON_BAD_ENTRIES,
}
@@ -190,7 +256,7 @@ def test_inventory_file_simple(mocker):
.expect_query_values('page', '1')
.expect_query_values('per_page', '100')
.return_header('Content-Type', 'application/json')
- .result_json(HETZNER_JSON_ZONE_RECORDS_GET_RESULT),
+ .result_json(HETZNER_JSON_ZONE_RECORDS_GET_RESULT_UNSAFE),
])
mocker.patch('ansible_collections.community.dns.plugins.module_utils.http.open_url', open_url)
mocker.patch('ansible.inventory.manager.unfrackpath', mock_unfrackpath_noop)
@@ -207,8 +273,8 @@ def test_inventory_file_simple(mocker):
assert 'bar.example.com' not in im._inventory.hosts
assert im._inventory.get_host('example.com') in im._inventory.groups['ungrouped'].hosts
assert im._inventory.get_host('*.example.com') in im._inventory.groups['ungrouped'].hosts
- assert im._inventory.get_host('example.com').get_vars()['ansible_host'] == '1.2.3.4'
- assert im._inventory.get_host('*.example.com').get_vars()['ansible_host'] == '1.2.3.5'
+ assert im._inventory.get_host('example.com').get_vars()['ansible_host'] == '1.2.{3.4'
+ assert im._inventory.get_host('*.example.com').get_vars()['ansible_host'] == '1.2.{3.5'
assert isinstance(im._inventory.get_host('example.com').get_vars()['ansible_host'], AnsibleUnsafe)
assert isinstance(im._inventory.get_host('*.example.com').get_vars()['ansible_host'], AnsibleUnsafe)
assert len(im._inventory.groups['ungrouped'].hosts) == 2
diff --git a/ansible_collections/community/dns/tests/unit/plugins/inventory/test_hosttech_dns_records.py b/ansible_collections/community/dns/tests/unit/plugins/inventory/test_hosttech_dns_records.py
index cefd02a06..11995198c 100644
--- a/ansible_collections/community/dns/tests/unit/plugins/inventory/test_hosttech_dns_records.py
+++ b/ansible_collections/community/dns/tests/unit/plugins/inventory/test_hosttech_dns_records.py
@@ -89,6 +89,64 @@ HOSTTECH_JSON_DEFAULT_ENTRIES = [
},
]
+HOSTTECH_JSON_DEFAULT_ENTRIES_UNSAFE = [
+ # (125, 42, 'A', '', '1.2.{3.4', 3600, None, None),
+ {
+ 'id': 125,
+ 'type': 'A',
+ 'name': '',
+ 'ipv4': '1.2.{3.4',
+ 'ttl': 3600,
+ 'comment': '',
+ },
+ # (126, 42, 'A', '*', '1.2.{3.5', 3600, None, None),
+ {
+ 'id': 126,
+ 'type': 'A',
+ 'name': '*',
+ 'ipv4': '1.2.{3.5',
+ 'ttl': 3600,
+ 'comment': '',
+ },
+ # (127, 42, 'AAAA', '', '2001:1:2::{3', 3600, None, None),
+ {
+ 'id': 127,
+ 'type': 'AAAA',
+ 'name': '',
+ 'ipv6': '2001:1:2::{3',
+ 'ttl': 3600,
+ 'comment': '',
+ },
+ # (128, 42, 'AAAA', '*', '2001:1:2::{4', 3600, None, None),
+ {
+ 'id': 128,
+ 'type': 'AAAA',
+ 'name': 'foo',
+ 'ipv6': '2001:1:2::{4',
+ 'ttl': 3600,
+ 'comment': '',
+ },
+ # (129, 42, 'MX', '', 'example.com', 3600, None, '10'),
+ {
+ 'id': 129,
+ 'type': 'MX',
+ 'ownername': '',
+ 'name': 'example.com',
+ 'pref': 10,
+ 'ttl': 3600,
+ 'comment': '',
+ },
+ # (130, 42, 'CNAME', 'bar', 'example.org.', 10800, None, None),
+ {
+ 'id': 130,
+ 'type': 'CNAME',
+ 'name': 'bar',
+ 'cname': 'example.org.',
+ 'ttl': 10800,
+ 'comment': '',
+ },
+]
+
HOSTTECH_JSON_ZONE_LIST_RESULT = {
"data": [
@@ -119,6 +177,18 @@ HOSTTECH_JSON_ZONE_RECORDS_GET_RESULT = {
"data": HOSTTECH_JSON_DEFAULT_ENTRIES,
}
+HOSTTECH_JSON_ZONE_GET_RESULT_UNSAFE = {
+ "data": {
+ "id": 42,
+ "name": "example.com",
+ "email": "test@example.com",
+ "ttl": 10800,
+ "nameserver": "ns1.hosttech.ch",
+ "dnssec": False,
+ "records": HOSTTECH_JSON_DEFAULT_ENTRIES_UNSAFE,
+ }
+}
+
original_exists = os.path.exists
original_access = os.access
@@ -167,7 +237,7 @@ def test_inventory_file_simple(mocker):
.expect_header('authorization', 'Bearer foo')
.expect_url('https://api.ns1.hosttech.eu/api/user/v1/zones/42')
.return_header('Content-Type', 'application/json')
- .result_json(HOSTTECH_JSON_ZONE_GET_RESULT),
+ .result_json(HOSTTECH_JSON_ZONE_GET_RESULT_UNSAFE),
])
mocker.patch('ansible_collections.community.dns.plugins.module_utils.http.open_url', open_url)
mocker.patch('ansible.inventory.manager.unfrackpath', mock_unfrackpath_noop)
@@ -184,8 +254,8 @@ def test_inventory_file_simple(mocker):
assert 'bar.example.com' not in im._inventory.hosts
assert im._inventory.get_host('example.com') in im._inventory.groups['ungrouped'].hosts
assert im._inventory.get_host('*.example.com') in im._inventory.groups['ungrouped'].hosts
- assert im._inventory.get_host('example.com').get_vars()['ansible_host'] == '1.2.3.4'
- assert im._inventory.get_host('*.example.com').get_vars()['ansible_host'] == '1.2.3.5'
+ assert im._inventory.get_host('example.com').get_vars()['ansible_host'] == '1.2.{3.4'
+ assert im._inventory.get_host('*.example.com').get_vars()['ansible_host'] == '1.2.{3.5'
assert isinstance(im._inventory.get_host('example.com').get_vars()['ansible_host'], AnsibleUnsafe)
assert isinstance(im._inventory.get_host('*.example.com').get_vars()['ansible_host'], AnsibleUnsafe)
assert len(im._inventory.groups['ungrouped'].hosts) == 2
diff --git a/ansible_collections/community/dns/tests/unit/requirements-stable-2.10.txt b/ansible_collections/community/dns/tests/unit/requirements-stable-2.10.txt
index 126caabdc..49df5eff9 100644
--- a/ansible_collections/community/dns/tests/unit/requirements-stable-2.10.txt
+++ b/ansible_collections/community/dns/tests/unit/requirements-stable-2.10.txt
@@ -10,4 +10,4 @@ ipaddress ; python_version < '3.3'
dnspython < 2.4.0
lxml < 4.3.0 ; python_version < '2.7' # lxml 4.3.0 and later require python 2.7 or later
-lxml ; python_version >= '2.7'
+lxml < 5.2.0 ; python_version >= '2.7' # lxml 5.2.0 does fail with Python 3.6 due to TOML loading failure