summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/hrobot
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/hrobot')
-rw-r--r--ansible_collections/community/hrobot/.github/patchback.yml9
-rw-r--r--ansible_collections/community/hrobot/.github/workflows/ansible-test.yml2
-rw-r--r--ansible_collections/community/hrobot/CHANGELOG.md132
-rw-r--r--ansible_collections/community/hrobot/CHANGELOG.rst17
-rw-r--r--ansible_collections/community/hrobot/FILES.json37
-rw-r--r--ansible_collections/community/hrobot/MANIFEST.json4
-rw-r--r--ansible_collections/community/hrobot/README.md4
-rw-r--r--ansible_collections/community/hrobot/changelogs/changelog.yaml20
-rw-r--r--ansible_collections/community/hrobot/changelogs/config.yaml1
-rw-r--r--ansible_collections/community/hrobot/plugins/modules/boot.py6
-rw-r--r--ansible_collections/community/hrobot/tests/unit/plugins/modules/test_boot.py8
-rw-r--r--ansible_collections/community/hrobot/tests/unit/plugins/plugin_utils/test_unsafe.py133
12 files changed, 290 insertions, 83 deletions
diff --git a/ansible_collections/community/hrobot/.github/patchback.yml b/ansible_collections/community/hrobot/.github/patchback.yml
new file mode 100644
index 000000000..5ee7812ed
--- /dev/null
+++ b/ansible_collections/community/hrobot/.github/patchback.yml
@@ -0,0 +1,9 @@
+---
+# 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
+
+backport_branch_prefix: patchback/backports/
+backport_label_prefix: backport-
+target_branch_prefix: stable-
+...
diff --git a/ansible_collections/community/hrobot/.github/workflows/ansible-test.yml b/ansible_collections/community/hrobot/.github/workflows/ansible-test.yml
index fe133e857..62151bf25 100644
--- a/ansible_collections/community/hrobot/.github/workflows/ansible-test.yml
+++ b/ansible_collections/community/hrobot/.github/workflows/ansible-test.yml
@@ -37,6 +37,7 @@ jobs:
uses: felixfontein/ansible-test-gh-action@main
with:
ansible-core-version: ${{ matrix.ansible }}
+ codecov-token: ${{ secrets.CODECOV_TOKEN }}
testing-type: sanity
pre-test-cmd: >-
git clone --depth=1 --single-branch --branch stable-1 https://github.com/ansible-collections/community.library_inventory_filtering.git ../../community/library_inventory_filtering_v1
@@ -62,6 +63,7 @@ jobs:
uses: felixfontein/ansible-test-gh-action@main
with:
ansible-core-version: ${{ matrix.ansible }}
+ codecov-token: ${{ secrets.CODECOV_TOKEN }}
testing-type: units
test-deps: >-
git+https://github.com/ansible-collections/community.internal_test_tools.git,main
diff --git a/ansible_collections/community/hrobot/CHANGELOG.md b/ansible_collections/community/hrobot/CHANGELOG.md
index d995f8d6d..3dd6208b0 100644
--- a/ansible_collections/community/hrobot/CHANGELOG.md
+++ b/ansible_collections/community/hrobot/CHANGELOG.md
@@ -2,86 +2,102 @@
**Topics**
-- <a href="#v2-0-0">v2\.0\.0</a>
+- <a href="#v2-0-1">v2\.0\.1</a>
- <a href="#release-summary">Release Summary</a>
+ - <a href="#bugfixes">Bugfixes</a>
+- <a href="#v2-0-0">v2\.0\.0</a>
+ - <a href="#release-summary-1">Release Summary</a>
- <a href="#major-changes">Major Changes</a>
- <a href="#minor-changes">Minor Changes</a>
- <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a>
- <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a>
- <a href="#v1-9-2">v1\.9\.2</a>
- - <a href="#release-summary-1">Release Summary</a>
- - <a href="#bugfixes">Bugfixes</a>
-- <a href="#v1-9-1">v1\.9\.1</a>
- <a href="#release-summary-2">Release Summary</a>
+ - <a href="#bugfixes-1">Bugfixes</a>
+- <a href="#v1-9-1">v1\.9\.1</a>
+ - <a href="#release-summary-3">Release Summary</a>
- <a href="#security-fixes">Security Fixes</a>
- <a href="#v1-9-0">v1\.9\.0</a>
- - <a href="#release-summary-3">Release Summary</a>
+ - <a href="#release-summary-4">Release Summary</a>
- <a href="#minor-changes-1">Minor Changes</a>
- <a href="#deprecated-features">Deprecated Features</a>
- <a href="#v1-8-2">v1\.8\.2</a>
- - <a href="#release-summary-4">Release Summary</a>
- - <a href="#bugfixes-1">Bugfixes</a>
-- <a href="#v1-8-1">v1\.8\.1</a>
- <a href="#release-summary-5">Release Summary</a>
+ - <a href="#bugfixes-2">Bugfixes</a>
+- <a href="#v1-8-1">v1\.8\.1</a>
+ - <a href="#release-summary-6">Release Summary</a>
- <a href="#known-issues">Known Issues</a>
- <a href="#v1-8-0">v1\.8\.0</a>
- - <a href="#release-summary-6">Release Summary</a>
+ - <a href="#release-summary-7">Release Summary</a>
- <a href="#major-changes-1">Major Changes</a>
- <a href="#minor-changes-2">Minor Changes</a>
- <a href="#v1-7-0">v1\.7\.0</a>
- - <a href="#release-summary-7">Release Summary</a>
+ - <a href="#release-summary-8">Release Summary</a>
- <a href="#new-modules">New Modules</a>
- <a href="#v1-6-0">v1\.6\.0</a>
- - <a href="#release-summary-8">Release Summary</a>
+ - <a href="#release-summary-9">Release Summary</a>
- <a href="#minor-changes-3">Minor Changes</a>
- <a href="#v1-5-2">v1\.5\.2</a>
- - <a href="#release-summary-9">Release Summary</a>
+ - <a href="#release-summary-10">Release Summary</a>
- <a href="#minor-changes-4">Minor Changes</a>
- <a href="#v1-5-1">v1\.5\.1</a>
- - <a href="#release-summary-10">Release Summary</a>
-- <a href="#v1-5-0">v1\.5\.0</a>
- <a href="#release-summary-11">Release Summary</a>
+- <a href="#v1-5-0">v1\.5\.0</a>
+ - <a href="#release-summary-12">Release Summary</a>
- <a href="#minor-changes-5">Minor Changes</a>
- <a href="#v1-4-0">v1\.4\.0</a>
- - <a href="#release-summary-12">Release Summary</a>
+ - <a href="#release-summary-13">Release Summary</a>
- <a href="#minor-changes-6">Minor Changes</a>
- <a href="#v1-3-1">v1\.3\.1</a>
- - <a href="#release-summary-13">Release Summary</a>
- - <a href="#bugfixes-2">Bugfixes</a>
-- <a href="#v1-3-0">v1\.3\.0</a>
- <a href="#release-summary-14">Release Summary</a>
- - <a href="#minor-changes-7">Minor Changes</a>
- <a href="#bugfixes-3">Bugfixes</a>
-- <a href="#v1-2-3">v1\.2\.3</a>
+- <a href="#v1-3-0">v1\.3\.0</a>
- <a href="#release-summary-15">Release Summary</a>
-- <a href="#v1-2-2">v1\.2\.2</a>
- - <a href="#release-summary-16">Release Summary</a>
+ - <a href="#minor-changes-7">Minor Changes</a>
- <a href="#bugfixes-4">Bugfixes</a>
-- <a href="#v1-2-1">v1\.2\.1</a>
+- <a href="#v1-2-3">v1\.2\.3</a>
+ - <a href="#release-summary-16">Release Summary</a>
+- <a href="#v1-2-2">v1\.2\.2</a>
- <a href="#release-summary-17">Release Summary</a>
+ - <a href="#bugfixes-5">Bugfixes</a>
+- <a href="#v1-2-1">v1\.2\.1</a>
+ - <a href="#release-summary-18">Release Summary</a>
- <a href="#minor-changes-8">Minor Changes</a>
- <a href="#v1-2-0">v1\.2\.0</a>
- - <a href="#release-summary-18">Release Summary</a>
+ - <a href="#release-summary-19">Release Summary</a>
- <a href="#minor-changes-9">Minor Changes</a>
- <a href="#new-modules-1">New Modules</a>
- <a href="#v1-1-1">v1\.1\.1</a>
- - <a href="#release-summary-19">Release Summary</a>
- - <a href="#bugfixes-5">Bugfixes</a>
-- <a href="#v1-1-0">v1\.1\.0</a>
- <a href="#release-summary-20">Release Summary</a>
+ - <a href="#bugfixes-6">Bugfixes</a>
+- <a href="#v1-1-0">v1\.1\.0</a>
+ - <a href="#release-summary-21">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-21">Release Summary</a>
+ - <a href="#release-summary-22">Release Summary</a>
- <a href="#breaking-changes--porting-guide-1">Breaking Changes / Porting Guide</a>
+<a id="v2-0-1"></a>
+## v2\.0\.1
+
+<a id="release-summary"></a>
+### Release Summary
+
+Bugfix release\.
+
+<a id="bugfixes"></a>
+### Bugfixes
+
+* boot \- use PHP array form encoding when sending multiple <code>authorized\_key</code> \([https\://github\.com/ansible\-collections/community\.hrobot/issues/112](https\://github\.com/ansible\-collections/community\.hrobot/issues/112)\, [https\://github\.com/ansible\-collections/community\.hrobot/pull/113](https\://github\.com/ansible\-collections/community\.hrobot/pull/113)\)\.
+
<a id="v2-0-0"></a>
## v2\.0\.0
-<a id="release-summary"></a>
+<a id="release-summary-1"></a>
### Release Summary
-\.\.\.
+New major release 2\.0\.0\.
<a id="major-changes"></a>
### Major Changes
@@ -101,17 +117,17 @@
<a id="removed-features-previously-deprecated"></a>
### Removed Features \(previously deprecated\)
-* The collection no longer supports Ansible\, ansible\-base\, and ansible\-core releases that are currently End of Life at the time of the 2\.0\.0 release\. This means that Ansible 2\.9\, ansible\-base 2\.10\, ansible\-core 2\.11\, ansible\-core 2\.12\, ansible\-core 2\.13\, and ansible\-core 2\.14 are no longer supported\. The collection might still work with these versions\, but it can stop working at any moment without advance notice\, and this will not be considered a bug \([https\://github\.com/ansible\-collections/community\.hrobot/pull/101](https\://github\.com/ansible\-collections/community\.hrobot/pull/101)\)\.
+* The collection no longer supports Ansible\, ansible\-base\, and ansible\-core releases that are currently End of Life at the time of the 2\.0\.0 release\. This means that Ansible 2\.9\, ansible\-base 2\.10\, ansible\-core 2\.11\, ansible\-core 2\.12\, and ansible\-core 2\.13 are no longer supported\. The collection might still work with these versions\, but it can stop working at any moment without advance notice\, and this will not be considered a bug \([https\://github\.com/ansible\-collections/community\.hrobot/pull/101](https\://github\.com/ansible\-collections/community\.hrobot/pull/101)\)\.
<a id="v1-9-2"></a>
## v1\.9\.2
-<a id="release-summary-1"></a>
+<a id="release-summary-2"></a>
### Release Summary
Bugfix release\.
-<a id="bugfixes"></a>
+<a id="bugfixes-1"></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)\)\.
@@ -119,7 +135,7 @@ Bugfix release\.
<a id="v1-9-1"></a>
## v1\.9\.1
-<a id="release-summary-2"></a>
+<a id="release-summary-3"></a>
### Release Summary
Bugfix release\.
@@ -132,7 +148,7 @@ Bugfix release\.
<a id="v1-9-0"></a>
## v1\.9\.0
-<a id="release-summary-3"></a>
+<a id="release-summary-4"></a>
### Release Summary
Feature and maintenance release\.
@@ -150,12 +166,12 @@ Feature and maintenance release\.
<a id="v1-8-2"></a>
## v1\.8\.2
-<a id="release-summary-4"></a>
+<a id="release-summary-5"></a>
### Release Summary
Maintenance release with updated documentation\.
-<a id="bugfixes-1"></a>
+<a id="bugfixes-2"></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)\)\.
@@ -163,7 +179,7 @@ Maintenance release with updated documentation\.
<a id="v1-8-1"></a>
## v1\.8\.1
-<a id="release-summary-5"></a>
+<a id="release-summary-6"></a>
### Release Summary
Maintenance release with updated documentation\.
@@ -184,7 +200,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-6"></a>
+<a id="release-summary-7"></a>
### Release Summary
Feature release for the Hetzner firewall changes\.
@@ -203,7 +219,7 @@ Feature release for the Hetzner firewall changes\.
<a id="v1-7-0"></a>
## v1\.7\.0
-<a id="release-summary-7"></a>
+<a id="release-summary-8"></a>
### Release Summary
Feature release\.
@@ -216,7 +232,7 @@ Feature release\.
<a id="v1-6-0"></a>
## v1\.6\.0
-<a id="release-summary-8"></a>
+<a id="release-summary-9"></a>
### Release Summary
Feature release with improved documentation\.
@@ -229,7 +245,7 @@ Feature release with improved documentation\.
<a id="v1-5-2"></a>
## v1\.5\.2
-<a id="release-summary-9"></a>
+<a id="release-summary-10"></a>
### Release Summary
Maintenance release with a documentation improvement\.
@@ -242,7 +258,7 @@ Maintenance release with a documentation improvement\.
<a id="v1-5-1"></a>
## v1\.5\.1
-<a id="release-summary-10"></a>
+<a id="release-summary-11"></a>
### Release Summary
Maintenance release with small documentation fixes\.
@@ -250,7 +266,7 @@ Maintenance release with small documentation fixes\.
<a id="v1-5-0"></a>
## v1\.5\.0
-<a id="release-summary-11"></a>
+<a id="release-summary-12"></a>
### Release Summary
Maintenance release changing the way licenses are declared\. No functional changes\.
@@ -263,7 +279,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-12"></a>
+<a id="release-summary-13"></a>
### Release Summary
Feature release\.
@@ -276,12 +292,12 @@ Feature release\.
<a id="v1-3-1"></a>
## v1\.3\.1
-<a id="release-summary-13"></a>
+<a id="release-summary-14"></a>
### Release Summary
Maintenance release\.
-<a id="bugfixes-2"></a>
+<a id="bugfixes-3"></a>
### Bugfixes
* Include <code>simplified\_bsd\.txt</code> license file for the <code>robot</code> and <code>failover</code> module utils\.
@@ -289,7 +305,7 @@ Maintenance release\.
<a id="v1-3-0"></a>
## v1\.3\.0
-<a id="release-summary-14"></a>
+<a id="release-summary-15"></a>
### Release Summary
Feature and bugfix release\.
@@ -299,7 +315,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-3"></a>
+<a id="bugfixes-4"></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)\)\.
@@ -307,7 +323,7 @@ Feature and bugfix release\.
<a id="v1-2-3"></a>
## v1\.2\.3
-<a id="release-summary-15"></a>
+<a id="release-summary-16"></a>
### Release Summary
Docs update release\.
@@ -315,12 +331,12 @@ Docs update release\.
<a id="v1-2-2"></a>
## v1\.2\.2
-<a id="release-summary-16"></a>
+<a id="release-summary-17"></a>
### Release Summary
Bugfix release\.
-<a id="bugfixes-4"></a>
+<a id="bugfixes-5"></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)\)\.
@@ -328,7 +344,7 @@ Bugfix release\.
<a id="v1-2-1"></a>
## v1\.2\.1
-<a id="release-summary-17"></a>
+<a id="release-summary-18"></a>
### Release Summary
Maintenance release\.
@@ -341,7 +357,7 @@ Maintenance release\.
<a id="v1-2-0"></a>
## v1\.2\.0
-<a id="release-summary-18"></a>
+<a id="release-summary-19"></a>
### Release Summary
Feature release with multiple new modules\.
@@ -368,12 +384,12 @@ Feature release with multiple new modules\.
<a id="v1-1-1"></a>
## v1\.1\.1
-<a id="release-summary-19"></a>
+<a id="release-summary-20"></a>
### Release Summary
Bugfix release which reduces the number of HTTPS queries for the modules and plugins\.
-<a id="bugfixes-5"></a>
+<a id="bugfixes-6"></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)\)\.
@@ -381,7 +397,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-20"></a>
+<a id="release-summary-21"></a>
### Release Summary
Release with a new inventory plugin\.
@@ -397,7 +413,7 @@ Release with a new inventory plugin\.
<a id="v1-0-0"></a>
## v1\.0\.0
-<a id="release-summary-21"></a>
+<a id="release-summary-22"></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 18407d29f..d1ea2cb36 100644
--- a/ansible_collections/community/hrobot/CHANGELOG.rst
+++ b/ansible_collections/community/hrobot/CHANGELOG.rst
@@ -4,13 +4,26 @@ Community Hetzner Robot Collection Release Notes
.. contents:: Topics
+v2.0.1
+======
+
+Release Summary
+---------------
+
+Bugfix release.
+
+Bugfixes
+--------
+
+- boot - use PHP array form encoding when sending multiple ``authorized_key`` (https://github.com/ansible-collections/community.hrobot/issues/112, https://github.com/ansible-collections/community.hrobot/pull/113).
+
v2.0.0
======
Release Summary
---------------
-...
+New major release 2.0.0.
Major Changes
-------------
@@ -30,7 +43,7 @@ Breaking Changes / Porting Guide
Removed Features (previously deprecated)
----------------------------------------
-- The collection no longer supports Ansible, ansible-base, and ansible-core releases that are currently End of Life at the time of the 2.0.0 release. This means that Ansible 2.9, ansible-base 2.10, ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, and ansible-core 2.14 are no longer supported. The collection might still work with these versions, but it can stop working at any moment without advance notice, and this will not be considered a bug (https://github.com/ansible-collections/community.hrobot/pull/101).
+- The collection no longer supports Ansible, ansible-base, and ansible-core releases that are currently End of Life at the time of the 2.0.0 release. This means that Ansible 2.9, ansible-base 2.10, ansible-core 2.11, ansible-core 2.12, and ansible-core 2.13 are no longer supported. The collection might still work with these versions, but it can stop working at any moment without advance notice, and this will not be considered a bug (https://github.com/ansible-collections/community.hrobot/pull/101).
v1.9.2
======
diff --git a/ansible_collections/community/hrobot/FILES.json b/ansible_collections/community/hrobot/FILES.json
index 1f4f1fc3f..09dec60ac 100644
--- a/ansible_collections/community/hrobot/FILES.json
+++ b/ansible_collections/community/hrobot/FILES.json
@@ -25,7 +25,7 @@
"name": ".github/workflows/ansible-test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "597f0f97a3486451bdf364c20f5b4b899486c0350422811b76fc57922ee50f6a",
+ "chksum_sha256": "85db68b8cc1783c04a9ef87bdafab9b83d16a2612572ad2bdfdbcdf432ddfe56",
"format": 1
},
{
@@ -78,6 +78,13 @@
"format": 1
},
{
+ "name": ".github/patchback.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6a23e48e2562604318540e6ddcac75213ad2c367258d76fc75914e9b939d380e",
+ "format": 1
+ },
+ {
"name": ".reuse",
"ftype": "dir",
"chksum_type": null,
@@ -137,7 +144,7 @@
"name": "changelogs/changelog.yaml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "44809fb2e5dc28dd9948e07f4987e0785b1835f56d82129d2feabd0ac6acd699",
+ "chksum_sha256": "64c7e3e389a931ddebeb7eb9278b37a6ebd88a0f9d798bc288759b818816889a",
"format": 1
},
{
@@ -151,7 +158,7 @@
"name": "changelogs/config.yaml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a7b8fa9406e8d12b8783432c8dcbec5e940b502649eb8d4c1bbc18bcac0c7ede",
+ "chksum_sha256": "d8c47805aa4e71f2eef1541193ba774adbcfefa618767ea031e5ea35a69041fd",
"format": 1
},
{
@@ -277,7 +284,7 @@
"name": "plugins/modules/boot.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6e602be89c58a047b8b0874a462e950340f1ae5c0066876efc3c6826f9fd1464",
+ "chksum_sha256": "f6b543c5f7adcdbdca015e31c3de5fa9ec7cd33a02df683f9b618e1fa75a7a1e",
"format": 1
},
{
@@ -718,7 +725,7 @@
"name": "tests/unit/plugins/modules/test_boot.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c33b5e7c7a0f2c498bbef9143ad11a78f45d72c18bdb185f541c04de5732d540",
+ "chksum_sha256": "94b751bb13debb65839d90a55ae38e6e4907b9d10795e887d8ca35d417e4e21a",
"format": 1
},
{
@@ -799,6 +806,20 @@
"format": 1
},
{
+ "name": "tests/unit/plugins/plugin_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/plugin_utils/test_unsafe.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a4c6a1d48a9c95c74b14ebf8b9f5e00e7d081b9840bfe60ebc1c7e2df401db2",
+ "format": 1
+ },
+ {
"name": "tests/unit/requirements.txt",
"ftype": "file",
"chksum_type": "sha256",
@@ -823,7 +844,7 @@
"name": "CHANGELOG.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "86fd0f752604f3fa70164f00acf0ad9e5d1567c6499701e555eeeedd59c6fbc7",
+ "chksum_sha256": "d3fba45513628cb08c98535d084a23208f1950aabfe2c95041fe4ba86c7ebe7f",
"format": 1
},
{
@@ -837,7 +858,7 @@
"name": "CHANGELOG.rst",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e8ca25b706ccb628b73cd623cc1720c34df09756bc716aa07827c161648207a1",
+ "chksum_sha256": "9c71f9a0c226a55d3c9c7152a5da8755038630125f12609416643b93c766dddb",
"format": 1
},
{
@@ -858,7 +879,7 @@
"name": "README.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "4a16caa53d97e1924daaabaf372ab085aba6fc95af3cca830d1eda04f22ae41d",
+ "chksum_sha256": "533f1aab35a3017269e2eef3f539da137896de77925eabeafae979130ef21a43",
"format": 1
},
{
diff --git a/ansible_collections/community/hrobot/MANIFEST.json b/ansible_collections/community/hrobot/MANIFEST.json
index 65cba09e0..a54f673dd 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": "2.0.0",
+ "version": "2.0.1",
"authors": [
"Felix Fontein (github.com/felixfontein)"
],
@@ -32,7 +32,7 @@
"name": "FILES.json",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "47a01d4394191e0a36c408e3add9b1a0434bfcf4fd39a7d11ba1d7b4cd2f39b8",
+ "chksum_sha256": "ca5f7a213b869f2de3357bd0fc89eec1733f27e3506b7fe77a4bc5b9f247b424",
"format": 1
},
"format": 1
diff --git a/ansible_collections/community/hrobot/README.md b/ansible_collections/community/hrobot/README.md
index 8ef8be19b..d20aee3d3 100644
--- a/ansible_collections/community/hrobot/README.md
+++ b/ansible_collections/community/hrobot/README.md
@@ -5,7 +5,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
-->
# Community Hetzner Robot Collection
-[![CI](https://github.com/ansible-collections/community.hrobot/workflows/CI/badge.svg?event=push)](https://github.com/ansible-collections/community.hrobot/actions) [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.hrobot)](https://codecov.io/gh/ansible-collections/community.hrobot)
+[![CI](https://github.com/ansible-collections/community.hrobot/workflows/CI/badge.svg?event=push)](https://github.com/ansible-collections/community.hrobot/actions)
+[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.hrobot)](https://codecov.io/gh/ansible-collections/community.hrobot)
+[![REUSE status](https://api.reuse.software/badge/github.com/ansible-collections/community.hrobot)](https://api.reuse.software/info/github.com/ansible-collections/community.hrobot)
This repository contains the `community.hrobot` Ansible Collection. The collection includes modules to work with [Hetzner's Robot](https://docs.hetzner.com/robot/).
diff --git a/ansible_collections/community/hrobot/changelogs/changelog.yaml b/ansible_collections/community/hrobot/changelogs/changelog.yaml
index 1862813f3..9fcb1256a 100644
--- a/ansible_collections/community/hrobot/changelogs/changelog.yaml
+++ b/ansible_collections/community/hrobot/changelogs/changelog.yaml
@@ -308,16 +308,24 @@ releases:
minor_changes:
- robot inventory plugin - add ``filter`` option which allows to include and
exclude hosts based on Jinja2 conditions (https://github.com/ansible-collections/community.hrobot/pull/101).
- release_summary: '...
-
- '
+ release_summary: New major release 2.0.0.
removed_features:
- The collection no longer supports Ansible, ansible-base, and ansible-core
releases that are currently End of Life at the time of the 2.0.0 release.
This means that Ansible 2.9, ansible-base 2.10, ansible-core 2.11, ansible-core
- 2.12, ansible-core 2.13, and ansible-core 2.14 are no longer supported. The
- collection might still work with these versions, but it can stop working at
- any moment without advance notice, and this will not be considered a bug (https://github.com/ansible-collections/community.hrobot/pull/101).
+ 2.12, and ansible-core 2.13 are no longer supported. The collection might
+ still work with these versions, but it can stop working at any moment without
+ advance notice, and this will not be considered a bug (https://github.com/ansible-collections/community.hrobot/pull/101).
fragments:
- 2.0.0.yml
release_date: '2024-05-11'
+ 2.0.1:
+ changes:
+ bugfixes:
+ - boot - use PHP array form encoding when sending multiple ``authorized_key``
+ (https://github.com/ansible-collections/community.hrobot/issues/112, https://github.com/ansible-collections/community.hrobot/pull/113).
+ release_summary: Bugfix release.
+ fragments:
+ - 2.0.1.yml
+ - fix-authorized_key-php-array-form-encoding.yml
+ release_date: '2024-06-17'
diff --git a/ansible_collections/community/hrobot/changelogs/config.yaml b/ansible_collections/community/hrobot/changelogs/config.yaml
index ed2ab2a71..3323f697c 100644
--- a/ansible_collections/community/hrobot/changelogs/config.yaml
+++ b/ansible_collections/community/hrobot/changelogs/config.yaml
@@ -36,3 +36,4 @@ sections:
title: Community Hetzner Robot Collection
trivial_section_name: trivial
use_fqcn: true
+add_plugin_period: true
diff --git a/ansible_collections/community/hrobot/plugins/modules/boot.py b/ansible_collections/community/hrobot/plugins/modules/boot.py
index bcf6f3c47..1ba8f36e8 100644
--- a/ansible_collections/community/hrobot/plugins/modules/boot.py
+++ b/ansible_collections/community/hrobot/plugins/modules/boot.py
@@ -284,13 +284,13 @@ BOOT_CONFIGURATION_DATA = [
('rescue', 'rescue', {
'os': ('os', 'os'),
'arch': ('arch', 'arch'),
- 'authorized_keys': ('authorized_key', 'authorized_key'),
+ 'authorized_keys': ('authorized_key', 'authorized_key[]'),
}),
('install_linux', 'linux', {
'dist': ('dist', 'dist'),
'arch': ('arch', 'arch'),
'lang': ('lang', 'lang'),
- 'authorized_keys': ('authorized_key', 'authorized_key'),
+ 'authorized_keys': ('authorized_key', 'authorized_key[]'),
}),
('install_vnc', 'vnc', {
'dist': ('dist', 'dist'),
@@ -404,7 +404,7 @@ def main():
if should is None:
continue
# unfold the return object for the idempotence check to work correctly
- has = existing.get(data_key)
+ has = existing.get(result_key)
if has and option_key == 'authorized_keys':
has = [x['key']['fingerprint'] for x in has]
if isinstance(has, list):
diff --git a/ansible_collections/community/hrobot/tests/unit/plugins/modules/test_boot.py b/ansible_collections/community/hrobot/tests/unit/plugins/modules/test_boot.py
index 7117afb21..87842fbaf 100644
--- a/ansible_collections/community/hrobot/tests/unit/plugins/modules/test_boot.py
+++ b/ansible_collections/community/hrobot/tests/unit/plugins/modules/test_boot.py
@@ -473,9 +473,11 @@ class TestHetznerBoot(BaseTestModule):
.expect_form_value('dist', 'Debian 11 base')
.expect_form_value('arch', '32')
.expect_form_value('lang', 'fr')
- .expect_form_present('authorized_key')
- # .expect_form_value('authorized_key', 'e4:47:42:71:81:62:bf:06:1c:23:fa:f3:8f:7b:6f:d0')
- # .expect_form_value('authorized_key', 'aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99')
+ .expect_form_present('authorized_key[]')
+ .expect_form_values('authorized_key[]', [
+ 'e4:47:42:71:81:62:bf:06:1c:23:fa:f3:8f:7b:6f:d0',
+ 'aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99',
+ ])
.result_json({
'linux': create_linux_active(dist='Debian 11 base', lang='fr', arch=32, authorized_key=[
{
diff --git a/ansible_collections/community/hrobot/tests/unit/plugins/plugin_utils/test_unsafe.py b/ansible_collections/community/hrobot/tests/unit/plugins/plugin_utils/test_unsafe.py
new file mode 100644
index 000000000..f33318a71
--- /dev/null
+++ b/ansible_collections/community/hrobot/tests/unit/plugins/plugin_utils/test_unsafe.py
@@ -0,0 +1,133 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2024, 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
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import pytest
+
+from ansible.utils.unsafe_proxy import AnsibleUnsafe
+
+from ansible_collections.community.hrobot.plugins.plugin_utils.unsafe import (
+ make_unsafe,
+)
+
+
+TEST_MAKE_UNSAFE = [
+ (
+ u'text',
+ [],
+ [
+ (),
+ ],
+ ),
+ (
+ u'{{text}}',
+ [
+ (),
+ ],
+ [],
+ ),
+ (
+ b'text',
+ [],
+ [
+ (),
+ ],
+ ),
+ (
+ b'{{text}}',
+ [
+ (),
+ ],
+ [],
+ ),
+ (
+ {
+ 'skey': 'value',
+ 'ukey': '{{value}}',
+ 1: [
+ 'value',
+ '{{value}}',
+ {
+ 1.0: '{{value}}',
+ 2.0: 'value',
+ },
+ ],
+ },
+ [
+ ('ukey', ),
+ (1, 1),
+ (1, 2, 1.0),
+ ],
+ [
+ ('skey', ),
+ (1, 0),
+ (1, 2, 2.0),
+ ],
+ ),
+ (
+ ['value', '{{value}}'],
+ [
+ (1, ),
+ ],
+ [
+ (0, ),
+ ],
+ ),
+]
+
+
+@pytest.mark.parametrize("value, check_unsafe_paths, check_safe_paths", TEST_MAKE_UNSAFE)
+def test_make_unsafe(value, check_unsafe_paths, check_safe_paths):
+ unsafe_value = make_unsafe(value)
+ assert unsafe_value == value
+ for check_path in check_unsafe_paths:
+ obj = unsafe_value
+ for elt in check_path:
+ obj = obj[elt]
+ assert isinstance(obj, AnsibleUnsafe)
+ for check_path in check_safe_paths:
+ obj = unsafe_value
+ for elt in check_path:
+ obj = obj[elt]
+ assert not isinstance(obj, AnsibleUnsafe)
+
+
+def test_make_unsafe_dict_key():
+ value = {
+ b'test': 1,
+ u'test': 2,
+ }
+ unsafe_value = make_unsafe(value)
+ assert unsafe_value == value
+ for obj in unsafe_value:
+ assert not isinstance(obj, AnsibleUnsafe)
+
+ value = {
+ b'{{test}}': 1,
+ u'{{test}}': 2,
+ }
+ unsafe_value = make_unsafe(value)
+ assert unsafe_value == value
+ for obj in unsafe_value:
+ assert isinstance(obj, AnsibleUnsafe)
+
+
+def test_make_unsafe_set():
+ value = set([b'test', u'test'])
+ unsafe_value = make_unsafe(value)
+ assert unsafe_value == value
+ for obj in unsafe_value:
+ assert not isinstance(obj, AnsibleUnsafe)
+
+ value = set([b'{{test}}', u'{{test}}'])
+ unsafe_value = make_unsafe(value)
+ assert unsafe_value == value
+ for obj in unsafe_value:
+ assert isinstance(obj, AnsibleUnsafe)