diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 04:05:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 04:05:56 +0000 |
commit | 67c6a4d1dccb62159b9d9b2dea4e2f487446e276 (patch) | |
tree | 9ccbb35137f480bbbdb899accbda52a8135d3416 /ansible_collections/community/hrobot | |
parent | Adding upstream version 9.4.0+dfsg. (diff) | |
download | ansible-67c6a4d1dccb62159b9d9b2dea4e2f487446e276.tar.xz ansible-67c6a4d1dccb62159b9d9b2dea4e2f487446e276.zip |
Adding upstream version 9.5.1+dfsg.upstream/9.5.1+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/hrobot')
15 files changed, 203 insertions, 73 deletions
diff --git a/ansible_collections/community/hrobot/.github/workflows/ansible-test.yml b/ansible_collections/community/hrobot/.github/workflows/ansible-test.yml index 1e66b7d29..6aadd1b4f 100644 --- a/ansible_collections/community/hrobot/.github/workflows/ansible-test.yml +++ b/ansible_collections/community/hrobot/.github/workflows/ansible-test.yml @@ -34,6 +34,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 @@ -75,6 +76,7 @@ jobs: - stable-2.14 - stable-2.15 - stable-2.16 + - stable-2.17 - devel steps: diff --git a/ansible_collections/community/hrobot/.github/workflows/docs-pr.yml b/ansible_collections/community/hrobot/.github/workflows/docs-pr.yml index c5d5c24b5..3d1b87a86 100644 --- a/ansible_collections/community/hrobot/.github/workflows/docs-pr.yml +++ b/ansible_collections/community/hrobot/.github/workflows/docs-pr.yml @@ -32,6 +32,7 @@ jobs: documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/ squash-hierarchy: true 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/hrobot/.github/workflows/docs-push.yml b/ansible_collections/community/hrobot/.github/workflows/docs-push.yml index e1db3c2eb..783ff30e1 100644 --- a/ansible_collections/community/hrobot/.github/workflows/docs-push.yml +++ b/ansible_collections/community/hrobot/.github/workflows/docs-push.yml @@ -37,6 +37,7 @@ jobs: init-extra-html-theme-options: | documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/ squash-hierarchy: true + 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/hrobot/CHANGELOG.md b/ansible_collections/community/hrobot/CHANGELOG.md index d09d85be0..fec73109e 100644 --- a/ansible_collections/community/hrobot/CHANGELOG.md +++ b/ansible_collections/community/hrobot/CHANGELOG.md @@ -2,74 +2,90 @@ **Topics** -- <a href="#v1-9-1">v1\.9\.1</a> +- <a href="#v1-9-2">v1\.9\.2</a> - <a href="#release-summary">Release Summary</a> + - <a href="#bugfixes">Bugfixes</a> +- <a href="#v1-9-1">v1\.9\.1</a> + - <a href="#release-summary-1">Release Summary</a> - <a href="#security-fixes">Security Fixes</a> - <a href="#v1-9-0">v1\.9\.0</a> - - <a href="#release-summary-1">Release Summary</a> + - <a href="#release-summary-2">Release Summary</a> - <a href="#minor-changes">Minor Changes</a> - <a href="#deprecated-features">Deprecated Features</a> - <a href="#v1-8-2">v1\.8\.2</a> - - <a href="#release-summary-2">Release Summary</a> - - <a href="#bugfixes">Bugfixes</a> -- <a href="#v1-8-1">v1\.8\.1</a> - <a href="#release-summary-3">Release Summary</a> + - <a href="#bugfixes-1">Bugfixes</a> +- <a href="#v1-8-1">v1\.8\.1</a> + - <a href="#release-summary-4">Release Summary</a> - <a href="#known-issues">Known Issues</a> - <a href="#v1-8-0">v1\.8\.0</a> - - <a href="#release-summary-4">Release Summary</a> + - <a href="#release-summary-5">Release Summary</a> - <a href="#major-changes">Major Changes</a> - <a href="#minor-changes-1">Minor Changes</a> - <a href="#v1-7-0">v1\.7\.0</a> - - <a href="#release-summary-5">Release Summary</a> + - <a href="#release-summary-6">Release Summary</a> - <a href="#new-modules">New Modules</a> - <a href="#v1-6-0">v1\.6\.0</a> - - <a href="#release-summary-6">Release Summary</a> + - <a href="#release-summary-7">Release Summary</a> - <a href="#minor-changes-2">Minor Changes</a> - <a href="#v1-5-2">v1\.5\.2</a> - - <a href="#release-summary-7">Release Summary</a> + - <a href="#release-summary-8">Release Summary</a> - <a href="#minor-changes-3">Minor Changes</a> - <a href="#v1-5-1">v1\.5\.1</a> - - <a href="#release-summary-8">Release Summary</a> -- <a href="#v1-5-0">v1\.5\.0</a> - <a href="#release-summary-9">Release Summary</a> +- <a href="#v1-5-0">v1\.5\.0</a> + - <a href="#release-summary-10">Release Summary</a> - <a href="#minor-changes-4">Minor Changes</a> - <a href="#v1-4-0">v1\.4\.0</a> - - <a href="#release-summary-10">Release Summary</a> + - <a href="#release-summary-11">Release Summary</a> - <a href="#minor-changes-5">Minor Changes</a> - <a href="#v1-3-1">v1\.3\.1</a> - - <a href="#release-summary-11">Release Summary</a> - - <a href="#bugfixes-1">Bugfixes</a> -- <a href="#v1-3-0">v1\.3\.0</a> - <a href="#release-summary-12">Release Summary</a> - - <a href="#minor-changes-6">Minor Changes</a> - <a href="#bugfixes-2">Bugfixes</a> -- <a href="#v1-2-3">v1\.2\.3</a> +- <a href="#v1-3-0">v1\.3\.0</a> - <a href="#release-summary-13">Release Summary</a> -- <a href="#v1-2-2">v1\.2\.2</a> - - <a href="#release-summary-14">Release Summary</a> + - <a href="#minor-changes-6">Minor Changes</a> - <a href="#bugfixes-3">Bugfixes</a> -- <a href="#v1-2-1">v1\.2\.1</a> +- <a href="#v1-2-3">v1\.2\.3</a> + - <a href="#release-summary-14">Release Summary</a> +- <a href="#v1-2-2">v1\.2\.2</a> - <a href="#release-summary-15">Release Summary</a> + - <a href="#bugfixes-4">Bugfixes</a> +- <a href="#v1-2-1">v1\.2\.1</a> + - <a href="#release-summary-16">Release Summary</a> - <a href="#minor-changes-7">Minor Changes</a> - <a href="#v1-2-0">v1\.2\.0</a> - - <a href="#release-summary-16">Release Summary</a> + - <a href="#release-summary-17">Release Summary</a> - <a href="#minor-changes-8">Minor Changes</a> - <a href="#new-modules-1">New Modules</a> - <a href="#v1-1-1">v1\.1\.1</a> - - <a href="#release-summary-17">Release Summary</a> - - <a href="#bugfixes-4">Bugfixes</a> -- <a href="#v1-1-0">v1\.1\.0</a> - <a href="#release-summary-18">Release Summary</a> + - <a href="#bugfixes-5">Bugfixes</a> +- <a href="#v1-1-0">v1\.1\.0</a> + - <a href="#release-summary-19">Release Summary</a> - <a href="#new-plugins">New Plugins</a> - <a href="#inventory">Inventory</a> - <a href="#v1-0-0">v1\.0\.0</a> - - <a href="#release-summary-19">Release Summary</a> + - <a href="#release-summary-20">Release Summary</a> - <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a> +<a id="v1-9-2"></a> +## v1\.9\.2 + +<a id="release-summary"></a> +### Release Summary + +Bugfix release\. + +<a id="bugfixes"></a> +### Bugfixes + +* 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\.hrobot/pull/102](https\://github\.com/ansible\-collections/community\.hrobot/pull/102)\)\. + <a id="v1-9-1"></a> ## v1\.9\.1 -<a id="release-summary"></a> +<a id="release-summary-1"></a> ### Release Summary Bugfix release\. @@ -82,7 +98,7 @@ Bugfix release\. <a id="v1-9-0"></a> ## v1\.9\.0 -<a id="release-summary-1"></a> +<a id="release-summary-2"></a> ### Release Summary Feature and maintenance release\. @@ -100,12 +116,12 @@ Feature and maintenance release\. <a id="v1-8-2"></a> ## v1\.8\.2 -<a id="release-summary-2"></a> +<a id="release-summary-3"></a> ### Release Summary Maintenance release with updated documentation\. -<a id="bugfixes"></a> +<a id="bugfixes-1"></a> ### Bugfixes * Show more information \(if available\) from error messages \([https\://github\.com/ansible\-collections/community\.hrobot/pull/89](https\://github\.com/ansible\-collections/community\.hrobot/pull/89)\)\. @@ -113,7 +129,7 @@ Maintenance release with updated documentation\. <a id="v1-8-1"></a> ## v1\.8\.1 -<a id="release-summary-3"></a> +<a id="release-summary-4"></a> ### Release Summary Maintenance release with updated documentation\. @@ -134,7 +150,7 @@ for the rendered HTML version of the documentation of the latest release\. <a id="v1-8-0"></a> ## v1\.8\.0 -<a id="release-summary-4"></a> +<a id="release-summary-5"></a> ### Release Summary Feature release for the Hetzner firewall changes\. @@ -153,7 +169,7 @@ Feature release for the Hetzner firewall changes\. <a id="v1-7-0"></a> ## v1\.7\.0 -<a id="release-summary-5"></a> +<a id="release-summary-6"></a> ### Release Summary Feature release\. @@ -166,7 +182,7 @@ Feature release\. <a id="v1-6-0"></a> ## v1\.6\.0 -<a id="release-summary-6"></a> +<a id="release-summary-7"></a> ### Release Summary Feature release with improved documentation\. @@ -179,7 +195,7 @@ Feature release with improved documentation\. <a id="v1-5-2"></a> ## v1\.5\.2 -<a id="release-summary-7"></a> +<a id="release-summary-8"></a> ### Release Summary Maintenance release with a documentation improvement\. @@ -192,7 +208,7 @@ Maintenance release with a documentation improvement\. <a id="v1-5-1"></a> ## v1\.5\.1 -<a id="release-summary-8"></a> +<a id="release-summary-9"></a> ### Release Summary Maintenance release with small documentation fixes\. @@ -200,7 +216,7 @@ Maintenance release with small documentation fixes\. <a id="v1-5-0"></a> ## v1\.5\.0 -<a id="release-summary-9"></a> +<a id="release-summary-10"></a> ### Release Summary Maintenance release changing the way licenses are declared\. No functional changes\. @@ -213,7 +229,7 @@ Maintenance release changing the way licenses are declared\. No functional chang <a id="v1-4-0"></a> ## v1\.4\.0 -<a id="release-summary-10"></a> +<a id="release-summary-11"></a> ### Release Summary Feature release\. @@ -226,12 +242,12 @@ Feature release\. <a id="v1-3-1"></a> ## v1\.3\.1 -<a id="release-summary-11"></a> +<a id="release-summary-12"></a> ### Release Summary Maintenance release\. -<a id="bugfixes-1"></a> +<a id="bugfixes-2"></a> ### Bugfixes * Include <code>simplified\_bsd\.txt</code> license file for the <code>robot</code> and <code>failover</code> module utils\. @@ -239,7 +255,7 @@ Maintenance release\. <a id="v1-3-0"></a> ## v1\.3\.0 -<a id="release-summary-12"></a> +<a id="release-summary-13"></a> ### Release Summary Feature and bugfix release\. @@ -249,7 +265,7 @@ Feature and bugfix release\. * Prepare collection for inclusion in an Execution Environment by declaring its dependencies \([https\://github\.com/ansible\-collections/community\.hrobot/pull/45](https\://github\.com/ansible\-collections/community\.hrobot/pull/45)\)\. -<a id="bugfixes-2"></a> +<a id="bugfixes-3"></a> ### Bugfixes * robot inventory plugin \- do not crash if a server neither has name or primary IP set\. Instead\, fall back to using the server\'s number as the name\. This can happen if unnamed rack reservations show up in your server list \([https\://github\.com/ansible\-collections/community\.hrobot/issues/40](https\://github\.com/ansible\-collections/community\.hrobot/issues/40)\, [https\://github\.com/ansible\-collections/community\.hrobot/pull/47](https\://github\.com/ansible\-collections/community\.hrobot/pull/47)\)\. @@ -257,7 +273,7 @@ Feature and bugfix release\. <a id="v1-2-3"></a> ## v1\.2\.3 -<a id="release-summary-13"></a> +<a id="release-summary-14"></a> ### Release Summary Docs update release\. @@ -265,12 +281,12 @@ Docs update release\. <a id="v1-2-2"></a> ## v1\.2\.2 -<a id="release-summary-14"></a> +<a id="release-summary-15"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-3"></a> +<a id="bugfixes-4"></a> ### Bugfixes * boot \- fix incorrect handling of SSH authorized keys \([https\://github\.com/ansible\-collections/community\.hrobot/issues/32](https\://github\.com/ansible\-collections/community\.hrobot/issues/32)\, [https\://github\.com/ansible\-collections/community\.hrobot/pull/33](https\://github\.com/ansible\-collections/community\.hrobot/pull/33)\)\. @@ -278,7 +294,7 @@ Bugfix release\. <a id="v1-2-1"></a> ## v1\.2\.1 -<a id="release-summary-15"></a> +<a id="release-summary-16"></a> ### Release Summary Maintenance release\. @@ -291,7 +307,7 @@ Maintenance release\. <a id="v1-2-0"></a> ## v1\.2\.0 -<a id="release-summary-16"></a> +<a id="release-summary-17"></a> ### Release Summary Feature release with multiple new modules\. @@ -318,12 +334,12 @@ Feature release with multiple new modules\. <a id="v1-1-1"></a> ## v1\.1\.1 -<a id="release-summary-17"></a> +<a id="release-summary-18"></a> ### Release Summary Bugfix release which reduces the number of HTTPS queries for the modules and plugins\. -<a id="bugfixes-4"></a> +<a id="bugfixes-5"></a> ### Bugfixes * robot \- force HTTP basic authentication to reduce number of HTTPS requests \([https\://github\.com/ansible\-collections/community\.hrobot/pull/9](https\://github\.com/ansible\-collections/community\.hrobot/pull/9)\)\. @@ -331,7 +347,7 @@ Bugfix release which reduces the number of HTTPS queries for the modules and plu <a id="v1-1-0"></a> ## v1\.1\.0 -<a id="release-summary-18"></a> +<a id="release-summary-19"></a> ### Release Summary Release with a new inventory plugin\. @@ -347,7 +363,7 @@ Release with a new inventory plugin\. <a id="v1-0-0"></a> ## v1\.0\.0 -<a id="release-summary-19"></a> +<a id="release-summary-20"></a> ### Release Summary The <code>community\.hrobot</code> continues the work on the Hetzner Robot modules from their state in <code>community\.general</code> 1\.2\.0\. The changes listed here are thus relative to the modules <code>community\.general\.hetzner\_\*</code>\. diff --git a/ansible_collections/community/hrobot/CHANGELOG.rst b/ansible_collections/community/hrobot/CHANGELOG.rst index 847d3dbda..fdb9c4a23 100644 --- a/ansible_collections/community/hrobot/CHANGELOG.rst +++ b/ansible_collections/community/hrobot/CHANGELOG.rst @@ -4,6 +4,19 @@ Community Hetzner Robot Collection Release Notes .. contents:: Topics +v1.9.2 +====== + +Release Summary +--------------- + +Bugfix release. + +Bugfixes +-------- + +- 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.hrobot/pull/102). + v1.9.1 ====== diff --git a/ansible_collections/community/hrobot/FILES.json b/ansible_collections/community/hrobot/FILES.json index 54c28f1e6..e5964a9b0 100644 --- a/ansible_collections/community/hrobot/FILES.json +++ b/ansible_collections/community/hrobot/FILES.json @@ -25,21 +25,21 @@ "name": ".github/workflows/ansible-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b221558d1b9e91f2f1b3087eca7455efea6016a313388315d94c748a736f6d0c", + "chksum_sha256": "6745e283a9f1578108ad5f14efed6558cdfb1a25c5e04426836b343baa7f1ccc", "format": 1 }, { "name": ".github/workflows/docs-pr.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "369ffbe6357397daf6ef60448f249fc74a2ccd0c023bb37e956f29f1107087a0", + "chksum_sha256": "7d4d4e79b974e499d22506e1dae74806636da815166fcd615d0a0d728290370a", "format": 1 }, { "name": ".github/workflows/docs-push.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a37437b4ac5178def5765173891f1cc0b5562f833d0fabfe8f2dca166cdae6b4", + "chksum_sha256": "1404c05e77bda38b2061314876ed1d9f7e426b281d69f7b588d52b83b740f46e", "format": 1 }, { @@ -137,7 +137,7 @@ "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7bb1dd839047930188a470f49ab846872b8b5fed15a0ad79f2a4f6badc7ca08f", + "chksum_sha256": "e941d53c423339dae173424865a5f4e2c892aa52818bebd6999d2444ff2188a3", "format": 1 }, { @@ -169,6 +169,13 @@ "format": 1 }, { + "name": "docs/docsite/config.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "0c5ec9ff76cf4db33b5d3f771419ef50d448e5d510cb7a98fc07dd9ecee69c4e", + "format": 1 + }, + { "name": "docs/docsite/links.yml", "ftype": "file", "chksum_type": "sha256", @@ -235,7 +242,7 @@ "name": "plugins/inventory/robot.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "08386e031100da8e3ae8d8a76fdf511b71ebce6d5b9648dc24f32784ee497fda", + "chksum_sha256": "9ebb90b3fa1ce6a294b1d56b7d943e86ada342b9e288bdd416bde2e39e9989db", "format": 1 }, { @@ -351,6 +358,20 @@ "format": 1 }, { + "name": "plugins/plugin_utils", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "plugins/plugin_utils/unsafe.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "93ccc2e18634405c7ff21a91a1df4f17261ac24b0f41bf3c46dbec2f254538c3", + "format": 1 + }, + { "name": "tests", "ftype": "dir", "chksum_type": null, @@ -610,6 +631,20 @@ "format": 1 }, { + "name": "tests/sanity/ignore-2.18.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5264853edb2c6ff138f5496111c1e758a3a54b61e82d96c0072cb9429fb31c6e", + "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", @@ -648,7 +683,7 @@ "name": "tests/unit/plugins/inventory/test_robot.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "673ffae43e3a3584719643a42bbdd33321b2b8331629a9d069793c3925d21c35", + "chksum_sha256": "e77768bf19cc0b1743641419d4b0360b6725b8dbb4e79d2ecacfac69d0886db9", "format": 1 }, { @@ -788,7 +823,7 @@ "name": "CHANGELOG.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2c4facb0c77d486fd61f1ea78cd2bee7c6cf833fc4dd328b57a9a440efe43db3", + "chksum_sha256": "ec9612359cac38411b264cb53d67607a383a08d1a2bffc3ff84cdb1d9ad1de4c", "format": 1 }, { @@ -802,7 +837,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ca10d6a2a30e1165b9325897d7c6335ff8b3a50859742e2e4333070df0e6c38f", + "chksum_sha256": "84b7a7e9f7b8280abe9151db53d4fc3235b37db19686030e8d8fd000513e41ad", "format": 1 }, { @@ -823,7 +858,7 @@ "name": "README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b26ea8090f24cde8afb282f7779abf6ce363edbf65068631c38984c5ed51ba70", + "chksum_sha256": "df4f5e5e0c88eb6caf14a6b2d3916a5849ac18a2ee6c748d0276d1788d145911", "format": 1 }, { diff --git a/ansible_collections/community/hrobot/MANIFEST.json b/ansible_collections/community/hrobot/MANIFEST.json index 5fd6295d8..1ac2e2da3 100644 --- a/ansible_collections/community/hrobot/MANIFEST.json +++ b/ansible_collections/community/hrobot/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "hrobot", - "version": "1.9.1", + "version": "1.9.2", "authors": [ "Felix Fontein (github.com/felixfontein)" ], @@ -30,7 +30,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cada2fa56571e4857ace197d0dd1c09e665fdd718cea048c0327ba8ef3447245", + "chksum_sha256": "a5c77f86ec2889eb57623d0ccd7ffbae9635537c46dc4539324e8da92b7ddf27", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/hrobot/README.md b/ansible_collections/community/hrobot/README.md index 44ee9ddcd..bdc481de9 100644 --- a/ansible_collections/community/hrobot/README.md +++ b/ansible_collections/community/hrobot/README.md @@ -15,7 +15,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 diff --git a/ansible_collections/community/hrobot/changelogs/changelog.yaml b/ansible_collections/community/hrobot/changelogs/changelog.yaml index ff49e627a..eca36fc8f 100644 --- a/ansible_collections/community/hrobot/changelogs/changelog.yaml +++ b/ansible_collections/community/hrobot/changelogs/changelog.yaml @@ -280,3 +280,13 @@ releases: - 1.9.1.yml - inventory-rce.yml release_date: '2024-03-16' + 1.9.2: + changes: + bugfixes: + - 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.hrobot/pull/102). + release_summary: Bugfix release. + fragments: + - 1.9.2.yml + - 102-unsafe.yml + release_date: '2024-04-16' diff --git a/ansible_collections/community/hrobot/docs/docsite/config.yml b/ansible_collections/community/hrobot/docs/docsite/config.yml new file mode 100644 index 000000000..1d6cf8554 --- /dev/null +++ b/ansible_collections/community/hrobot/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/hrobot/plugins/inventory/robot.py b/ansible_collections/community/hrobot/plugins/inventory/robot.py index 19a2f1aa4..409c90992 100644 --- a/ansible_collections/community/hrobot/plugins/inventory/robot.py +++ b/ansible_collections/community/hrobot/plugins/inventory/robot.py @@ -85,13 +85,13 @@ from ansible.errors import AnsibleError from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable from ansible.template import Templar from ansible.utils.display import Display -from ansible.utils.unsafe_proxy import wrap_var as make_unsafe from ansible_collections.community.hrobot.plugins.module_utils.robot import ( BASE_URL, PluginException, plugin_open_url_json, ) +from ansible_collections.community.hrobot.plugins.plugin_utils.unsafe import make_unsafe display = Display() diff --git a/ansible_collections/community/hrobot/plugins/plugin_utils/unsafe.py b/ansible_collections/community/hrobot/plugins/plugin_utils/unsafe.py new file mode 100644 index 000000000..1eb61bea0 --- /dev/null +++ b/ansible_collections/community/hrobot/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/hrobot/tests/sanity/ignore-2.18.txt b/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt new file mode 100644 index 000000000..0d9329fad --- /dev/null +++ b/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt @@ -0,0 +1 @@ +tests/ee/roles/smoke/library/smoke_ipaddress.py shebang diff --git a/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt.license b/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt.license new file mode 100644 index 000000000..edff8c768 --- /dev/null +++ b/ansible_collections/community/hrobot/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/hrobot/tests/unit/plugins/inventory/test_robot.py b/ansible_collections/community/hrobot/tests/unit/plugins/inventory/test_robot.py index d5514aee5..c10524f7e 100644 --- a/ansible_collections/community/hrobot/tests/unit/plugins/inventory/test_robot.py +++ b/ansible_collections/community/hrobot/tests/unit/plugins/inventory/test_robot.py @@ -368,14 +368,14 @@ def test_unsafe(inventory, mocker): .result_json([ { 'server': { - 'server_ip': '1.2.3.4', + 'server_ip': '1.2.{3.4', 'dc': 'abc', }, }, { 'server': { 'server_ip': '1.2.3.5', - 'server_name': 'foo', + 'server_name': 'fo{o', 'dc': 'EVALU{{ "" }}ATED', }, }, @@ -389,27 +389,27 @@ def test_unsafe(inventory, mocker): open_url.assert_is_done() - host_1 = inventory.inventory.get_host('1.2.3.4') - host_2 = inventory.inventory.get_host('foo') + host_1 = inventory.inventory.get_host('1.2.{3.4') + host_2 = inventory.inventory.get_host('fo{o') host_1_vars = host_1.get_vars() host_2_vars = host_2.get_vars() - assert host_1_vars['ansible_host'] == '1.2.3.4' - assert host_1_vars['hrobot_server_ip'] == '1.2.3.4' + assert host_1_vars['ansible_host'] == '1.2.{3.4' + assert host_1_vars['hrobot_server_ip'] == '1.2.{3.4' assert host_1_vars['hrobot_dc'] == 'abc' assert host_2_vars['ansible_host'] == '1.2.3.5' assert host_2_vars['hrobot_server_ip'] == '1.2.3.5' - assert host_2_vars['hrobot_server_name'] == 'foo' + assert host_2_vars['hrobot_server_name'] == 'fo{o' assert host_2_vars['hrobot_dc'] == 'EVALU{{ "" }}ATED' # Make sure everything is unsafe assert isinstance(host_1_vars['ansible_host'], AnsibleUnsafe) assert isinstance(host_1_vars['hrobot_server_ip'], AnsibleUnsafe) - assert isinstance(host_1_vars['hrobot_dc'], AnsibleUnsafe) + assert not isinstance(host_1_vars['hrobot_dc'], AnsibleUnsafe) - assert isinstance(host_2_vars['ansible_host'], AnsibleUnsafe) - assert isinstance(host_2_vars['hrobot_server_ip'], AnsibleUnsafe) + assert not isinstance(host_2_vars['ansible_host'], AnsibleUnsafe) + assert not isinstance(host_2_vars['hrobot_server_ip'], AnsibleUnsafe) assert isinstance(host_2_vars['hrobot_server_name'], AnsibleUnsafe) assert isinstance(host_2_vars['hrobot_dc'], AnsibleUnsafe) |