diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:22:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:22:20 +0000 |
commit | 18bd2207b6c1977e99a93673a7be099e23f0f547 (patch) | |
tree | 40fd9e5913462a88be6ba24be6953383c5b39874 /ansible_collections/community | |
parent | Releasing progress-linux version 10.0.1+dfsg-1~progress7.99u1. (diff) | |
download | ansible-18bd2207b6c1977e99a93673a7be099e23f0f547.tar.xz ansible-18bd2207b6c1977e99a93673a7be099e23f0f547.zip |
Merging upstream version 10.1.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community')
288 files changed, 13938 insertions, 4952 deletions
diff --git a/ansible_collections/community/dns/.github/workflows/ansible-test.yml b/ansible_collections/community/dns/.github/workflows/ansible-test.yml index d8121c8f7..69005c325 100644 --- a/ansible_collections/community/dns/.github/workflows/ansible-test.yml +++ b/ansible_collections/community/dns/.github/workflows/ansible-test.yml @@ -96,6 +96,7 @@ jobs: - "3.10" - "3.11" - "3.12" + - "3.13" include: # 2.14 - ansible: stable-2.14 diff --git a/ansible_collections/community/dns/CHANGELOG.md b/ansible_collections/community/dns/CHANGELOG.md index 95a940b1c..94c21810a 100644 --- a/ansible_collections/community/dns/CHANGELOG.md +++ b/ansible_collections/community/dns/CHANGELOG.md @@ -2,198 +2,214 @@ **Topics** -- <a href="#v3-0-0">v3\.0\.0</a> +- <a href="#v3-0-1">v3\.0\.1</a> - <a href="#release-summary">Release Summary</a> + - <a href="#bugfixes">Bugfixes</a> +- <a href="#v3-0-0">v3\.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="#bugfixes">Bugfixes</a> -- <a href="#v2-9-0">v2\.9\.0</a> - - <a href="#release-summary-1">Release Summary</a> - <a href="#bugfixes-1">Bugfixes</a> +- <a href="#v2-9-0">v2\.9\.0</a> + - <a href="#release-summary-2">Release Summary</a> + - <a href="#bugfixes-2">Bugfixes</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-2">Release Summary</a> - - <a href="#bugfixes-2">Bugfixes</a> -- <a href="#v2-8-2">v2\.8\.2</a> - <a href="#release-summary-3">Release Summary</a> - - <a href="#security-fixes">Security Fixes</a> - <a href="#bugfixes-3">Bugfixes</a> -- <a href="#v2-8-1">v2\.8\.1</a> +- <a href="#v2-8-2">v2\.8\.2</a> - <a href="#release-summary-4">Release Summary</a> + - <a href="#security-fixes">Security Fixes</a> - <a href="#bugfixes-4">Bugfixes</a> -- <a href="#v2-8-0">v2\.8\.0</a> +- <a href="#v2-8-1">v2\.8\.1</a> - <a href="#release-summary-5">Release Summary</a> - - <a href="#minor-changes-1">Minor Changes</a> - - <a href="#deprecated-features">Deprecated Features</a> - <a href="#bugfixes-5">Bugfixes</a> -- <a href="#v2-7-0">v2\.7\.0</a> +- <a href="#v2-8-0">v2\.8\.0</a> - <a href="#release-summary-6">Release Summary</a> - - <a href="#minor-changes-2">Minor Changes</a> + - <a href="#minor-changes-1">Minor Changes</a> + - <a href="#deprecated-features">Deprecated Features</a> - <a href="#bugfixes-6">Bugfixes</a> -- <a href="#v2-6-4">v2\.6\.4</a> +- <a href="#v2-7-0">v2\.7\.0</a> - <a href="#release-summary-7">Release Summary</a> + - <a href="#minor-changes-2">Minor Changes</a> - <a href="#bugfixes-7">Bugfixes</a> -- <a href="#v2-6-3">v2\.6\.3</a> +- <a href="#v2-6-4">v2\.6\.4</a> - <a href="#release-summary-8">Release Summary</a> - <a href="#bugfixes-8">Bugfixes</a> -- <a href="#v2-6-2">v2\.6\.2</a> +- <a href="#v2-6-3">v2\.6\.3</a> - <a href="#release-summary-9">Release Summary</a> - <a href="#bugfixes-9">Bugfixes</a> -- <a href="#v2-6-1">v2\.6\.1</a> +- <a href="#v2-6-2">v2\.6\.2</a> - <a href="#release-summary-10">Release Summary</a> - <a href="#bugfixes-10">Bugfixes</a> -- <a href="#v2-6-0">v2\.6\.0</a> +- <a href="#v2-6-1">v2\.6\.1</a> - <a href="#release-summary-11">Release Summary</a> - - <a href="#minor-changes-3">Minor Changes</a> - <a href="#bugfixes-11">Bugfixes</a> +- <a href="#v2-6-0">v2\.6\.0</a> + - <a href="#release-summary-12">Release Summary</a> + - <a href="#minor-changes-3">Minor Changes</a> + - <a href="#bugfixes-12">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-12">Release Summary</a> - - <a href="#bugfixes-12">Bugfixes</a> -- <a href="#v2-5-6">v2\.5\.6</a> - <a href="#release-summary-13">Release Summary</a> + - <a href="#bugfixes-13">Bugfixes</a> +- <a href="#v2-5-6">v2\.5\.6</a> + - <a href="#release-summary-14">Release Summary</a> - <a href="#known-issues">Known Issues</a> - <a href="#v2-5-5">v2\.5\.5</a> - - <a href="#release-summary-14">Release Summary</a> - - <a href="#bugfixes-13">Bugfixes</a> -- <a href="#v2-5-4">v2\.5\.4</a> - <a href="#release-summary-15">Release Summary</a> - <a href="#bugfixes-14">Bugfixes</a> -- <a href="#v2-5-3">v2\.5\.3</a> +- <a href="#v2-5-4">v2\.5\.4</a> - <a href="#release-summary-16">Release Summary</a> - <a href="#bugfixes-15">Bugfixes</a> -- <a href="#v2-5-2">v2\.5\.2</a> +- <a href="#v2-5-3">v2\.5\.3</a> - <a href="#release-summary-17">Release Summary</a> - <a href="#bugfixes-16">Bugfixes</a> -- <a href="#v2-5-1">v2\.5\.1</a> +- <a href="#v2-5-2">v2\.5\.2</a> - <a href="#release-summary-18">Release Summary</a> - <a href="#bugfixes-17">Bugfixes</a> -- <a href="#v2-5-0">v2\.5\.0</a> +- <a href="#v2-5-1">v2\.5\.1</a> - <a href="#release-summary-19">Release Summary</a> - - <a href="#minor-changes-4">Minor Changes</a> - - <a href="#deprecated-features-1">Deprecated Features</a> - <a href="#bugfixes-18">Bugfixes</a> -- <a href="#v2-4-2">v2\.4\.2</a> +- <a href="#v2-5-0">v2\.5\.0</a> - <a href="#release-summary-20">Release Summary</a> + - <a href="#minor-changes-4">Minor Changes</a> + - <a href="#deprecated-features-1">Deprecated Features</a> - <a href="#bugfixes-19">Bugfixes</a> -- <a href="#v2-4-1">v2\.4\.1</a> +- <a href="#v2-4-2">v2\.4\.2</a> - <a href="#release-summary-21">Release Summary</a> - <a href="#bugfixes-20">Bugfixes</a> -- <a href="#v2-4-0">v2\.4\.0</a> +- <a href="#v2-4-1">v2\.4\.1</a> - <a href="#release-summary-22">Release Summary</a> - - <a href="#minor-changes-5">Minor Changes</a> - <a href="#bugfixes-21">Bugfixes</a> -- <a href="#v2-3-4">v2\.3\.4</a> +- <a href="#v2-4-0">v2\.4\.0</a> - <a href="#release-summary-23">Release Summary</a> + - <a href="#minor-changes-5">Minor Changes</a> - <a href="#bugfixes-22">Bugfixes</a> -- <a href="#v2-3-3">v2\.3\.3</a> +- <a href="#v2-3-4">v2\.3\.4</a> - <a href="#release-summary-24">Release Summary</a> - <a href="#bugfixes-23">Bugfixes</a> -- <a href="#v2-3-2">v2\.3\.2</a> +- <a href="#v2-3-3">v2\.3\.3</a> - <a href="#release-summary-25">Release Summary</a> - <a href="#bugfixes-24">Bugfixes</a> -- <a href="#v2-3-1">v2\.3\.1</a> +- <a href="#v2-3-2">v2\.3\.2</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-3-0">v2\.3\.0</a> +- <a href="#v2-3-1">v2\.3\.1</a> - <a href="#release-summary-27">Release Summary</a> - - <a href="#minor-changes-7">Minor Changes</a> + - <a href="#minor-changes-6">Minor Changes</a> - <a href="#bugfixes-26">Bugfixes</a> -- <a href="#v2-2-1">v2\.2\.1</a> +- <a href="#v2-3-0">v2\.3\.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-2-0">v2\.2\.0</a> +- <a href="#v2-2-1">v2\.2\.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-1-1">v2\.1\.1</a> +- <a href="#v2-2-0">v2\.2\.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-1-0">v2\.1\.0</a> +- <a href="#v2-1-1">v2\.1\.1</a> - <a href="#release-summary-31">Release Summary</a> - - <a href="#minor-changes-9">Minor Changes</a> - <a href="#bugfixes-30">Bugfixes</a> -- <a href="#v2-0-9">v2\.0\.9</a> +- <a href="#v2-1-0">v2\.1\.0</a> - <a href="#release-summary-32">Release Summary</a> + - <a href="#minor-changes-9">Minor Changes</a> - <a href="#bugfixes-31">Bugfixes</a> -- <a href="#v2-0-8">v2\.0\.8</a> +- <a href="#v2-0-9">v2\.0\.9</a> - <a href="#release-summary-33">Release Summary</a> - <a href="#bugfixes-32">Bugfixes</a> -- <a href="#v2-0-7">v2\.0\.7</a> +- <a href="#v2-0-8">v2\.0\.8</a> - <a href="#release-summary-34">Release Summary</a> - <a href="#bugfixes-33">Bugfixes</a> -- <a href="#v2-0-6">v2\.0\.6</a> +- <a href="#v2-0-7">v2\.0\.7</a> - <a href="#release-summary-35">Release Summary</a> - <a href="#bugfixes-34">Bugfixes</a> -- <a href="#v2-0-5">v2\.0\.5</a> +- <a href="#v2-0-6">v2\.0\.6</a> - <a href="#release-summary-36">Release Summary</a> - <a href="#bugfixes-35">Bugfixes</a> -- <a href="#v2-0-4">v2\.0\.4</a> +- <a href="#v2-0-5">v2\.0\.5</a> - <a href="#release-summary-37">Release Summary</a> - <a href="#bugfixes-36">Bugfixes</a> -- <a href="#v2-0-3">v2\.0\.3</a> +- <a href="#v2-0-4">v2\.0\.4</a> - <a href="#release-summary-38">Release Summary</a> + - <a href="#bugfixes-37">Bugfixes</a> +- <a href="#v2-0-3">v2\.0\.3</a> + - <a href="#release-summary-39">Release Summary</a> - <a href="#minor-changes-10">Minor Changes</a> - <a href="#v2-0-2">v2\.0\.2</a> - - <a href="#release-summary-39">Release Summary</a> - - <a href="#bugfixes-37">Bugfixes</a> -- <a href="#v2-0-1">v2\.0\.1</a> - <a href="#release-summary-40">Release Summary</a> - <a href="#bugfixes-38">Bugfixes</a> -- <a href="#v2-0-0">v2\.0\.0</a> +- <a href="#v2-0-1">v2\.0\.1</a> - <a href="#release-summary-41">Release Summary</a> + - <a href="#bugfixes-39">Bugfixes</a> +- <a href="#v2-0-0">v2\.0\.0</a> + - <a href="#release-summary-42">Release Summary</a> - <a href="#minor-changes-11">Minor Changes</a> - <a href="#breaking-changes--porting-guide-1">Breaking Changes / Porting Guide</a> - <a href="#deprecated-features-2">Deprecated Features</a> - - <a href="#bugfixes-39">Bugfixes</a> + - <a href="#bugfixes-40">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-42">Release Summary</a> - - <a href="#minor-changes-12">Minor Changes</a> - - <a href="#bugfixes-40">Bugfixes</a> -- <a href="#v1-1-0">v1\.1\.0</a> - <a href="#release-summary-43">Release Summary</a> - - <a href="#minor-changes-13">Minor Changes</a> + - <a href="#minor-changes-12">Minor Changes</a> - <a href="#bugfixes-41">Bugfixes</a> -- <a href="#v1-0-1">v1\.0\.1</a> +- <a href="#v1-1-0">v1\.1\.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="#v1-0-0">v1\.0\.0</a> +- <a href="#v1-0-1">v1\.0\.1</a> - <a href="#release-summary-45">Release Summary</a> - <a href="#bugfixes-43">Bugfixes</a> -- <a href="#v0-3-0">v0\.3\.0</a> +- <a href="#v1-0-0">v1\.0\.0</a> - <a href="#release-summary-46">Release Summary</a> - - <a href="#minor-changes-14">Minor Changes</a> - <a href="#bugfixes-44">Bugfixes</a> +- <a href="#v0-3-0">v0\.3\.0</a> + - <a href="#release-summary-47">Release Summary</a> + - <a href="#minor-changes-14">Minor Changes</a> + - <a href="#bugfixes-45">Bugfixes</a> - <a href="#new-modules-2">New Modules</a> - <a href="#v0-2-0">v0\.2\.0</a> - - <a href="#release-summary-47">Release Summary</a> + - <a href="#release-summary-48">Release Summary</a> - <a href="#major-changes-1">Major Changes</a> - <a href="#minor-changes-15">Minor Changes</a> - <a href="#breaking-changes--porting-guide-2">Breaking Changes / Porting Guide</a> - - <a href="#bugfixes-45">Bugfixes</a> + - <a href="#bugfixes-46">Bugfixes</a> - <a href="#new-modules-3">New Modules</a> - <a href="#v0-1-0">v0\.1\.0</a> - - <a href="#release-summary-48">Release Summary</a> + - <a href="#release-summary-49">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="v3-0-1"></a> +## v3\.0\.1 + +<a id="release-summary"></a> +### Release Summary + +Maintenance release with updated PSL\. + +<a id="bugfixes"></a> +### Bugfixes + +* Update Public Suffix List\. + <a id="v3-0-0"></a> ## v3\.0\.0 -<a id="release-summary"></a> +<a id="release-summary-1"></a> ### Release Summary -\.\.\. +New major release\. <a id="major-changes"></a> ### Major Changes @@ -217,11 +233,11 @@ <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 3\.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\.dns/pull/196](https\://github\.com/ansible\-collections/community\.dns/pull/196)\)\. +* The collection no longer supports Ansible\, ansible\-base\, and ansible\-core releases that are currently End of Life at the time of the 3\.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\.dns/pull/196](https\://github\.com/ansible\-collections/community\.dns/pull/196)\)\. * hetzner\_dns\_record\_set\, hetzner\_dns\_record \- the deprecated alias <code>name</code> of the prefix option was removed \([https\://github\.com/ansible\-collections/community\.dns/pull/196](https\://github\.com/ansible\-collections/community\.dns/pull/196)\)\. * hosttech\_dns\_records \- the redirect to the <code>hosttech\_dns\_record\_sets</code> module has been removed \([https\://github\.com/ansible\-collections/community\.dns/pull/196](https\://github\.com/ansible\-collections/community\.dns/pull/196)\)\. -<a id="bugfixes"></a> +<a id="bugfixes-1"></a> ### Bugfixes * Update Public Suffix List\. @@ -229,12 +245,12 @@ <a id="v2-9-0"></a> ## v2\.9\.0 -<a id="release-summary-1"></a> +<a id="release-summary-2"></a> ### Release Summary Feature and bugfix release\. -<a id="bugfixes-1"></a> +<a id="bugfixes-2"></a> ### Bugfixes * Update Public Suffix List\. @@ -252,12 +268,12 @@ Feature and bugfix release\. <a id="v2-8-3"></a> ## v2\.8\.3 -<a id="release-summary-2"></a> +<a id="release-summary-3"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-2"></a> +<a id="bugfixes-3"></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)\)\. @@ -266,7 +282,7 @@ Bugfix release\. <a id="v2-8-2"></a> ## v2\.8\.2 -<a id="release-summary-3"></a> +<a id="release-summary-4"></a> ### Release Summary Bugfix release\. @@ -276,7 +292,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-3"></a> +<a id="bugfixes-4"></a> ### Bugfixes * Update Public Suffix List\. @@ -284,12 +300,12 @@ Bugfix release\. <a id="v2-8-1"></a> ## v2\.8\.1 -<a id="release-summary-4"></a> +<a id="release-summary-5"></a> ### Release Summary Maintenance release with updated PSL\. -<a id="bugfixes-4"></a> +<a id="bugfixes-5"></a> ### Bugfixes * Update Public Suffix List\. @@ -297,7 +313,7 @@ Maintenance release with updated PSL\. <a id="v2-8-0"></a> ## v2\.8\.0 -<a id="release-summary-5"></a> +<a id="release-summary-6"></a> ### Release Summary Feature and maintenance release with updated PSL\. @@ -312,7 +328,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-5"></a> +<a id="bugfixes-6"></a> ### Bugfixes * Update Public Suffix List\. @@ -320,7 +336,7 @@ Feature and maintenance release with updated PSL\. <a id="v2-7-0"></a> ## v2\.7\.0 -<a id="release-summary-6"></a> +<a id="release-summary-7"></a> ### Release Summary Bugfix and feature release with updated PSL\. @@ -331,7 +347,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-6"></a> +<a id="bugfixes-7"></a> ### Bugfixes * Update Public Suffix List\. @@ -340,12 +356,12 @@ Bugfix and feature release with updated PSL\. <a id="v2-6-4"></a> ## v2\.6\.4 -<a id="release-summary-7"></a> +<a id="release-summary-8"></a> ### Release Summary Bugfix and maintenance version\. -<a id="bugfixes-7"></a> +<a id="bugfixes-8"></a> ### Bugfixes * Update Public Suffix List\. @@ -354,12 +370,12 @@ Bugfix and maintenance version\. <a id="v2-6-3"></a> ## v2\.6\.3 -<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 * 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)\)\. @@ -368,12 +384,12 @@ Maintenance release with updated PSL\. <a id="v2-6-2"></a> ## v2\.6\.2 -<a id="release-summary-9"></a> +<a id="release-summary-10"></a> ### Release Summary Maintenance release with updated PSL\. -<a id="bugfixes-9"></a> +<a id="bugfixes-10"></a> ### Bugfixes * Update Public Suffix List\. @@ -381,12 +397,12 @@ Maintenance release with updated PSL\. <a id="v2-6-1"></a> ## v2\.6\.1 -<a id="release-summary-10"></a> +<a id="release-summary-11"></a> ### Release Summary Maintenance release with updated PSL\. -<a id="bugfixes-10"></a> +<a id="bugfixes-11"></a> ### Bugfixes * Update Public Suffix List\. @@ -394,7 +410,7 @@ Maintenance release with updated PSL\. <a id="v2-6-0"></a> ## v2\.6\.0 -<a id="release-summary-11"></a> +<a id="release-summary-12"></a> ### Release Summary Feature release with an updated Public Suffix List\. @@ -405,7 +421,7 @@ 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-11"></a> +<a id="bugfixes-12"></a> ### Bugfixes * Update Public Suffix List\. @@ -429,12 +445,12 @@ Feature release with an updated Public Suffix List\. <a id="v2-5-7"></a> ## v2\.5\.7 -<a id="release-summary-12"></a> +<a id="release-summary-13"></a> ### Release Summary Regular maintenance release with updated Public Suffix List\. -<a id="bugfixes-12"></a> +<a id="bugfixes-13"></a> ### Bugfixes * Update Public Suffix List\. @@ -442,7 +458,7 @@ Regular maintenance release with updated Public Suffix List\. <a id="v2-5-6"></a> ## v2\.5\.6 -<a id="release-summary-13"></a> +<a id="release-summary-14"></a> ### Release Summary Maintenance release\. @@ -463,12 +479,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-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\. @@ -476,12 +492,12 @@ Maintenance release with updated PSL\. <a id="v2-5-4"></a> ## v2\.5\.4 -<a id="release-summary-15"></a> +<a id="release-summary-16"></a> ### Release Summary Maintenance release with updated PSL\. -<a id="bugfixes-14"></a> +<a id="bugfixes-15"></a> ### Bugfixes * Update Public Suffix List\. @@ -489,12 +505,12 @@ Maintenance release with updated PSL\. <a id="v2-5-3"></a> ## v2\.5\.3 -<a id="release-summary-16"></a> +<a id="release-summary-17"></a> ### Release Summary Maintenance release with updated PSL\. -<a id="bugfixes-15"></a> +<a id="bugfixes-16"></a> ### Bugfixes * Update Public Suffix List\. @@ -502,12 +518,12 @@ Maintenance release with updated PSL\. <a id="v2-5-2"></a> ## v2\.5\.2 -<a id="release-summary-17"></a> +<a id="release-summary-18"></a> ### Release Summary Maintenance release with improved documentation and updated PSL\. -<a id="bugfixes-16"></a> +<a id="bugfixes-17"></a> ### Bugfixes * Update Public Suffix List\. @@ -515,12 +531,12 @@ Maintenance release with improved documentation and updated PSL\. <a id="v2-5-1"></a> ## v2\.5\.1 -<a id="release-summary-18"></a> +<a id="release-summary-19"></a> ### Release Summary Maintenance release \(updated PSL\)\. -<a id="bugfixes-17"></a> +<a id="bugfixes-18"></a> ### Bugfixes * Update Public Suffix List\. @@ -528,7 +544,7 @@ Maintenance release \(updated PSL\)\. <a id="v2-5-0"></a> ## v2\.5\.0 -<a id="release-summary-19"></a> +<a id="release-summary-20"></a> ### Release Summary Feature and bugfix release with updated PSL\. @@ -544,7 +560,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-18"></a> +<a id="bugfixes-19"></a> ### Bugfixes * Update Public Suffix List\. @@ -553,12 +569,12 @@ Feature and bugfix release with updated PSL\. <a id="v2-4-2"></a> ## v2\.4\.2 -<a id="release-summary-20"></a> +<a id="release-summary-21"></a> ### Release Summary Maintenance release with updated Public Suffix List\. -<a id="bugfixes-19"></a> +<a id="bugfixes-20"></a> ### Bugfixes * Update Public Suffix List\. @@ -566,12 +582,12 @@ Maintenance release with updated Public Suffix List\. <a id="v2-4-1"></a> ## v2\.4\.1 -<a id="release-summary-21"></a> +<a id="release-summary-22"></a> ### Release Summary Regular maintenance release\. -<a id="bugfixes-20"></a> +<a id="bugfixes-21"></a> ### Bugfixes * Update Public Suffix List\. @@ -580,7 +596,7 @@ Regular maintenance release\. <a id="v2-4-0"></a> ## v2\.4\.0 -<a id="release-summary-22"></a> +<a id="release-summary-23"></a> ### Release Summary Feature and maintenance release\. @@ -592,7 +608,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-21"></a> +<a id="bugfixes-22"></a> ### Bugfixes * Update Public Suffix List\. @@ -600,12 +616,12 @@ Feature and maintenance release\. <a id="v2-3-4"></a> ## v2\.3\.4 -<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\. @@ -613,12 +629,12 @@ Maintenance release with updated Public Suffix List\. <a id="v2-3-3"></a> ## v2\.3\.3 -<a id="release-summary-24"></a> +<a id="release-summary-25"></a> ### Release Summary Maintenance release including an updated Public Suffix List\. -<a id="bugfixes-23"></a> +<a id="bugfixes-24"></a> ### Bugfixes * Update Public Suffix List\. @@ -626,12 +642,12 @@ Maintenance release including an updated Public Suffix List\. <a id="v2-3-2"></a> ## v2\.3\.2 -<a id="release-summary-25"></a> +<a id="release-summary-26"></a> ### Release Summary Maintenance release with updated Public Suffix List\. -<a id="bugfixes-24"></a> +<a id="bugfixes-25"></a> ### Bugfixes * Update Public Suffix List\. @@ -639,7 +655,7 @@ Maintenance release with updated Public Suffix List\. <a id="v2-3-1"></a> ## v2\.3\.1 -<a id="release-summary-26"></a> +<a id="release-summary-27"></a> ### Release Summary Maintenance release including an updated Public Suffix List\. @@ -649,7 +665,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-25"></a> +<a id="bugfixes-26"></a> ### Bugfixes * Update Public Suffix List\. @@ -657,7 +673,7 @@ Maintenance release including an updated Public Suffix List\. <a id="v2-3-0"></a> ## v2\.3\.0 -<a id="release-summary-27"></a> +<a id="release-summary-28"></a> ### Release Summary Maintenance release including an updated Public Suffix List\. @@ -667,7 +683,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-26"></a> +<a id="bugfixes-27"></a> ### Bugfixes * Update Public Suffix List\. @@ -675,12 +691,12 @@ Maintenance release including an updated Public Suffix List\. <a id="v2-2-1"></a> ## v2\.2\.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\. @@ -688,7 +704,7 @@ Maintenance release with updated Public Suffix List\. <a id="v2-2-0"></a> ## v2\.2\.0 -<a id="release-summary-29"></a> +<a id="release-summary-30"></a> ### Release Summary Feature release\. @@ -699,7 +715,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-28"></a> +<a id="bugfixes-29"></a> ### Bugfixes * Update Public Suffix List\. @@ -707,12 +723,12 @@ Feature release\. <a id="v2-1-1"></a> ## v2\.1\.1 -<a id="release-summary-30"></a> +<a id="release-summary-31"></a> ### Release Summary Maintenance release with updated Public Suffix List\. -<a id="bugfixes-29"></a> +<a id="bugfixes-30"></a> ### Bugfixes * Update Public Suffix List\. @@ -720,7 +736,7 @@ Maintenance release with updated Public Suffix List\. <a id="v2-1-0"></a> ## v2\.1\.0 -<a id="release-summary-31"></a> +<a id="release-summary-32"></a> ### Release Summary Feature and maintenance release with updated PSL\. @@ -730,7 +746,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-30"></a> +<a id="bugfixes-31"></a> ### Bugfixes * Update Public Suffix List\. @@ -738,12 +754,12 @@ Feature and maintenance release with updated PSL\. <a id="v2-0-9"></a> ## v2\.0\.9 -<a id="release-summary-32"></a> +<a id="release-summary-33"></a> ### Release Summary Maintenance release with updated Public Suffix List and added collection links file\. -<a id="bugfixes-31"></a> +<a id="bugfixes-32"></a> ### Bugfixes * Update Public Suffix List\. @@ -751,12 +767,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-33"></a> +<a id="release-summary-34"></a> ### Release Summary Maintenance release with updated Public Suffix List\. -<a id="bugfixes-32"></a> +<a id="bugfixes-33"></a> ### Bugfixes * Update Public Suffix List\. @@ -764,12 +780,12 @@ Maintenance release with updated Public Suffix List\. <a id="v2-0-7"></a> ## v2\.0\.7 -<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\. @@ -777,12 +793,12 @@ Maintenance release with updated Public Suffix List\. <a id="v2-0-6"></a> ## v2\.0\.6 -<a id="release-summary-35"></a> +<a id="release-summary-36"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-34"></a> +<a id="bugfixes-35"></a> ### Bugfixes * Update Public Suffix List\. @@ -791,12 +807,12 @@ Bugfix release\. <a id="v2-0-5"></a> ## v2\.0\.5 -<a id="release-summary-36"></a> +<a id="release-summary-37"></a> ### Release Summary Maintenance release with updated Public Suffix List\. -<a id="bugfixes-35"></a> +<a id="bugfixes-36"></a> ### Bugfixes * Update Public Suffix List\. @@ -804,12 +820,12 @@ Maintenance release with updated Public Suffix List\. <a id="v2-0-4"></a> ## v2\.0\.4 -<a id="release-summary-37"></a> +<a id="release-summary-38"></a> ### Release Summary Maintenance release with updated Public Suffix List\. -<a id="bugfixes-36"></a> +<a id="bugfixes-37"></a> ### Bugfixes * Update Public Suffix List\. @@ -817,7 +833,7 @@ Maintenance release with updated Public Suffix List\. <a id="v2-0-3"></a> ## v2\.0\.3 -<a id="release-summary-38"></a> +<a id="release-summary-39"></a> ### Release Summary Bugfix release\. @@ -830,12 +846,12 @@ Bugfix release\. <a id="v2-0-2"></a> ## v2\.0\.2 -<a id="release-summary-39"></a> +<a id="release-summary-40"></a> ### Release Summary Regular maintenance release\. -<a id="bugfixes-37"></a> +<a id="bugfixes-38"></a> ### Bugfixes * Update Public Suffix List\. @@ -843,12 +859,12 @@ Regular maintenance release\. <a id="v2-0-1"></a> ## v2\.0\.1 -<a id="release-summary-40"></a> +<a id="release-summary-41"></a> ### Release Summary Maintenance release with Public Suffix List updates\. -<a id="bugfixes-38"></a> +<a id="bugfixes-39"></a> ### Bugfixes * Update Public Suffix List\. @@ -856,7 +872,7 @@ Maintenance release with Public Suffix List updates\. <a id="v2-0-0"></a> ## v2\.0\.0 -<a id="release-summary-41"></a> +<a id="release-summary-42"></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\. @@ -896,7 +912,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-39"></a> +<a id="bugfixes-40"></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)\)\. @@ -934,7 +950,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-42"></a> +<a id="release-summary-43"></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\. @@ -946,7 +962,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-40"></a> +<a id="bugfixes-41"></a> ### Bugfixes * Update Public Suffix List\. @@ -955,7 +971,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-43"></a> +<a id="release-summary-44"></a> ### Release Summary Regular maintenance release\. @@ -965,7 +981,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-41"></a> +<a id="bugfixes-42"></a> ### Bugfixes * Update Public Suffix List\. @@ -973,12 +989,12 @@ Regular maintenance release\. <a id="v1-0-1"></a> ## v1\.0\.1 -<a id="release-summary-44"></a> +<a id="release-summary-45"></a> ### Release Summary Regular maintenance release\. -<a id="bugfixes-42"></a> +<a id="bugfixes-43"></a> ### Bugfixes * Update Public Suffix List\. @@ -986,12 +1002,12 @@ Regular maintenance release\. <a id="v1-0-0"></a> ## v1\.0\.0 -<a id="release-summary-45"></a> +<a id="release-summary-46"></a> ### Release Summary First stable release\. -<a id="bugfixes-43"></a> +<a id="bugfixes-44"></a> ### Bugfixes * Update Public Suffix List\. @@ -999,7 +1015,7 @@ First stable release\. <a id="v0-3-0"></a> ## v0\.3\.0 -<a id="release-summary-46"></a> +<a id="release-summary-47"></a> ### Release Summary Fixes bugs\, adds rate limiting for Hosttech JSON API\, and adds a new bulk synchronization module\. @@ -1009,7 +1025,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-44"></a> +<a id="bugfixes-45"></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)\)\. @@ -1023,7 +1039,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-47"></a> +<a id="release-summary-48"></a> ### Release Summary Major refactoring release\, which adds a zone information module and supports HostTech\'s new REST API\. @@ -1048,7 +1064,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-45"></a> +<a id="bugfixes-46"></a> ### Bugfixes * Update Public Suffix List\. @@ -1063,7 +1079,7 @@ 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-48"></a> +<a id="release-summary-49"></a> ### Release Summary Initial public release\. diff --git a/ansible_collections/community/dns/CHANGELOG.rst b/ansible_collections/community/dns/CHANGELOG.rst index 9aef9afb1..e6b701cd5 100644 --- a/ansible_collections/community/dns/CHANGELOG.rst +++ b/ansible_collections/community/dns/CHANGELOG.rst @@ -4,13 +4,26 @@ Community DNS Collection Release Notes .. contents:: Topics +v3.0.1 +====== + +Release Summary +--------------- + +Maintenance release with updated PSL. + +Bugfixes +-------- + +- Update Public Suffix List. + v3.0.0 ====== Release Summary --------------- -... +New major release. Major Changes ------------- @@ -34,7 +47,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 3.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.dns/pull/196). +- The collection no longer supports Ansible, ansible-base, and ansible-core releases that are currently End of Life at the time of the 3.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.dns/pull/196). - hetzner_dns_record_set, hetzner_dns_record - the deprecated alias ``name`` of the prefix option was removed (https://github.com/ansible-collections/community.dns/pull/196). - hosttech_dns_records - the redirect to the ``hosttech_dns_record_sets`` module has been removed (https://github.com/ansible-collections/community.dns/pull/196). diff --git a/ansible_collections/community/dns/FILES.json b/ansible_collections/community/dns/FILES.json index 32915c500..a85f2dd35 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": "02ff9da8ae9991541407a1f05a5b2bafa3d558213b44c63287665d370c4091da", + "chksum_sha256": "09ce4d45716794335067d16a46c785116ade5bbaa5c72a96cbec55e20aff241d", "format": 1 }, { @@ -151,7 +151,7 @@ "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1f73967d9bae45a0341f90dd810cd70afa17786df1d296e5803f18f4d5c4d33c", + "chksum_sha256": "c73945d30fb57acbba2ec70923bfee2e09b09d15b02bc5e9e367241d856cabf4", "format": 1 }, { @@ -165,7 +165,7 @@ "name": "changelogs/config.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e43f412de1a581ff888e1c037718691d86545bf11e07aaf66719f51233fc3d9b", + "chksum_sha256": "972a0999d91ec276eef7c2ccc72576026858e8058fac99ec44a843744b6480f4", "format": 1 }, { @@ -865,7 +865,7 @@ "name": "plugins/public_suffix_list.dat", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "437ffb5d25e5dee3fa4fef0109aac0e37f2f67b03a6787eeb22db831e308efe9", + "chksum_sha256": "1eded65439237a8a4ad9fda2c6ffbaf9967ec4859279783f7a4e40bfb18eb77a", "format": 1 }, { @@ -1117,7 +1117,7 @@ "name": "tests/integration/targets/lookup_lookup/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "34db5ec41377c4c79e1cf83b7f4ac88e29fd0b3c467ddf26104ee21eec89024e", + "chksum_sha256": "41a89304105ac17c7696d2c3e9dd422256a2055e14e170f1426ba52b57d8c2d0", "format": 1 }, { @@ -1145,7 +1145,7 @@ "name": "tests/integration/targets/lookup_lookup_as_dict/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d4d40eff9ec56b5236626dafd6db61fb0ef2c54f15af48dcd0aedf584cabea0c", + "chksum_sha256": "22ffe81a2f0571564fe97fab44d18afd0585ec8f8979214d0f8c8c27d8302f3f", "format": 1 }, { @@ -1971,7 +1971,7 @@ "name": "CHANGELOG.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1489e680b9d05205a48e068d84dc804325584d49005222f1f506f42ad49ae63a", + "chksum_sha256": "f046d34028a1d9d185983d0894d5a9f7266d42f841f2e9350315575cbd2906f3", "format": 1 }, { @@ -1985,7 +1985,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8d243919ca88dbc2725a0b5a94ee622f405d42abcef4d6072f76c6539d1eef5a", + "chksum_sha256": "ad77c5068402f4ba9567514fd2f84a0fcf4e848ee2516441e2985e79b0dad45d", "format": 1 }, { diff --git a/ansible_collections/community/dns/MANIFEST.json b/ansible_collections/community/dns/MANIFEST.json index 08e4d9c66..96ff26597 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": "3.0.0", + "version": "3.0.1", "authors": [ "Felix Fontein (github.com/felixfontein)", "Markus Bergholz (github.com/markuman)" @@ -32,7 +32,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ba0f38847eafe7b48453fb5a53d01010332adb7982622a61061c9df456b18e68", + "chksum_sha256": "cb1e71b18fdd0a007c80538a85f41bc966e033b4d2726595a4310471f787862d", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/dns/changelogs/changelog.yaml b/ansible_collections/community/dns/changelogs/changelog.yaml index 230527b2b..4adb7145b 100644 --- a/ansible_collections/community/dns/changelogs/changelog.yaml +++ b/ansible_collections/community/dns/changelogs/changelog.yaml @@ -859,16 +859,14 @@ releases: should be treated as an absolute domain name (``search=false``), or potentially as a relative domain name (``search=true``) (https://github.com/ansible-collections/community.dns/issues/200, https://github.com/ansible-collections/community.dns/pull/201). - release_summary: '... - - ' + release_summary: New major release. 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 3.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.dns/pull/196). + 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.dns/pull/196). - hetzner_dns_record_set, hetzner_dns_record - the deprecated alias ``name`` of the prefix option was removed (https://github.com/ansible-collections/community.dns/pull/196). - hosttech_dns_records - the redirect to the ``hosttech_dns_record_sets`` module @@ -878,3 +876,12 @@ releases: - 3.0.0.yml - update-psl.yml release_date: '2024-05-19' + 3.0.1: + changes: + bugfixes: + - Update Public Suffix List. + release_summary: Maintenance release with updated PSL. + fragments: + - 3.0.1.yml + - update-psl.yml + release_date: '2024-06-16' diff --git a/ansible_collections/community/dns/changelogs/config.yaml b/ansible_collections/community/dns/changelogs/config.yaml index 06dc33cc8..600c62598 100644 --- a/ansible_collections/community/dns/changelogs/config.yaml +++ b/ansible_collections/community/dns/changelogs/config.yaml @@ -36,3 +36,4 @@ sections: title: Community DNS Collection trivial_section_name: trivial use_fqcn: true +add_plugin_period: true diff --git a/ansible_collections/community/dns/plugins/public_suffix_list.dat b/ansible_collections/community/dns/plugins/public_suffix_list.dat index 05df0af89..8aa631ac8 100644 --- a/ansible_collections/community/dns/plugins/public_suffix_list.dat +++ b/ansible_collections/community/dns/plugins/public_suffix_list.dat @@ -675,7 +675,6 @@ mil.by // second-level domain, but it's being used as one (see www.google.com.by and // www.yahoo.com.by, for example), so we list it here for safety's sake. com.by - // http://hoster.by/ of.by @@ -6710,7 +6709,7 @@ org.zw // newGTLDs -// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2024-05-04T15:12:50Z +// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2024-06-13T15:15:16Z // This list is auto-generated, don't edit it manually. // aaa : American Automobile Association, Inc. // https://www.iana.org/domains/root/db/aaa.html @@ -8976,7 +8975,7 @@ lotte // https://www.iana.org/domains/root/db/lotto.html lotto -// love : Merchant Law Group LLP +// love : Waterford Limited // https://www.iana.org/domains/root/db/love.html love @@ -9228,10 +9227,6 @@ nab // https://www.iana.org/domains/root/db/nagoya.html nagoya -// natura : NATURA COSMÉTICOS S.A. -// https://www.iana.org/domains/root/db/natura.html -natura - // navy : Dog Beach, LLC // https://www.iana.org/domains/root/db/navy.html navy @@ -11387,9 +11382,9 @@ auth-fips.us-west-2.amazoncognito.com // Amazon EC2 // Submitted by Luke Wells <psl-maintainers@amazon.com> // Reference: 4c38fa71-58ac-4768-99e5-689c1767e537 +*.compute.amazonaws.com.cn *.compute.amazonaws.com *.compute-1.amazonaws.com -*.compute.amazonaws.com.cn us-east-1.amazonaws.com // Amazon EMR @@ -12288,26 +12283,26 @@ ju.mp // CentralNic : http://www.centralnic.com/names/domains // Submitted by registry <gavin.brown@centralnic.com> -ae.org +za.bz br.com cn.com -com.de -com.se de.com eu.com -gb.net -hu.net -jp.net jpn.com mex.com ru.com sa.com -se.net uk.com -uk.net us.com -za.bz za.com +com.de +gb.net +hu.net +jp.net +se.net +uk.net +ae.org +com.se // No longer operated by CentralNic, these entries should be adopted and/or removed by current operators // Submitted by Gavin Brown <gavin.brown@centralnic.com> @@ -12328,8 +12323,8 @@ gr.com // Radix FZC : http://domains.in.net // Submitted by Gavin Brown <gavin.brown@centralnic.com> -in.net web.in +in.net // US REGISTRY LLC : http://us.org // Submitted by Gavin Brown <gavin.brown@centralnic.com> @@ -12401,8 +12396,8 @@ cloudaccess.net // cloudControl : https://www.cloudcontrol.com/ // Submitted by Tobias Wilken <tw@cloudcontrol.com> -cloudcontrolled.com cloudcontrolapp.com +cloudcontrolled.com // Cloudera, Inc. : https://www.cloudera.com/ // Submitted by Kedarnath Waikar <security@cloudera.com> @@ -12416,6 +12411,11 @@ trycloudflare.com pages.dev r2.dev workers.dev +cdn.cloudflareanycast.net +cdn.cloudflarecn.net +cdn.cloudflareglobal.net +cloudflare.net +cdn.cloudflare.net // cloudscale.ch AG : https://www.cloudscale.ch/ // Submitted by Gaudenz Steinlin <support@cloudscale.ch> @@ -12442,11 +12442,11 @@ co.cz // Submitted by Jan Krpes <jan.krpes@cdn77.com> cdn77-storage.com rsc.contentproxy9.cz -cdn77-ssl.net r.cdn77.net -ssl.origin.cdn77-secure.org +cdn77-ssl.net c.cdn77.org rsc.cdn77.org +ssl.origin.cdn77-secure.org // Cloud DNS Ltd : http://www.cloudns.net // Submitted by Aleksander Hristov <noc@cloudns.net> & Boyan Peychev <boyan@cloudns.net> @@ -12509,8 +12509,8 @@ test.ru // COSIMO GmbH : http://www.cosimo.de // Submitted by Rene Marticke <rmarticke@cosimo.de> dyn.cosidns.de -dynamisches-dns.de dnsupdater.de +dynamisches-dns.de internet-dns.de l-o-g-i-n.de dynamic-dns.info @@ -12564,9 +12564,9 @@ cyon.site // Danger Science Group: https://dangerscience.com/ // Submitted by Skylar MacDonald <skylar@dangerscience.com> +platform0.app fnwk.site folionetwork.site -platform0.app // Daplie, Inc : https://daplie.com // Submitted by AJ ONeal <aj@daplie.com> @@ -12696,6 +12696,26 @@ dy.fi tunk.org // DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ +dyndns.biz +for-better.biz +for-more.biz +for-some.biz +for-the.biz +selfip.biz +webhop.biz +ftpaccess.cc +game-server.cc +myphotos.cc +scrapping.cc +blogdns.com +cechire.com +dnsalias.com +dnsdojo.com +doesntexist.com +dontexist.com +doomdns.com +dyn-o-saur.com +dynalias.com dyndns-at-home.com dyndns-at-work.com dyndns-blog.com @@ -12710,64 +12730,14 @@ dyndns-server.com dyndns-web.com dyndns-wiki.com dyndns-work.com -dyndns.biz -dyndns.info -dyndns.org -dyndns.tv -at-band-camp.net -ath.cx -barrel-of-knowledge.info -barrell-of-knowledge.info -better-than.tv -blogdns.com -blogdns.net -blogdns.org -blogsite.org -boldlygoingnowhere.org -broke-it.net -buyshouses.net -cechire.com -dnsalias.com -dnsalias.net -dnsalias.org -dnsdojo.com -dnsdojo.net -dnsdojo.org -does-it.net -doesntexist.com -doesntexist.org -dontexist.com -dontexist.net -dontexist.org -doomdns.com -doomdns.org -dvrdns.org -dyn-o-saur.com -dynalias.com -dynalias.net -dynalias.org -dynathome.net -dyndns.ws -endofinternet.net -endofinternet.org -endoftheinternet.org est-a-la-maison.com est-a-la-masion.com est-le-patron.com est-mon-blogueur.com -for-better.biz -for-more.biz -for-our.info -for-some.biz -for-the.biz -forgot.her.name -forgot.his.name from-ak.com from-al.com from-ar.com -from-az.net from-ca.com -from-co.net from-ct.com from-dc.com from-de.com @@ -12780,10 +12750,8 @@ from-il.com from-in.com from-ks.com from-ky.com -from-la.net from-ma.com from-md.com -from-me.org from-mi.com from-mn.com from-mo.com @@ -12796,7 +12764,6 @@ from-nh.com from-nj.com from-nm.com from-nv.com -from-ny.net from-oh.com from-ok.com from-or.com @@ -12814,45 +12781,18 @@ from-wa.com from-wi.com from-wv.com from-wy.com -ftpaccess.cc -fuettertdasnetz.de -game-host.org -game-server.cc getmyip.com -gets-it.net -go.dyndns.org gotdns.com -gotdns.org -groks-the.info -groks-this.info -ham-radio-op.net -here-for-more.info hobby-site.com -hobby-site.org -home.dyndns.org -homedns.org -homeftp.net -homeftp.org -homeip.net homelinux.com -homelinux.net -homelinux.org homeunix.com -homeunix.net -homeunix.org iamallama.com -in-the-band.net is-a-anarchist.com is-a-blogger.com is-a-bookkeeper.com -is-a-bruinsfan.org is-a-bulls-fan.com -is-a-candidate.org is-a-caterer.com -is-a-celticsfan.org is-a-chef.com -is-a-chef.net -is-a-chef.org is-a-conservative.com is-a-cpa.com is-a-cubicle-slave.com @@ -12861,31 +12801,25 @@ is-a-designer.com is-a-doctor.com is-a-financialadvisor.com is-a-geek.com -is-a-geek.net -is-a-geek.org is-a-green.com is-a-guru.com is-a-hard-worker.com is-a-hunter.com -is-a-knight.org is-a-landscaper.com is-a-lawyer.com is-a-liberal.com is-a-libertarian.com -is-a-linux-user.org is-a-llama.com is-a-musician.com is-a-nascarfan.com is-a-nurse.com is-a-painter.com -is-a-patsfan.org is-a-personaltrainer.com is-a-photographer.com is-a-player.com is-a-republican.com is-a-rockstar.com is-a-socialist.com -is-a-soxfan.org is-a-student.com is-a-teacher.com is-a-techie.com @@ -12897,92 +12831,158 @@ is-an-anarchist.com is-an-artist.com is-an-engineer.com is-an-entertainer.com -is-by.us is-certified.com -is-found.org is-gone.com is-into-anime.com is-into-cars.com is-into-cartoons.com is-into-games.com is-leet.com -is-lost.org is-not-certified.com -is-saved.org is-slick.com is-uberleet.com -is-very-bad.org -is-very-evil.org -is-very-good.org -is-very-nice.org -is-very-sweet.org is-with-theband.com isa-geek.com -isa-geek.net -isa-geek.org isa-hockeynut.com issmarterthanyou.com +likes-pie.com +likescandy.com +neat-url.com +saves-the-whales.com +selfip.com +sells-for-less.com +sells-for-u.com +servebbs.com +simple-url.com +space-to-rent.com +teaches-yoga.com +writesthisblog.com +ath.cx +fuettertdasnetz.de isteingeek.de istmein.de -kicks-ass.net -kicks-ass.org -knowsitall.info -land-4-sale.us lebtimnetz.de leitungsen.de -likes-pie.com -likescandy.com +traeumtgerade.de +barrel-of-knowledge.info +barrell-of-knowledge.info +dyndns.info +for-our.info +groks-the.info +groks-this.info +here-for-more.info +knowsitall.info +selfip.info +webhop.info +forgot.her.name +forgot.his.name +at-band-camp.net +blogdns.net +broke-it.net +buyshouses.net +dnsalias.net +dnsdojo.net +does-it.net +dontexist.net +dynalias.net +dynathome.net +endofinternet.net +from-az.net +from-co.net +from-la.net +from-ny.net +gets-it.net +ham-radio-op.net +homeftp.net +homeip.net +homelinux.net +homeunix.net +in-the-band.net +is-a-chef.net +is-a-geek.net +isa-geek.net +kicks-ass.net +office-on-the.net +podzone.net +scrapper-site.net +selfip.net +sells-it.net +servebbs.net +serveftp.net +thruhere.net +webhop.net merseine.nu mine.nu +shacknet.nu +blogdns.org +blogsite.org +boldlygoingnowhere.org +dnsalias.org +dnsdojo.org +doesntexist.org +dontexist.org +doomdns.org +dvrdns.org +dynalias.org +dyndns.org +go.dyndns.org +home.dyndns.org +endofinternet.org +endoftheinternet.org +from-me.org +game-host.org +gotdns.org +hobby-site.org +homedns.org +homeftp.org +homelinux.org +homeunix.org +is-a-bruinsfan.org +is-a-candidate.org +is-a-celticsfan.org +is-a-chef.org +is-a-geek.org +is-a-knight.org +is-a-linux-user.org +is-a-patsfan.org +is-a-soxfan.org +is-found.org +is-lost.org +is-saved.org +is-very-bad.org +is-very-evil.org +is-very-good.org +is-very-nice.org +is-very-sweet.org +isa-geek.org +kicks-ass.org misconfused.org -mypets.ws -myphotos.cc -neat-url.com -office-on-the.net -on-the-web.tv -podzone.net podzone.org readmyblog.org -saves-the-whales.com -scrapper-site.net -scrapping.cc -selfip.biz -selfip.com -selfip.info -selfip.net selfip.org -sells-for-less.com -sells-for-u.com -sells-it.net sellsyourhome.org -servebbs.com -servebbs.net servebbs.org -serveftp.net serveftp.org servegame.org -shacknet.nu -simple-url.com -space-to-rent.com stuff-4-sale.org -stuff-4-sale.us -teaches-yoga.com -thruhere.net -traeumtgerade.de -webhop.biz -webhop.info -webhop.net webhop.org +better-than.tv +dyndns.tv +on-the-web.tv worse-than.tv -writesthisblog.com +is-by.us +land-4-sale.us +stuff-4-sale.us +dyndns.ws +mypets.ws // ddnss.de : https://www.ddnss.de/ // Submitted by Robert Niedziela <webmaster@ddnss.de> ddnss.de dyn.ddnss.de dyndns.ddnss.de -dyndns1.de dyn-ip24.de +dyndns1.de home-webserver.de dyn.home-webserver.de myhome-server.de @@ -12990,8 +12990,8 @@ ddnss.org // Definima : http://www.definima.com/ // Submitted by Maxence Bitterli <maxence@definima.com> -definima.net definima.io +definima.net // DigitalOcean App Platform : https://www.digitalocean.com/products/app-platform/ // Submitted by Braxton Huggins <psl-maintainers@digitalocean.com> @@ -13046,6 +13046,14 @@ easypanel.host // Submitted by <infracloudteam@namecheap.com> *.ewp.live +// eDirect Corp. : https://hosting.url.com.tw/ +// Submitted by C.S. chang <cschang@corp.url.com.tw> +twmail.cc +twmail.net +twmail.org +mymailer.com.tw +url.tw + // Electromagnetic Field : https://www.emfcamp.org // Submitted by <noc@emfcamp.org> at.emf.camp @@ -13064,7 +13072,7 @@ elementor.cool en-root.fr // Enalean SAS: https://www.enalean.com -// Submitted by Thomas Cottier <thomas.cottier@enalean.com> +// Submitted by Enalean Security Team <security@enalean.com> mytuleap.com tuleap-partners.com @@ -13156,19 +13164,16 @@ us-2.evennode.com us-3.evennode.com us-4.evennode.com +// Evervault : https://evervault.com +// Submitted by Hannah Neary <engineering@evervault.com> +relay.evervault.app +relay.evervault.dev + // Expo : https://expo.dev/ // Submitted by James Ide <psl@expo.dev> expo.app staging.expo.app -// eDirect Corp. : https://hosting.url.com.tw/ -// Submitted by C.S. chang <cschang@corp.url.com.tw> -twmail.cc -twmail.net -twmail.org -mymailer.com.tw -url.tw - // Fabrica Technologies, Inc. : https://www.fabrica.dev/ // Submitted by Eric Jiang <eric@fabrica.dev> onfabrica.com @@ -13259,8 +13264,6 @@ u.channelsdvr.net edgecompute.app fastly-edge.com fastly-terrarium.com -fastlylb.net -map.fastlylb.net freetls.fastly.net map.fastly.net a.prod.fastly.net @@ -13268,6 +13271,8 @@ global.prod.fastly.net a.ssl.fastly.net b.ssl.fastly.net global.ssl.fastly.net +fastlylb.net +map.fastlylb.net // Fastmail : https://www.fastmail.com/ // Submitted by Marc Bradshaw <marc@fastmailteam.com> @@ -13337,8 +13342,8 @@ flutterflow.app // fly.io: https://fly.io // Submitted by Kurt Mackey <kurt@fly.io> fly.dev -edgeapp.net shw.io +edgeapp.net // Flynn : https://flynn.io // Submitted by Jonathan Rudenberg <jonathan@flynn.io> @@ -13427,6 +13432,8 @@ aliases121.com // GDS : https://www.gov.uk/service-manual/technology/managing-domain-names // Submitted by Stephen Ford <hostmaster@digital.cabinet-office.gov.uk> +campaign.gov.uk +service.gov.uk independent-commission.uk independent-inquest.uk independent-inquiry.uk @@ -13434,8 +13441,6 @@ independent-panel.uk independent-review.uk public-inquiry.uk royal-commission.uk -campaign.gov.uk -service.gov.uk // CDDO : https://www.gov.uk/guidance/get-an-api-domain-on-govuk // Submitted by Jamie Tanna <jamie.tanna@digital.cabinet-office.gov.uk> @@ -13624,12 +13629,30 @@ goip.de // Google, Inc. // Submitted by Shannon McCabe <public-suffix-editors@google.com> +blogspot.ae +blogspot.al +blogspot.am *.hosted.app *.run.app web.app +blogspot.com.ar +blogspot.co.at +blogspot.com.au +blogspot.ba +blogspot.be +blogspot.bg +blogspot.bj +blogspot.com.br +blogspot.com.by +blogspot.ca +blogspot.cf +blogspot.ch +blogspot.cl +blogspot.com.co *.0emm.com appspot.com *.r.appspot.com +blogspot.com codespot.com googleapis.com googlecode.com @@ -13637,58 +13660,32 @@ pagespeedmobilizer.com publishproxy.com withgoogle.com withyoutube.com -*.gateway.dev -cloud.goog -translate.goog -*.usercontent.goog -cloudfunctions.net -blogspot.ae -blogspot.al -blogspot.am -blogspot.ba -blogspot.be -blogspot.bg -blogspot.bj -blogspot.ca -blogspot.cf -blogspot.ch -blogspot.cl -blogspot.co.at -blogspot.co.id -blogspot.co.il -blogspot.co.ke -blogspot.co.nz -blogspot.co.uk -blogspot.co.za -blogspot.com -blogspot.com.ar -blogspot.com.au -blogspot.com.br -blogspot.com.by -blogspot.com.co -blogspot.com.cy -blogspot.com.ee -blogspot.com.eg -blogspot.com.es -blogspot.com.mt -blogspot.com.ng -blogspot.com.tr -blogspot.com.uy blogspot.cv +blogspot.com.cy blogspot.cz blogspot.de +*.gateway.dev blogspot.dk +blogspot.com.ee +blogspot.com.eg +blogspot.com.es blogspot.fi blogspot.fr +cloud.goog +translate.goog +*.usercontent.goog blogspot.gr blogspot.hk blogspot.hr blogspot.hu +blogspot.co.id blogspot.ie +blogspot.co.il blogspot.in blogspot.is blogspot.it blogspot.jp +blogspot.co.ke blogspot.kr blogspot.li blogspot.lt @@ -13696,10 +13693,14 @@ blogspot.lu blogspot.md blogspot.mk blogspot.mr +blogspot.com.mt blogspot.mx blogspot.my +cloudfunctions.net +blogspot.com.ng blogspot.nl blogspot.no +blogspot.co.nz blogspot.pe blogspot.pt blogspot.qa @@ -13713,9 +13714,13 @@ blogspot.si blogspot.sk blogspot.sn blogspot.td +blogspot.com.tr blogspot.tw blogspot.ug +blogspot.co.uk +blogspot.com.uy blogspot.vn +blogspot.co.za // Goupile : https://goupile.fr // Submitted by Niels Martignene <hello@goupile.fr> @@ -13748,8 +13753,8 @@ conf.se // Handshake : https://handshake.org // Submitted by Mike Damm <md@md.vc> -hs.zone hs.run +hs.zone // Hashbang : https://hashbang.sh hashbang.sh @@ -13768,6 +13773,10 @@ pages.it.hs-heilbronn.de helioho.st heliohost.us +// HeiyuSpace: https://lazycat.cloud +// Submitted by Xia Bin <admin@lazycat.cloud> +heiyu.space + // Hepforge : https://www.hepforge.org // Submitted by David Grellscheid <admin@hepforge.org> hepforge.org @@ -13822,6 +13831,10 @@ ie.ua // HostyHosting (hostyhosting.com) hostyhosting.io +// Hypernode B.V. : https://www.hypernode.com/ +// Submitted by Cipriano Groenendal <security@nl.team.blue> +hypernode.io + // Häkkinen.fi // Submitted by Eero Häkkinen <Eero+psl@Häkkinen.fi> häkkinen.fi @@ -13842,8 +13855,8 @@ iliadboxos.it // Impertrix Solutions : <https://impertrixcdn.com> // Submitted by Zhixiang Zhao <csuite@impertrix.com> -impertrixcdn.com impertrix.com +impertrixcdn.com // Incsub, LLC: https://incsub.com/ // Submitted by Aaron Edwards <sysadmins@incsub.com> @@ -13860,10 +13873,10 @@ in-berlin.de in-brb.de in-butter.de in-dsl.de -in-dsl.net -in-dsl.org in-vpn.de +in-dsl.net in-vpn.net +in-dsl.org in-vpn.org // info.at : http://www.info.at/ @@ -14038,13 +14051,13 @@ jotelulu.cloud // JouwWeb B.V. : https://www.jouwweb.nl // Submitted by Camilo Sperberg <tech@webador.com> -jouwweb.site webadorsite.com +jouwweb.site // Joyent : https://www.joyent.com/ // Submitted by Brian Bennett <brian.bennett@joyent.com> -*.triton.zone *.cns.joyent.com +*.triton.zone // JS.ORG : http://dns.js.org // Submitted by Stefan Keim <admin@js.org> @@ -14086,8 +14099,8 @@ oya.to // Katholieke Universiteit Leuven: https://www.kuleuven.be // Submitted by Abuse KU Leuven <abuse@kuleuven.be> -kuleuven.cloud ezproxy.kuleuven.be +kuleuven.cloud // .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf co.krd @@ -14095,8 +14108,8 @@ edu.krd // Krellian Ltd. : https://krellian.com // Submitted by Ben Francis <ben@krellian.com> -krellian.net webthings.io +krellian.net // LCube - Professional hosting e.K. : https://www.lcube-webhosting.de // Submitted by Lars Laehn <info@lcube.de> @@ -14130,8 +14143,8 @@ co.technology // linkyard ldt: https://www.linkyard.ch/ // Submitted by Mario Siegenthaler <mario.siegenthaler@linkyard.ch> -linkyard.cloud linkyard-cloud.ch +linkyard.cloud // Linode : https://linode.com // Submitted by <security@linode.com> @@ -14186,18 +14199,19 @@ lugs.org.uk // Lukanet Ltd : https://lukanet.com // Submitted by Anton Avramov <register@lukanet.com> barsy.bg -barsy.co.uk -barsyonline.co.uk +barsy.club barsycenter.com barsyonline.com -barsy.club barsy.de +barsy.dev barsy.eu +barsy.gr barsy.in barsy.info barsy.io barsy.me barsy.menu +barsyonline.menu barsy.mobi barsy.net barsy.online @@ -14205,10 +14219,15 @@ barsy.org barsy.pro barsy.pub barsy.ro +barsy.rs barsy.shop +barsyonline.shop barsy.site +barsy.store barsy.support barsy.uk +barsy.co.uk +barsyonline.co.uk // Magento Commerce // Submitted by Damien Tournoud <dtournoud@magento.cloud> @@ -14239,8 +14258,8 @@ mcpe.me // Submitted by Evgeniy Subbotin <e.subbotin@mchost.ru> mcdir.me mcdir.ru -mcpre.ru vps.mcdir.ru +mcpre.ru // Mediatech : https://mediatech.by // Submitted by Evgeniy Kozhuhovskiy <ugenk@mediatech.by> @@ -14289,10 +14308,9 @@ co.pl // Microsoft Azure : https://home.azure *.azurecontainer.io azure-api.net +azure-mobile.net azureedge.net azurefd.net -azurewebsites.net -azure-mobile.net azurestaticapps.net 1.azurestaticapps.net 2.azurestaticapps.net @@ -14306,6 +14324,7 @@ eastasia.azurestaticapps.net eastus2.azurestaticapps.net westeurope.azurestaticapps.net westus2.azurestaticapps.net +azurewebsites.net cloudapp.net trafficmanager.net blob.core.windows.net @@ -14344,8 +14363,8 @@ pp.ru // Mythic Beasts : https://www.mythic-beasts.com // Submitted by Paul Cammish <kelduum@mythic-beasts.com> hostedpi.com -customer.mythic-beasts.com caracal.mythic-beasts.com +customer.mythic-beasts.com fentiger.mythic-beasts.com lynx.mythic-beasts.com ocelot.mythic-beasts.com @@ -14466,91 +14485,91 @@ nerdpol.ovh // No-IP.com : https://noip.com/ // Submitted by Deven Reza <publicsuffixlist@noip.com> +mmafan.biz +myftp.biz +no-ip.biz +no-ip.ca +fantasyleague.cc +gotdns.ch +3utilities.com blogsyte.com -brasilia.me -cable-modem.org ciscofreak.com -collegefan.org -couchpotatofries.org damnserver.com -ddns.me +ddnsking.com ditchyourip.com -dnsfor.me dnsiskinky.com -dvrcam.info dynns.com -eating-organic.net -fantasyleague.cc geekgalaxy.com -golffan.us health-carereform.com homesecuritymac.com homesecuritypc.com -hopto.me -ilovecollege.info -loginto.me -mlbfan.org -mmafan.biz myactivedirectory.com -mydissent.net -myeffect.net -mymediapc.net -mypsx.net mysecuritycamera.com -mysecuritycamera.net -mysecuritycamera.org +myvnc.com net-freaks.com -nflfan.org -nhlfan.net -no-ip.ca -no-ip.co.uk -no-ip.net -noip.us onthewifi.com -pgafan.net point2this.com -pointto.us -privatizehealthinsurance.net quicksytes.com -read-books.org securitytactics.com +servebeer.com +servecounterstrike.com serveexchange.com +serveftp.com +servegame.com +servehalflife.com +servehttp.com servehumour.com +serveirc.com +servemp3.com servep2p.com +servepics.com +servequake.com servesarcasm.com stufftoread.com -ufcfan.org unusualperson.com workisboring.com -3utilities.com -bounceme.net -ddns.net -ddnsking.com -gotdns.ch -hopto.org -myftp.biz -myftp.org -myvnc.com -no-ip.biz +dvrcam.info +ilovecollege.info no-ip.info -no-ip.org +brasilia.me +ddns.me +dnsfor.me +hopto.me +loginto.me noip.me +webhop.me +bounceme.net +ddns.net +eating-organic.net +mydissent.net +myeffect.net +mymediapc.net +mypsx.net +mysecuritycamera.net +nhlfan.net +no-ip.net +pgafan.net +privatizehealthinsurance.net redirectme.net -servebeer.com serveblog.net -servecounterstrike.com -serveftp.com -servegame.com -servehalflife.com -servehttp.com -serveirc.com serveminecraft.net -servemp3.com -servepics.com -servequake.com sytes.net -webhop.me +cable-modem.org +collegefan.org +couchpotatofries.org +hopto.org +mlbfan.org +myftp.org +mysecuritycamera.org +nflfan.org +no-ip.org +read-books.org +ufcfan.org zapto.org +no-ip.co.uk +golffan.us +noip.us +pointto.us // NodeArt : https://nodeart.io // Submitted by Konstantin Nosov <Nosov@nodeart.io> @@ -14591,25 +14610,25 @@ omniwe.site // One.com: https://www.one.com/ // Submitted by Jacob Bunk Nielsen <jbn@one.com> -123hjemmeside.dk -123hjemmeside.no -123homepage.it -123kotisivu.fi -123minsida.se -123miweb.es -123paginaweb.pt -123siteweb.fr 123webseite.at -123webseite.de 123website.be +simplesite.com.br 123website.ch +simplesite.com +123webseite.de +123hjemmeside.dk +123miweb.es +123kotisivu.fi +123siteweb.fr +simplesite.gr +123homepage.it 123website.lu 123website.nl +123hjemmeside.no service.one -simplesite.com -simplesite.com.br -simplesite.gr simplesite.pl +123paginaweb.pt +123minsida.se // One Fold Media : http://www.onefoldmedia.com/ // Submitted by Eddie Jones <eddie@onefoldmedia.com> @@ -14659,8 +14678,8 @@ outsystemscloud.com // OVHcloud: https://ovhcloud.com // Submitted by Vincent Cassé <vincent.casse@ovhcloud.com> -*.webpaas.ovh.net *.hosting.ovh.net +*.webpaas.ovh.net // OwnProvider GmbH: http://www.ownprovider.com // Submitted by Jan Moennich <jan.moennich@ownprovider.com> @@ -14699,6 +14718,7 @@ pagexl.com // Submitted by Pierre Carrier <pc@rrier.ca> *.xmit.co xmit.dev +madethis.site srv.us gh.srv.us gl.srv.us @@ -14713,8 +14733,8 @@ zakopane.pl // Pantheon Systems, Inc. : https://pantheon.io/ // Submitted by Gary Dylina <gary@pantheon.io> -pantheonsite.io gotpantheon.com +pantheonsite.io // Peplink | Pepwave : http://peplink.com/ // Submitted by Steve Leung <steveleung@peplink.com> @@ -14750,9 +14770,9 @@ platterp.us // Plesk : https://www.plesk.com/ // Submitted by Anton Akhtyamov <program-managers@plesk.com> +pleskns.com pdns.page plesk.page -pleskns.com // Pley AB : https://www.pley.com/ // Submitted by Henning Pohl <infra@pley.com> @@ -14883,8 +14903,8 @@ g.vbrplsbx.io // Rancher Labs, Inc : https://rancher.com // Submitted by Vincent Fiduccia <domains@rancher.com> -*.on-k3s.io *.on-rancher.cloud +*.on-k3s.io *.on-rio.io // Read The Docs, Inc : https://www.readthedocs.org @@ -14897,8 +14917,8 @@ rhcloud.com // Render : https://render.com // Submitted by Anurag Goel <dev@render.com> -app.render.com onrender.com +app.render.com // Repl.it : https://repl.it // Submitted by Lincoln Bergeson <psl@repl.it> @@ -15043,8 +15063,8 @@ sandcats.io // SBE network solutions GmbH : https://www.sbe.de/ // Submitted by Norman Meilick <nm@sbe.de> -logoip.de logoip.com +logoip.de // Scaleway : https://www.scaleway.com/ // Submitted by Rémy Léone <rleone@scaleway.com> @@ -15133,6 +15153,10 @@ biz.ua co.ua pp.ua +// Shanghai Accounting Society : https://www.sasf.org.cn +// Submitted by Information Administration <info@sasf.org.cn> +as.sh.cn + // Sheezy.Art : https://sheezy.art // Submitted by Nyoom <admin@sheezy.art> sheezy.games @@ -15221,6 +15245,10 @@ try-snowplow.com // Submitted by Drew DeVault <sir@cmpwn.com> srht.site +// SparrowHost : https://sparrowhost.in/ +// Submitted by Anant Pandey <info@sparrowhost.in> +ind.mom + // StackBlitz : https://stackblitz.com // Submitted by Dominic Elm <hello@stackblitz.com> w-corp-staticblitz.com @@ -15241,8 +15269,8 @@ stackit.zone // Staclar : https://staclar.com // Submitted by Q Misell <q@staclar.com> -musician.io // Submitted by Matthias Merkel <matthias.merkel@staclar.com> +musician.io novecore.site // staticland : https://static.land @@ -15255,6 +15283,11 @@ sites.static.land // Submitted by Tony Schirmer <tony@storebase.io> storebase.store +// Strapi : https://strapi.io/ +// Submitted by Florent Baldino <security@strapi.io> +strapiapp.com +media.strapiapp.com + // Strategic System Consulting (eApps Hosting): https://www.eapps.com/ // Submitted by Alex Oancea <aoancea@cloudscale365.com> vps-host.net @@ -15354,8 +15387,8 @@ su.paba.se // Symfony, SAS : https://symfony.com/ // Submitted by Fabien Potencier <fabien@symfony.com> -*.s5y.io *.sensiosite.cloud +*.s5y.io // Syncloud : https://syncloud.org // Submitted by Boris Rybalkin <syncloud@syncloud.it> @@ -15377,14 +15410,14 @@ dsmynas.net familyds.net dsmynas.org familyds.org -vpnplus.to direct.quickconnect.to +vpnplus.to // Tabit Technologies Ltd. : https://tabit.cloud/ // Submitted by Oren Agiv <oren@tabit.cloud> -tabitorder.co.il -mytabit.co.il mytabit.com +mytabit.co.il +tabitorder.co.il // TAIFUN Software AG : http://taifun-software.de // Submitted by Bjoern Henke <dev-server@taifun-software.de> @@ -15425,11 +15458,11 @@ telebit.io reservd.com thingdustdata.com cust.dev.thingdust.io +reservd.dev.thingdust.io cust.disrec.thingdust.io +reservd.disrec.thingdust.io cust.prod.thingdust.io cust.testing.thingdust.io -reservd.dev.thingdust.io -reservd.disrec.thingdust.io reservd.testing.thingdust.io // ticket i/O GmbH : https://ticket.io @@ -15491,8 +15524,6 @@ tuxfamily.org // TwoDNS : https://www.twodns.de/ // Submitted by TwoDNS-Support <support@two-dns.de> dd-dns.de -diskstation.eu -diskstation.org dray-dns.de draydns.de dyn-vpn.de @@ -15503,6 +15534,8 @@ my-wan.de syno-ds.de synology-diskstation.de synology-ds.de +diskstation.eu +diskstation.org // Typedream : https://typedream.com // Submitted by Putri Karunia <putri@typedream.com> @@ -15514,15 +15547,15 @@ pro.typeform.com // Uberspace : https://uberspace.de // Submitted by Moritz Werner <mwerner@jonaspasche.com> -uber.space *.uberspace.de +uber.space // UDR Limited : http://www.udr.hk.com // Submitted by registry <hostmaster@udr.hk.com> hk.com -hk.org -ltd.hk inc.hk +ltd.hk +hk.org // UK Intis Telecom LTD : https://it.com // Submitted by ITComdomains <to@it.com> @@ -15543,8 +15576,8 @@ org.yt // United Gameserver GmbH : https://united-gameserver.de // Submitted by Stefan Schwarz <sysadm@united-gameserver.de> -virtualuser.de virtual-user.de +virtualuser.de // Upli : https://upli.io // Submitted by Lenny Bakkalian <lenny.bakkalian@gmail.com> @@ -15609,10 +15642,10 @@ webflowtest.io // WebHotelier Technologies Ltd: https://www.webhotelier.net/ // Submitted by Apostolos Tsakpinis <apostolos.tsakpinis@gmail.com> -reserve-online.net -reserve-online.com bookonline.app hotelwithflight.com +reserve-online.com +reserve-online.net // WebWaddle Ltd: https://webwaddle.com/ // Submitted by Merlin Glander <hostmaster@webwaddle.com> @@ -15638,15 +15671,23 @@ pages.wiardweb.com // Wikimedia Labs : https://wikitech.wikimedia.org // Submitted by Arturo Borrero Gonzalez <aborrero@wikimedia.org> -wmflabs.org toolforge.org wmcloud.org +wmflabs.org // WISP : https://wisp.gg // Submitted by Stepan Fedotov <stepan@wisp.gg> panel.gg daemon.panel.gg +// Wix.com, Inc. : https://www.wix.com +// Submitted by Shahar Talmi / Alon Kochba <publicsuffixlist@wix.com> +wixsite.com +wixstudio.com +editorx.io +wixstudio.io +wix.run + // Wizard Zines : https://wizardzines.com // Submitted by Julia Evans <julia@wizardzines.com> messwithdns.com @@ -15672,13 +15713,6 @@ weeklylottery.org.uk wpenginepowered.com js.wpenginepowered.com -// Wix.com, Inc. : https://www.wix.com -// Submitted by Shahar Talmi <shahar@wix.com> -wixsite.com -editorx.io -wixstudio.io -wix.run - // XenonCloud GbR: https://xenoncloud.net // Submitted by Julian Uphoff <publicsuffixlist@xenoncloud.net> half.host diff --git a/ansible_collections/community/dns/tests/integration/targets/lookup_lookup/tasks/main.yml b/ansible_collections/community/dns/tests/integration/targets/lookup_lookup/tasks/main.yml index 52ba9a46c..d5fa9f052 100644 --- a/ansible_collections/community/dns/tests/integration/targets/lookup_lookup/tasks/main.yml +++ b/ansible_collections/community/dns/tests/integration/targets/lookup_lookup/tasks/main.yml @@ -8,7 +8,7 @@ ansible_a: >- {{ query('community.dns.lookup', 'ansible.com', type='A') }} ansible_aaaa: >- - {{ query('community.dns.lookup', 'ansible.com', type='AAAA', server='9.9.9.9') }} + {{ query('community.dns.lookup', 'www.ansible.com', type='AAAA', server='9.9.9.9') }} ansible_txt: >- {{ query('community.dns.lookup', 'ansible.com', type='TXT', server=['1.1.1.1', '8.8.8.8', 'dns9.quad9.net.']) }} ansible_empty: >- diff --git a/ansible_collections/community/dns/tests/integration/targets/lookup_lookup_as_dict/tasks/main.yml b/ansible_collections/community/dns/tests/integration/targets/lookup_lookup_as_dict/tasks/main.yml index 3ba6f52f0..faa9ba2ba 100644 --- a/ansible_collections/community/dns/tests/integration/targets/lookup_lookup_as_dict/tasks/main.yml +++ b/ansible_collections/community/dns/tests/integration/targets/lookup_lookup_as_dict/tasks/main.yml @@ -8,7 +8,7 @@ ansible_a: >- {{ query('community.dns.lookup_as_dict', 'ansible.com', type='A') }} ansible_aaaa: >- - {{ query('community.dns.lookup_as_dict', 'ansible.com', type='AAAA', server='9.9.9.9') }} + {{ query('community.dns.lookup_as_dict', 'www.ansible.com', type='AAAA', server='9.9.9.9') }} ansible_txt: >- {{ query('community.dns.lookup_as_dict', 'ansible.com', type='TXT', server=['1.1.1.1', '8.8.8.8', 'dns9.quad9.net.']) }} ansible_empty: >- diff --git a/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml b/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml index ae4197a4a..4f22d28b9 100644 --- a/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml +++ b/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml @@ -46,7 +46,7 @@ variables: resources: containers: - container: default - image: quay.io/ansible/azure-pipelines-test-container:4.0.1 + image: quay.io/ansible/azure-pipelines-test-container:6.0.0 pool: Standard diff --git a/ansible_collections/community/docker/.github/workflows/ansible-test.yml b/ansible_collections/community/docker/.github/workflows/ansible-test.yml index d4778e091..3afb663ac 100644 --- a/ansible_collections/community/docker/.github/workflows/ansible-test.yml +++ b/ansible_collections/community/docker/.github/workflows/ansible-test.yml @@ -120,18 +120,6 @@ jobs: include: # 2.11 - ansible: '2.11' - docker: fedora32 - python: '' - target: azp/4/ - - ansible: '2.11' - docker: fedora32 - python: '' - target: azp/5/ - - ansible: '2.11' - docker: fedora32 - python: '' - target: azp/6/ - - ansible: '2.11' docker: alpine3 python: '' target: azp/4/ diff --git a/ansible_collections/community/docker/.github/workflows/ee.yml b/ansible_collections/community/docker/.github/workflows/ee.yml index d884f56ef..adc5f5550 100644 --- a/ansible_collections/community/docker/.github/workflows/ee.yml +++ b/ansible_collections/community/docker/.github/workflows/ee.yml @@ -70,14 +70,6 @@ jobs: package_system: python39 python39-pip python39-wheel python39-cryptography base_image: docker.io/redhat/ubi8:latest pre_base: '"#"' - - name: ansible-core 2.12 @ CentOS Stream 8 - ansible_core: https://github.com/ansible/ansible/archive/stable-2.12.tar.gz - ansible_runner: ansible-runner - other_deps: |2 - python_interpreter: - package_system: python39 python39-pip python39-wheel python39-cryptography - base_image: quay.io/centos/centos:stream8 - pre_base: '"#"' runs-on: ubuntu-latest steps: - name: Check out code diff --git a/ansible_collections/community/docker/CHANGELOG.md b/ansible_collections/community/docker/CHANGELOG.md index 13d287f2e..da43b356c 100644 --- a/ansible_collections/community/docker/CHANGELOG.md +++ b/ansible_collections/community/docker/CHANGELOG.md @@ -2,248 +2,251 @@ **Topics** -- <a href="#v3-10-3">v3\.10\.3</a> +- <a href="#v3-10-4">v3\.10\.4</a> - <a href="#release-summary">Release Summary</a> - <a href="#bugfixes">Bugfixes</a> -- <a href="#v3-10-2">v3\.10\.2</a> +- <a href="#v3-10-3">v3\.10\.3</a> - <a href="#release-summary-1">Release Summary</a> - <a href="#bugfixes-1">Bugfixes</a> -- <a href="#v3-10-1">v3\.10\.1</a> +- <a href="#v3-10-2">v3\.10\.2</a> - <a href="#release-summary-2">Release Summary</a> - <a href="#bugfixes-2">Bugfixes</a> +- <a href="#v3-10-1">v3\.10\.1</a> + - <a href="#release-summary-3">Release Summary</a> + - <a href="#bugfixes-3">Bugfixes</a> - <a href="#known-issues">Known Issues</a> - <a href="#v3-10-0">v3\.10\.0</a> - - <a href="#release-summary-3">Release Summary</a> + - <a href="#release-summary-4">Release Summary</a> - <a href="#minor-changes">Minor Changes</a> - <a href="#deprecated-features">Deprecated Features</a> - <a href="#v3-9-0">v3\.9\.0</a> - - <a href="#release-summary-4">Release Summary</a> + - <a href="#release-summary-5">Release Summary</a> - <a href="#minor-changes-1">Minor Changes</a> - - <a href="#bugfixes-3">Bugfixes</a> + - <a href="#bugfixes-4">Bugfixes</a> - <a href="#v3-8-1">v3\.8\.1</a> - - <a href="#release-summary-5">Release Summary</a> + - <a href="#release-summary-6">Release Summary</a> - <a href="#security-fixes">Security Fixes</a> - - <a href="#bugfixes-4">Bugfixes</a> + - <a href="#bugfixes-5">Bugfixes</a> - <a href="#v3-8-0">v3\.8\.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="#bugfixes-5">Bugfixes</a> + - <a href="#bugfixes-6">Bugfixes</a> - <a href="#v3-7-0">v3\.7\.0</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="#bugfixes-6">Bugfixes</a> + - <a href="#bugfixes-7">Bugfixes</a> - <a href="#new-modules">New Modules</a> - <a href="#v3-6-0">v3\.6\.0</a> - - <a href="#release-summary-8">Release Summary</a> + - <a href="#release-summary-9">Release Summary</a> - <a href="#major-changes">Major Changes</a> - <a href="#minor-changes-4">Minor Changes</a> - - <a href="#bugfixes-7">Bugfixes</a> + - <a href="#bugfixes-8">Bugfixes</a> - <a href="#new-modules-1">New Modules</a> - <a href="#v3-5-0">v3\.5\.0</a> - - <a href="#release-summary-9">Release Summary</a> + - <a href="#release-summary-10">Release Summary</a> - <a href="#minor-changes-5">Minor Changes</a> - <a href="#deprecated-features-1">Deprecated Features</a> - - <a href="#bugfixes-8">Bugfixes</a> -- <a href="#v3-4-11">v3\.4\.11</a> - - <a href="#release-summary-10">Release Summary</a> - <a href="#bugfixes-9">Bugfixes</a> -- <a href="#v3-4-10">v3\.4\.10</a> +- <a href="#v3-4-11">v3\.4\.11</a> - <a href="#release-summary-11">Release Summary</a> - <a href="#bugfixes-10">Bugfixes</a> -- <a href="#v3-4-9">v3\.4\.9</a> +- <a href="#v3-4-10">v3\.4\.10</a> - <a href="#release-summary-12">Release Summary</a> - <a href="#bugfixes-11">Bugfixes</a> -- <a href="#v3-4-8">v3\.4\.8</a> +- <a href="#v3-4-9">v3\.4\.9</a> - <a href="#release-summary-13">Release Summary</a> + - <a href="#bugfixes-12">Bugfixes</a> +- <a href="#v3-4-8">v3\.4\.8</a> + - <a href="#release-summary-14">Release Summary</a> - <a href="#known-issues-1">Known Issues</a> - <a href="#v3-4-7">v3\.4\.7</a> - - <a href="#release-summary-14">Release Summary</a> - - <a href="#bugfixes-12">Bugfixes</a> -- <a href="#v3-4-6">v3\.4\.6</a> - <a href="#release-summary-15">Release Summary</a> - <a href="#bugfixes-13">Bugfixes</a> - - <a href="#known-issues-2">Known Issues</a> -- <a href="#v3-4-5">v3\.4\.5</a> +- <a href="#v3-4-6">v3\.4\.6</a> - <a href="#release-summary-16">Release Summary</a> - <a href="#bugfixes-14">Bugfixes</a> -- <a href="#v3-4-4">v3\.4\.4</a> + - <a href="#known-issues-2">Known Issues</a> +- <a href="#v3-4-5">v3\.4\.5</a> - <a href="#release-summary-17">Release Summary</a> + - <a href="#bugfixes-15">Bugfixes</a> +- <a href="#v3-4-4">v3\.4\.4</a> + - <a href="#release-summary-18">Release Summary</a> - <a href="#minor-changes-6">Minor Changes</a> - <a href="#known-issues-3">Known Issues</a> - <a href="#v3-4-3">v3\.4\.3</a> - - <a href="#release-summary-18">Release Summary</a> -- <a href="#v3-4-2">v3\.4\.2</a> - <a href="#release-summary-19">Release Summary</a> - - <a href="#bugfixes-15">Bugfixes</a> -- <a href="#v3-4-1">v3\.4\.1</a> +- <a href="#v3-4-2">v3\.4\.2</a> - <a href="#release-summary-20">Release Summary</a> - <a href="#bugfixes-16">Bugfixes</a> -- <a href="#v3-4-0">v3\.4\.0</a> +- <a href="#v3-4-1">v3\.4\.1</a> - <a href="#release-summary-21">Release Summary</a> - - <a href="#minor-changes-7">Minor Changes</a> - <a href="#bugfixes-17">Bugfixes</a> - - <a href="#new-modules-2">New Modules</a> -- <a href="#v3-3-2">v3\.3\.2</a> +- <a href="#v3-4-0">v3\.4\.0</a> - <a href="#release-summary-22">Release Summary</a> + - <a href="#minor-changes-7">Minor Changes</a> - <a href="#bugfixes-18">Bugfixes</a> -- <a href="#v3-3-1">v3\.3\.1</a> + - <a href="#new-modules-2">New Modules</a> +- <a href="#v3-3-2">v3\.3\.2</a> - <a href="#release-summary-23">Release Summary</a> - <a href="#bugfixes-19">Bugfixes</a> -- <a href="#v3-3-0">v3\.3\.0</a> +- <a href="#v3-3-1">v3\.3\.1</a> - <a href="#release-summary-24">Release Summary</a> - - <a href="#minor-changes-8">Minor Changes</a> - <a href="#bugfixes-20">Bugfixes</a> -- <a href="#v3-2-2">v3\.2\.2</a> +- <a href="#v3-3-0">v3\.3\.0</a> - <a href="#release-summary-25">Release Summary</a> + - <a href="#minor-changes-8">Minor Changes</a> - <a href="#bugfixes-21">Bugfixes</a> -- <a href="#v3-2-1">v3\.2\.1</a> +- <a href="#v3-2-2">v3\.2\.2</a> - <a href="#release-summary-26">Release Summary</a> -- <a href="#v3-2-0">v3\.2\.0</a> + - <a href="#bugfixes-22">Bugfixes</a> +- <a href="#v3-2-1">v3\.2\.1</a> - <a href="#release-summary-27">Release Summary</a> +- <a href="#v3-2-0">v3\.2\.0</a> + - <a href="#release-summary-28">Release Summary</a> - <a href="#minor-changes-9">Minor Changes</a> - <a href="#deprecated-features-2">Deprecated Features</a> - <a href="#v3-1-0">v3\.1\.0</a> - - <a href="#release-summary-28">Release Summary</a> + - <a href="#release-summary-29">Release Summary</a> - <a href="#minor-changes-10">Minor Changes</a> - <a href="#v3-0-2">v3\.0\.2</a> - - <a href="#release-summary-29">Release Summary</a> - - <a href="#bugfixes-22">Bugfixes</a> -- <a href="#v3-0-1">v3\.0\.1</a> - <a href="#release-summary-30">Release Summary</a> - <a href="#bugfixes-23">Bugfixes</a> -- <a href="#v3-0-0">v3\.0\.0</a> +- <a href="#v3-0-1">v3\.0\.1</a> - <a href="#release-summary-31">Release Summary</a> + - <a href="#bugfixes-24">Bugfixes</a> +- <a href="#v3-0-0">v3\.0\.0</a> + - <a href="#release-summary-32">Release Summary</a> - <a href="#major-changes-1">Major Changes</a> - <a href="#minor-changes-11">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="#security-fixes-1">Security Fixes</a> - - <a href="#bugfixes-24">Bugfixes</a> + - <a href="#bugfixes-25">Bugfixes</a> - <a href="#v2-7-0">v2\.7\.0</a> - - <a href="#release-summary-32">Release Summary</a> + - <a href="#release-summary-33">Release Summary</a> - <a href="#minor-changes-12">Minor Changes</a> - <a href="#deprecated-features-3">Deprecated Features</a> - - <a href="#bugfixes-25">Bugfixes</a> + - <a href="#bugfixes-26">Bugfixes</a> - <a href="#v2-6-0">v2\.6\.0</a> - - <a href="#release-summary-33">Release Summary</a> + - <a href="#release-summary-34">Release Summary</a> - <a href="#minor-changes-13">Minor Changes</a> - <a href="#deprecated-features-4">Deprecated Features</a> - - <a href="#bugfixes-26">Bugfixes</a> -- <a href="#v2-5-1">v2\.5\.1</a> - - <a href="#release-summary-34">Release Summary</a> - <a href="#bugfixes-27">Bugfixes</a> -- <a href="#v2-5-0">v2\.5\.0</a> +- <a href="#v2-5-1">v2\.5\.1</a> - <a href="#release-summary-35">Release Summary</a> + - <a href="#bugfixes-28">Bugfixes</a> +- <a href="#v2-5-0">v2\.5\.0</a> + - <a href="#release-summary-36">Release Summary</a> - <a href="#minor-changes-14">Minor Changes</a> - <a href="#v2-4-0">v2\.4\.0</a> - - <a href="#release-summary-36">Release Summary</a> - - <a href="#minor-changes-15">Minor Changes</a> - - <a href="#bugfixes-28">Bugfixes</a> -- <a href="#v2-3-0">v2\.3\.0</a> - <a href="#release-summary-37">Release Summary</a> - - <a href="#minor-changes-16">Minor Changes</a> + - <a href="#minor-changes-15">Minor Changes</a> - <a href="#bugfixes-29">Bugfixes</a> -- <a href="#v2-2-1">v2\.2\.1</a> +- <a href="#v2-3-0">v2\.3\.0</a> - <a href="#release-summary-38">Release Summary</a> + - <a href="#minor-changes-16">Minor Changes</a> - <a href="#bugfixes-30">Bugfixes</a> -- <a href="#v2-2-0">v2\.2\.0</a> +- <a href="#v2-2-1">v2\.2\.1</a> - <a href="#release-summary-39">Release Summary</a> - - <a href="#minor-changes-17">Minor Changes</a> - <a href="#bugfixes-31">Bugfixes</a> -- <a href="#v2-1-1">v2\.1\.1</a> +- <a href="#v2-2-0">v2\.2\.0</a> - <a href="#release-summary-40">Release Summary</a> + - <a href="#minor-changes-17">Minor Changes</a> - <a href="#bugfixes-32">Bugfixes</a> -- <a href="#v2-1-0">v2\.1\.0</a> +- <a href="#v2-1-1">v2\.1\.1</a> - <a href="#release-summary-41">Release Summary</a> - - <a href="#minor-changes-18">Minor Changes</a> - <a href="#bugfixes-33">Bugfixes</a> -- <a href="#v2-0-2">v2\.0\.2</a> +- <a href="#v2-1-0">v2\.1\.0</a> - <a href="#release-summary-42">Release Summary</a> + - <a href="#minor-changes-18">Minor Changes</a> - <a href="#bugfixes-34">Bugfixes</a> -- <a href="#v2-0-1">v2\.0\.1</a> +- <a href="#v2-0-2">v2\.0\.2</a> - <a href="#release-summary-43">Release Summary</a> -- <a href="#v2-0-0">v2\.0\.0</a> + - <a href="#bugfixes-35">Bugfixes</a> +- <a href="#v2-0-1">v2\.0\.1</a> - <a href="#release-summary-44">Release Summary</a> +- <a href="#v2-0-0">v2\.0\.0</a> + - <a href="#release-summary-45">Release Summary</a> - <a href="#breaking-changes--porting-guide-1">Breaking Changes / Porting Guide</a> - <a href="#deprecated-features-5">Deprecated Features</a> - <a href="#removed-features-previously-deprecated-1">Removed Features \(previously deprecated\)</a> - <a href="#v1-10-0">v1\.10\.0</a> - - <a href="#release-summary-45">Release Summary</a> + - <a href="#release-summary-46">Release Summary</a> - <a href="#minor-changes-19">Minor Changes</a> - <a href="#v1-9-1">v1\.9\.1</a> - - <a href="#release-summary-46">Release Summary</a> - - <a href="#bugfixes-35">Bugfixes</a> -- <a href="#v1-9-0">v1\.9\.0</a> - <a href="#release-summary-47">Release Summary</a> + - <a href="#bugfixes-36">Bugfixes</a> +- <a href="#v1-9-0">v1\.9\.0</a> + - <a href="#release-summary-48">Release Summary</a> - <a href="#minor-changes-20">Minor Changes</a> - <a href="#deprecated-features-6">Deprecated Features</a> - - <a href="#bugfixes-36">Bugfixes</a> + - <a href="#bugfixes-37">Bugfixes</a> - <a href="#new-plugins">New Plugins</a> - <a href="#connection">Connection</a> - <a href="#v1-8-0">v1\.8\.0</a> - - <a href="#release-summary-48">Release Summary</a> + - <a href="#release-summary-49">Release Summary</a> - <a href="#minor-changes-21">Minor Changes</a> - - <a href="#bugfixes-37">Bugfixes</a> + - <a href="#bugfixes-38">Bugfixes</a> - <a href="#v1-7-0">v1\.7\.0</a> - - <a href="#release-summary-49">Release Summary</a> + - <a href="#release-summary-50">Release Summary</a> - <a href="#minor-changes-22">Minor Changes</a> - <a href="#v1-6-1">v1\.6\.1</a> - - <a href="#release-summary-50">Release Summary</a> - - <a href="#bugfixes-38">Bugfixes</a> -- <a href="#v1-6-0">v1\.6\.0</a> - <a href="#release-summary-51">Release Summary</a> + - <a href="#bugfixes-39">Bugfixes</a> +- <a href="#v1-6-0">v1\.6\.0</a> + - <a href="#release-summary-52">Release Summary</a> - <a href="#minor-changes-23">Minor Changes</a> - <a href="#deprecated-features-7">Deprecated Features</a> - - <a href="#bugfixes-39">Bugfixes</a> + - <a href="#bugfixes-40">Bugfixes</a> - <a href="#v1-5-0">v1\.5\.0</a> - - <a href="#release-summary-52">Release Summary</a> + - <a href="#release-summary-53">Release Summary</a> - <a href="#minor-changes-24">Minor Changes</a> - - <a href="#bugfixes-40">Bugfixes</a> + - <a href="#bugfixes-41">Bugfixes</a> - <a href="#new-modules-3">New Modules</a> - <a href="#v1-4-0">v1\.4\.0</a> - - <a href="#release-summary-53">Release Summary</a> + - <a href="#release-summary-54">Release Summary</a> - <a href="#minor-changes-25">Minor Changes</a> - <a href="#breaking-changes--porting-guide-2">Breaking Changes / Porting Guide</a> - <a href="#security-fixes-2">Security Fixes</a> - - <a href="#bugfixes-41">Bugfixes</a> + - <a href="#bugfixes-42">Bugfixes</a> - <a href="#v1-3-0">v1\.3\.0</a> - - <a href="#release-summary-54">Release Summary</a> + - <a href="#release-summary-55">Release Summary</a> - <a href="#minor-changes-26">Minor Changes</a> - - <a href="#bugfixes-42">Bugfixes</a> + - <a href="#bugfixes-43">Bugfixes</a> - <a href="#new-modules-4">New Modules</a> - <a href="#v1-2-2">v1\.2\.2</a> - - <a href="#release-summary-55">Release Summary</a> + - <a href="#release-summary-56">Release Summary</a> - <a href="#security-fixes-3">Security Fixes</a> - <a href="#v1-2-1">v1\.2\.1</a> - - <a href="#release-summary-56">Release Summary</a> - - <a href="#bugfixes-43">Bugfixes</a> -- <a href="#v1-2-0">v1\.2\.0</a> - <a href="#release-summary-57">Release Summary</a> - - <a href="#minor-changes-27">Minor Changes</a> - <a href="#bugfixes-44">Bugfixes</a> -- <a href="#v1-1-0">v1\.1\.0</a> +- <a href="#v1-2-0">v1\.2\.0</a> - <a href="#release-summary-58">Release Summary</a> + - <a href="#minor-changes-27">Minor Changes</a> + - <a href="#bugfixes-45">Bugfixes</a> +- <a href="#v1-1-0">v1\.1\.0</a> + - <a href="#release-summary-59">Release Summary</a> - <a href="#minor-changes-28">Minor Changes</a> - <a href="#deprecated-features-8">Deprecated Features</a> - - <a href="#bugfixes-45">Bugfixes</a> + - <a href="#bugfixes-46">Bugfixes</a> - <a href="#new-plugins-1">New Plugins</a> - <a href="#connection-1">Connection</a> - <a href="#inventory">Inventory</a> - <a href="#new-modules-5">New Modules</a> - <a href="#v1-0-1">v1\.0\.1</a> - - <a href="#release-summary-59">Release Summary</a> - - <a href="#bugfixes-46">Bugfixes</a> -- <a href="#v1-0-0">v1\.0\.0</a> - <a href="#release-summary-60">Release Summary</a> + - <a href="#bugfixes-47">Bugfixes</a> +- <a href="#v1-0-0">v1\.0\.0</a> + - <a href="#release-summary-61">Release Summary</a> - <a href="#minor-changes-29">Minor Changes</a> - <a href="#v0-1-0">v0\.1\.0</a> - - <a href="#release-summary-61">Release Summary</a> + - <a href="#release-summary-62">Release Summary</a> - <a href="#minor-changes-30">Minor Changes</a> - <a href="#removed-features-previously-deprecated-2">Removed Features \(previously deprecated\)</a> - - <a href="#bugfixes-47">Bugfixes</a> + - <a href="#bugfixes-48">Bugfixes</a> -<a id="v3-10-3"></a> -## v3\.10\.3 +<a id="v3-10-4"></a> +## v3\.10\.4 <a id="release-summary"></a> ### Release Summary @@ -253,17 +256,31 @@ Bugfix release\. <a id="bugfixes"></a> ### Bugfixes +* docker\_compose \- make sure that the module uses the <code>api\_version</code> parameter \([https\://github\.com/ansible\-collections/community\.docker/pull/881](https\://github\.com/ansible\-collections/community\.docker/pull/881)\)\. +* docker\_compose\_v2\* modules \- there was no check to make sure that one of <code>project\_src</code> and <code>definition</code> is provided\. The modules crashed if none were provided \([https\://github\.com/ansible\-collections/community\.docker/issues/885](https\://github\.com/ansible\-collections/community\.docker/issues/885)\, [https\://github\.com/ansible\-collections/community\.docker/pull/886](https\://github\.com/ansible\-collections/community\.docker/pull/886)\)\. + +<a id="v3-10-3"></a> +## v3\.10\.3 + +<a id="release-summary-1"></a> +### Release Summary + +Bugfix release\. + +<a id="bugfixes-1"></a> +### Bugfixes + * docker and nsenter connection plugins\, docker\_container\_exec module \- avoid using the deprecated <code>ansible\.module\_utils\.compat\.selectors</code> module util with Python 3 \([https\://github\.com/ansible\-collections/community\.docker/issues/870](https\://github\.com/ansible\-collections/community\.docker/issues/870)\, [https\://github\.com/ansible\-collections/community\.docker/pull/871](https\://github\.com/ansible\-collections/community\.docker/pull/871)\)\. <a id="v3-10-2"></a> ## v3\.10\.2 -<a id="release-summary-1"></a> +<a id="release-summary-2"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-1"></a> +<a id="bugfixes-2"></a> ### Bugfixes * vendored Docker SDK for Python \- include a fix requests 2\.32\.2\+ compatibility \([https\://github\.com/ansible\-collections/community\.docker/issues/860](https\://github\.com/ansible\-collections/community\.docker/issues/860)\, [https\://github\.com/psf/requests/issues/6707](https\://github\.com/psf/requests/issues/6707)\, [https\://github\.com/ansible\-collections/community\.docker/pull/864](https\://github\.com/ansible\-collections/community\.docker/pull/864)\)\. @@ -271,12 +288,12 @@ Bugfix release\. <a id="v3-10-1"></a> ## v3\.10\.1 -<a id="release-summary-2"></a> +<a id="release-summary-3"></a> ### Release Summary Hotfix release for requests 2\.32\.0 compatibility\. -<a id="bugfixes-2"></a> +<a id="bugfixes-3"></a> ### Bugfixes * vendored Docker SDK for Python \- include a hotfix for requests 2\.32\.0 compatibility \([https\://github\.com/ansible\-collections/community\.docker/issues/860](https\://github\.com/ansible\-collections/community\.docker/issues/860)\, [https\://github\.com/docker/docker\-py/issues/3256](https\://github\.com/docker/docker\-py/issues/3256)\, [https\://github\.com/ansible\-collections/community\.docker/pull/861](https\://github\.com/ansible\-collections/community\.docker/pull/861)\)\. @@ -295,7 +312,7 @@ Hotfix release for requests 2\.32\.0 compatibility\. <a id="v3-10-0"></a> ## v3\.10\.0 -<a id="release-summary-3"></a> +<a id="release-summary-4"></a> ### Release Summary Feature release\. @@ -321,7 +338,7 @@ Feature release\. <a id="v3-9-0"></a> ## v3\.9\.0 -<a id="release-summary-4"></a> +<a id="release-summary-5"></a> ### Release Summary Bugfix and feature release\. @@ -334,7 +351,7 @@ Bugfix and feature release\. * docker\_compose\_v2\* modules \- allow to provide an inline definition of the compose content instead of having to provide a <code>project\_src</code> directory with the compose file written into it \([https\://github\.com/ansible\-collections/community\.docker/issues/829](https\://github\.com/ansible\-collections/community\.docker/issues/829)\, [https\://github\.com/ansible\-collections/community\.docker/pull/832](https\://github\.com/ansible\-collections/community\.docker/pull/832)\)\. * vendored Docker SDK for Python \- remove unused code that relies on functionality deprecated in Python 3\.12 \([https\://github\.com/ansible\-collections/community\.docker/pull/834](https\://github\.com/ansible\-collections/community\.docker/pull/834)\)\. -<a id="bugfixes-3"></a> +<a id="bugfixes-4"></a> ### Bugfixes * docker\_compose\_v2\* \- allow <code>project\_src</code> to be a relative path\, by converting it to an absolute path before using it \([https\://github\.com/ansible\-collections/community\.docker/issues/827](https\://github\.com/ansible\-collections/community\.docker/issues/827)\, [https\://github\.com/ansible\-collections/community\.docker/pull/828](https\://github\.com/ansible\-collections/community\.docker/pull/828)\)\. @@ -344,7 +361,7 @@ Bugfix and feature release\. <a id="v3-8-1"></a> ## v3\.8\.1 -<a id="release-summary-5"></a> +<a id="release-summary-6"></a> ### Release Summary Bugfix release @@ -354,7 +371,7 @@ Bugfix release * docker\_containers\, docker\_machine\, and docker\_swarm inventory plugins \- make sure all data received from the Docker daemon / Docker machine 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\.docker/pull/815](https\://github\.com/ansible\-collections/community\.docker/pull/815)\)\. -<a id="bugfixes-4"></a> +<a id="bugfixes-5"></a> ### Bugfixes * docker\_compose\_v2 \- do not fail when non\-fatal errors occur\. This can happen when pulling an image fails\, but then the image can be built for another service\. Docker Compose emits an error in that case\, but <code>docker compose up</code> still completes successfully \([https\://github\.com/ansible\-collections/community\.docker/issues/807](https\://github\.com/ansible\-collections/community\.docker/issues/807)\, [https\://github\.com/ansible\-collections/community\.docker/pull/810](https\://github\.com/ansible\-collections/community\.docker/pull/810)\, [https\://github\.com/ansible\-collections/community\.docker/pull/811](https\://github\.com/ansible\-collections/community\.docker/pull/811)\)\. @@ -365,7 +382,7 @@ Bugfix release <a id="v3-8-0"></a> ## v3\.8\.0 -<a id="release-summary-6"></a> +<a id="release-summary-7"></a> ### Release Summary Bugfix and feature release\. @@ -377,7 +394,7 @@ Bugfix and feature release\. * docker\_container \- the <code>pull\_check\_mode\_behavior</code> option now allows to control the module\'s behavior in check mode when <code>pull\=always</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/792](https\://github\.com/ansible\-collections/community\.docker/issues/792)\, [https\://github\.com/ansible\-collections/community\.docker/pull/797](https\://github\.com/ansible\-collections/community\.docker/pull/797)\)\. * docker\_container \- the <code>pull</code> option now accepts the three values <code>never</code>\, <code>missing\_image</code> \(default\)\, and <code>never</code>\, next to the previously valid values <code>true</code> \(equivalent to <code>always</code>\) and <code>false</code> \(equivalent to <code>missing\_image</code>\)\. This allows the equivalent to <code>\-\-pull\=never</code> from the Docker command line \([https\://github\.com/ansible\-collections/community\.docker/issues/783](https\://github\.com/ansible\-collections/community\.docker/issues/783)\, [https\://github\.com/ansible\-collections/community\.docker/pull/797](https\://github\.com/ansible\-collections/community\.docker/pull/797)\)\. -<a id="bugfixes-5"></a> +<a id="bugfixes-6"></a> ### Bugfixes * docker\_compose\_v2 \- do not consider a <code>Waiting</code> event as an action/change \([https\://github\.com/ansible\-collections/community\.docker/pull/804](https\://github\.com/ansible\-collections/community\.docker/pull/804)\)\. @@ -387,7 +404,7 @@ Bugfix and feature release\. <a id="v3-7-0"></a> ## v3\.7\.0 -<a id="release-summary-7"></a> +<a id="release-summary-8"></a> ### Release Summary Bugfix and feature release\. @@ -398,7 +415,7 @@ Bugfix and feature release\. * docker\_compose\_v2 \- add <code>scale</code> option to allow to explicitly scale services \([https\://github\.com/ansible\-collections/community\.docker/pull/776](https\://github\.com/ansible\-collections/community\.docker/pull/776)\)\. * docker\_compose\_v2\, docker\_compose\_v2\_pull \- support <code>files</code> parameter to specify multiple Compose files \([https\://github\.com/ansible\-collections/community\.docker/issues/772](https\://github\.com/ansible\-collections/community\.docker/issues/772)\, [https\://github\.com/ansible\-collections/community\.docker/pull/775](https\://github\.com/ansible\-collections/community\.docker/pull/775)\)\. -<a id="bugfixes-6"></a> +<a id="bugfixes-7"></a> ### Bugfixes * docker\_compose\_v2 \- properly parse dry\-run build events from <code>stderr</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/778](https\://github\.com/ansible\-collections/community\.docker/issues/778)\, [https\://github\.com/ansible\-collections/community\.docker/pull/779](https\://github\.com/ansible\-collections/community\.docker/pull/779)\)\. @@ -412,7 +429,7 @@ Bugfix and feature release\. <a id="v3-6-0"></a> ## v3\.6\.0 -<a id="release-summary-8"></a> +<a id="release-summary-9"></a> ### Release Summary Bugfix and feature release\. @@ -442,7 +459,7 @@ so the main difference is that instead of some Python requirements\, they depend * docker\_image \- allow to specify memory size and swap memory size in other units than bytes \([https\://github\.com/ansible\-collections/community\.docker/pull/727](https\://github\.com/ansible\-collections/community\.docker/pull/727)\)\. * inventory plugins \- add <code>filter</code> option which allows to include and exclude hosts based on Jinja2 conditions \([https\://github\.com/ansible\-collections/community\.docker/pull/698](https\://github\.com/ansible\-collections/community\.docker/pull/698)\, [https\://github\.com/ansible\-collections/community\.docker/issues/610](https\://github\.com/ansible\-collections/community\.docker/issues/610)\)\. -<a id="bugfixes-7"></a> +<a id="bugfixes-8"></a> ### Bugfixes * Use <code>unix\:///var/run/docker\.sock</code> instead of the legacy <code>unix\://var/run/docker\.sock</code> as default for <code>docker\_host</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/736](https\://github\.com/ansible\-collections/community\.docker/pull/736)\)\. @@ -462,7 +479,7 @@ so the main difference is that instead of some Python requirements\, they depend <a id="v3-5-0"></a> ## v3\.5\.0 -<a id="release-summary-9"></a> +<a id="release-summary-10"></a> ### Release Summary Bugfix and feature release\. @@ -478,7 +495,7 @@ Bugfix and feature release\. * docker\_container \- the default <code>ignore</code> for the <code>image\_name\_mismatch</code> parameter has been deprecated and will switch to <code>recreate</code> in community\.docker 4\.0\.0\. A deprecation warning will be printed in situations where the default value is used and where a behavior would change once the default changes \([https\://github\.com/ansible\-collections/community\.docker/pull/703](https\://github\.com/ansible\-collections/community\.docker/pull/703)\)\. -<a id="bugfixes-8"></a> +<a id="bugfixes-9"></a> ### Bugfixes * modules and plugins using the Docker SDK for Python \- remove <code>ssl\_version</code> from the parameters passed to Docker SDK for Python 7\.0\.0\+\. Explicitly fail with a nicer error message if it was explicitly set in this case \([https\://github\.com/ansible\-collections/community\.docker/pull/715](https\://github\.com/ansible\-collections/community\.docker/pull/715)\)\. @@ -488,12 +505,12 @@ Bugfix and feature release\. <a id="v3-4-11"></a> ## v3\.4\.11 -<a id="release-summary-10"></a> +<a id="release-summary-11"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-9"></a> +<a id="bugfixes-10"></a> ### Bugfixes * docker\_volume \- fix crash caused by accessing an empty dictionary\. The <code>has\_different\_config\(\)</code> was raising an <code>AttributeError</code> because the <code>self\.existing\_volume\[\"Labels\"\]</code> dictionary was <code>None</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/702](https\://github\.com/ansible\-collections/community\.docker/pull/702)\)\. @@ -501,12 +518,12 @@ Bugfix release\. <a id="v3-4-10"></a> ## v3\.4\.10 -<a id="release-summary-11"></a> +<a id="release-summary-12"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-10"></a> +<a id="bugfixes-11"></a> ### Bugfixes * docker\_swarm \- make init and join operations work again with Docker SDK for Python before 4\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/695](https\://github\.com/ansible\-collections/community\.docker/issues/695)\, [https\://github\.com/ansible\-collections/community\.docker/pull/696](https\://github\.com/ansible\-collections/community\.docker/pull/696)\)\. @@ -514,12 +531,12 @@ Bugfix release\. <a id="v3-4-9"></a> ## v3\.4\.9 -<a id="release-summary-12"></a> +<a id="release-summary-13"></a> ### Release Summary Maintenance release with updated documentation and vendored Docker SDK for Python code\. -<a id="bugfixes-11"></a> +<a id="bugfixes-12"></a> ### Bugfixes * vendored Docker SDK for Python code \- cherry\-pick changes from the Docker SDK for Python code to align code\. These changes should not affect the parts used by the collection\'s code \([https\://github\.com/ansible\-collections/community\.docker/pull/694](https\://github\.com/ansible\-collections/community\.docker/pull/694)\)\. @@ -527,7 +544,7 @@ Maintenance release with updated documentation and vendored Docker SDK for Pytho <a id="v3-4-8"></a> ## v3\.4\.8 -<a id="release-summary-13"></a> +<a id="release-summary-14"></a> ### Release Summary Maintenance release with updated documentation\. @@ -548,12 +565,12 @@ for the rendered HTML version of the documentation of the latest release\. <a id="v3-4-7"></a> ## v3\.4\.7 -<a id="release-summary-14"></a> +<a id="release-summary-15"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-12"></a> +<a id="bugfixes-13"></a> ### Bugfixes * docker\_swarm\_info \- if <code>service\=true</code> is used\, do not crash when a service without an endpoint spec is encountered \([https\://github\.com/ansible\-collections/community\.docker/issues/636](https\://github\.com/ansible\-collections/community\.docker/issues/636)\, [https\://github\.com/ansible\-collections/community\.docker/pull/637](https\://github\.com/ansible\-collections/community\.docker/pull/637)\)\. @@ -561,12 +578,12 @@ Bugfix release\. <a id="v3-4-6"></a> ## v3\.4\.6 -<a id="release-summary-15"></a> +<a id="release-summary-16"></a> ### Release Summary Bugfix release with documentation warnings about using certain functionality when connecting to the Docker daemon with TCP TLS\. -<a id="bugfixes-13"></a> +<a id="bugfixes-14"></a> ### Bugfixes * socket\_handler module utils \- make sure this fully works when Docker SDK for Python is not available \([https\://github\.com/ansible\-collections/community\.docker/pull/620](https\://github\.com/ansible\-collections/community\.docker/pull/620)\)\. @@ -583,12 +600,12 @@ Bugfix release with documentation warnings about using certain functionality whe <a id="v3-4-5"></a> ## v3\.4\.5 -<a id="release-summary-16"></a> +<a id="release-summary-17"></a> ### Release Summary Maintenance release which adds compatibility with requests 2\.29\.0 and 2\.30\.0 and urllib3 2\.0\. -<a id="bugfixes-14"></a> +<a id="bugfixes-15"></a> ### Bugfixes * Make vendored Docker SDK for Python code compatible with requests 2\.29\.0 and urllib3 2\.0 \([https\://github\.com/ansible\-collections/community\.docker/pull/613](https\://github\.com/ansible\-collections/community\.docker/pull/613)\)\. @@ -596,7 +613,7 @@ Maintenance release which adds compatibility with requests 2\.29\.0 and 2\.30\.0 <a id="v3-4-4"></a> ## v3\.4\.4 -<a id="release-summary-17"></a> +<a id="release-summary-18"></a> ### Release Summary Maintenance release with updated EE requirements and updated documentation\. @@ -614,7 +631,7 @@ Maintenance release with updated EE requirements and updated documentation\. <a id="v3-4-3"></a> ## v3\.4\.3 -<a id="release-summary-18"></a> +<a id="release-summary-19"></a> ### Release Summary Maintenance release with improved documentation\. @@ -622,12 +639,12 @@ Maintenance release with improved documentation\. <a id="v3-4-2"></a> ## v3\.4\.2 -<a id="release-summary-19"></a> +<a id="release-summary-20"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-15"></a> +<a id="bugfixes-16"></a> ### Bugfixes * docker\_prune \- return correct value for <code>changed</code>\. So far the module always claimed that nothing changed \([https\://github\.com/ansible\-collections/community\.docker/pull/593](https\://github\.com/ansible\-collections/community\.docker/pull/593)\)\. @@ -635,12 +652,12 @@ Bugfix release\. <a id="v3-4-1"></a> ## v3\.4\.1 -<a id="release-summary-20"></a> +<a id="release-summary-21"></a> ### Release Summary Regular bugfix release\. -<a id="bugfixes-16"></a> +<a id="bugfixes-17"></a> ### Bugfixes * docker\_api connection plugin\, docker\_container\_exec\, docker\_container\_copy\_into \- properly close socket to Daemon after executing commands in containers \([https\://github\.com/ansible\-collections/community\.docker/pull/582](https\://github\.com/ansible\-collections/community\.docker/pull/582)\)\. @@ -650,7 +667,7 @@ Regular bugfix release\. <a id="v3-4-0"></a> ## v3\.4\.0 -<a id="release-summary-21"></a> +<a id="release-summary-22"></a> ### Release Summary Regular bugfix and feature release\. @@ -661,7 +678,7 @@ Regular bugfix and feature release\. * docker\_api connection plugin \- when copying files to/from a container\, stream the file contents instead of first reading them to memory \([https\://github\.com/ansible\-collections/community\.docker/pull/545](https\://github\.com/ansible\-collections/community\.docker/pull/545)\)\. * docker\_host\_info \- allow to list all containers with new option <code>containers\_all</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/535](https\://github\.com/ansible\-collections/community\.docker/issues/535)\, [https\://github\.com/ansible\-collections/community\.docker/pull/538](https\://github\.com/ansible\-collections/community\.docker/pull/538)\)\. -<a id="bugfixes-17"></a> +<a id="bugfixes-18"></a> ### Bugfixes * docker\_api connection plugin \- fix error handling when 409 Conflict is returned by the Docker daemon in case of a stopped container \([https\://github\.com/ansible\-collections/community\.docker/pull/546](https\://github\.com/ansible\-collections/community\.docker/pull/546)\)\. @@ -677,12 +694,12 @@ Regular bugfix and feature release\. <a id="v3-3-2"></a> ## v3\.3\.2 -<a id="release-summary-22"></a> +<a id="release-summary-23"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-18"></a> +<a id="bugfixes-19"></a> ### Bugfixes * docker\_container \- when <code>detach\=false</code>\, wait indefinitely and not at most one minute\. This was the behavior with Docker SDK for Python\, and was accidentally changed in 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/526](https\://github\.com/ansible\-collections/community\.docker/issues/526)\, [https\://github\.com/ansible\-collections/community\.docker/pull/527](https\://github\.com/ansible\-collections/community\.docker/pull/527)\)\. @@ -690,12 +707,12 @@ Bugfix release\. <a id="v3-3-1"></a> ## v3\.3\.1 -<a id="release-summary-23"></a> +<a id="release-summary-24"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-19"></a> +<a id="bugfixes-20"></a> ### Bugfixes * current\_container\_facts \- make container detection work better in more cases \([https\://github\.com/ansible\-collections/community\.docker/pull/522](https\://github\.com/ansible\-collections/community\.docker/pull/522)\)\. @@ -703,7 +720,7 @@ Bugfix release\. <a id="v3-3-0"></a> ## v3\.3\.0 -<a id="release-summary-24"></a> +<a id="release-summary-25"></a> ### Release Summary Feature and bugfix release\. @@ -714,7 +731,7 @@ Feature and bugfix release\. * current\_container\_facts \- make work with current Docker version\, also support Podman \([https\://github\.com/ansible\-collections/community\.docker/pull/510](https\://github\.com/ansible\-collections/community\.docker/pull/510)\)\. * docker\_image \- when using <code>archive\_path</code>\, detect whether changes are necessary based on the image ID \(hash\)\. If the existing tar archive matches the source\, do nothing\. Previously\, each task execution re\-created the archive \([https\://github\.com/ansible\-collections/community\.docker/pull/500](https\://github\.com/ansible\-collections/community\.docker/pull/500)\)\. -<a id="bugfixes-20"></a> +<a id="bugfixes-21"></a> ### Bugfixes * docker\_container\_exec \- fix <code>chdir</code> option which was ignored since community\.docker 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/517](https\://github\.com/ansible\-collections/community\.docker/issues/517)\, [https\://github\.com/ansible\-collections/community\.docker/pull/518](https\://github\.com/ansible\-collections/community\.docker/pull/518)\)\. @@ -723,12 +740,12 @@ Feature and bugfix release\. <a id="v3-2-2"></a> ## v3\.2\.2 -<a id="release-summary-25"></a> +<a id="release-summary-26"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-21"></a> +<a id="bugfixes-22"></a> ### Bugfixes * docker\_container \- the <code>kill\_signal</code> option erroneously did not accept strings anymore since 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/issues/505](https\://github\.com/ansible\-collections/community\.docker/issues/505)\, [https\://github\.com/ansible\-collections/community\.docker/pull/506](https\://github\.com/ansible\-collections/community\.docker/pull/506)\)\. @@ -736,7 +753,7 @@ Bugfix release\. <a id="v3-2-1"></a> ## v3\.2\.1 -<a id="release-summary-26"></a> +<a id="release-summary-27"></a> ### Release Summary Maintenance release with improved documentation\. @@ -744,7 +761,7 @@ Maintenance release with improved documentation\. <a id="v3-2-0"></a> ## v3\.2\.0 -<a id="release-summary-27"></a> +<a id="release-summary-28"></a> ### Release Summary Feature and deprecation release\. @@ -763,7 +780,7 @@ Feature and deprecation release\. <a id="v3-1-0"></a> ## v3\.1\.0 -<a id="release-summary-28"></a> +<a id="release-summary-29"></a> ### Release Summary Feature release\. @@ -777,12 +794,12 @@ Feature release\. <a id="v3-0-2"></a> ## v3\.0\.2 -<a id="release-summary-29"></a> +<a id="release-summary-30"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-22"></a> +<a id="bugfixes-23"></a> ### Bugfixes * docker\_image \- fix build argument handling \([https\://github\.com/ansible\-collections/community\.docker/issues/455](https\://github\.com/ansible\-collections/community\.docker/issues/455)\, [https\://github\.com/ansible\-collections/community\.docker/pull/456](https\://github\.com/ansible\-collections/community\.docker/pull/456)\)\. @@ -790,12 +807,12 @@ Bugfix release\. <a id="v3-0-1"></a> ## v3\.0\.1 -<a id="release-summary-30"></a> +<a id="release-summary-31"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-23"></a> +<a id="bugfixes-24"></a> ### Bugfixes * docker\_container \- fix handling of <code>env\_file</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/451](https\://github\.com/ansible\-collections/community\.docker/issues/451)\, [https\://github\.com/ansible\-collections/community\.docker/pull/452](https\://github\.com/ansible\-collections/community\.docker/pull/452)\)\. @@ -803,7 +820,7 @@ Bugfix release\. <a id="v3-0-0"></a> ## v3\.0\.0 -<a id="release-summary-31"></a> +<a id="release-summary-32"></a> ### Release Summary The 3\.0\.0 release features a rewrite of the <code>docker\_container</code> module\, and many modules and plugins no longer depend on the Docker SDK for Python\. @@ -870,7 +887,7 @@ The 3\.0\.0 release features a rewrite of the <code>docker\_container</code> mod * modules and plugins communicating directly with the Docker daemon \- when connecting by SSH and not using <code>use\_ssh\_client\=true</code>\, reject unknown host keys instead of accepting them\. This is only a change relative to older community\.docker 3\.0\.0 pre\-releases or with respect to Docker SDK for Python \< 6\.0\.0\. Docker SDK for Python 6\.0\.0 will also include this change \([https\://github\.com/ansible\-collections/community\.docker/pull/434](https\://github\.com/ansible\-collections/community\.docker/pull/434)\)\. -<a id="bugfixes-24"></a> +<a id="bugfixes-25"></a> ### Bugfixes * docker\_image \- when composing the build context\, trim trailing whitespace from <code>\.dockerignore</code> entries\. This is only a change relative to older community\.docker 3\.0\.0 pre\-releases or with respect to Docker SDK for Python \< 6\.0\.0\. Docker SDK for Python 6\.0\.0 will also include this change \([https\://github\.com/ansible\-collections/community\.docker/pull/434](https\://github\.com/ansible\-collections/community\.docker/pull/434)\)\. @@ -884,7 +901,7 @@ The 3\.0\.0 release features a rewrite of the <code>docker\_container</code> mod <a id="v2-7-0"></a> ## v2\.7\.0 -<a id="release-summary-32"></a> +<a id="release-summary-33"></a> ### Release Summary Bugfix and deprecation release\. The next 2\.x\.y releases will only be bugfix releases\, the next expect minor/major release will be 3\.0\.0 with some major changes\. @@ -900,7 +917,7 @@ Bugfix and deprecation release\. The next 2\.x\.y releases will only be bugfix r * Support for Docker API version 1\.20 to 1\.24 has been deprecated and will be removed in community\.docker 3\.0\.0\. The first Docker version supporting API version 1\.25 was Docker 1\.13\, released in January 2017\. This affects the modules <code>docker\_container</code>\, <code>docker\_container\_exec</code>\, <code>docker\_container\_info</code>\, <code>docker\_compose</code>\, <code>docker\_login</code>\, <code>docker\_image</code>\, <code>docker\_image\_info</code>\, <code>docker\_image\_load</code>\, <code>docker\_host\_info</code>\, <code>docker\_network</code>\, <code>docker\_network\_info</code>\, <code>docker\_node\_info</code>\, <code>docker\_swarm\_info</code>\, <code>docker\_swarm\_service</code>\, <code>docker\_swarm\_service\_info</code>\, <code>docker\_volume\_info</code>\, and <code>docker\_volume</code>\, whose minimally supported API version is between 1\.20 and 1\.24 \([https\://github\.com/ansible\-collections/community\.docker/pull/396](https\://github\.com/ansible\-collections/community\.docker/pull/396)\)\. * Support for Python 2\.6 is deprecated and will be removed in the next major release \(community\.docker 3\.0\.0\)\. Some modules might still work with Python 2\.6\, but we will no longer try to ensure compatibility \([https\://github\.com/ansible\-collections/community\.docker/pull/388](https\://github\.com/ansible\-collections/community\.docker/pull/388)\)\. -<a id="bugfixes-25"></a> +<a id="bugfixes-26"></a> ### Bugfixes * Docker SDK for Python based modules and plugins \- if the API version is specified as an option\, use that one to validate API version requirements of module/plugin options instead of the latest API version supported by the Docker daemon\. This also avoids one unnecessary API call per module/plugin \([https\://github\.com/ansible\-collections/community\.docker/pull/389](https\://github\.com/ansible\-collections/community\.docker/pull/389)\)\. @@ -908,7 +925,7 @@ Bugfix and deprecation release\. The next 2\.x\.y releases will only be bugfix r <a id="v2-6-0"></a> ## v2\.6\.0 -<a id="release-summary-33"></a> +<a id="release-summary-34"></a> ### Release Summary Bugfix and feature release\. @@ -926,7 +943,7 @@ Bugfix and feature release\. * Various modules \- the default of <code>tls\_hostname</code> that was supposed to be removed in community\.docker 2\.0\.0 will now be removed in version 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/pull/362](https\://github\.com/ansible\-collections/community\.docker/pull/362)\)\. * docker\_stack \- the return values <code>out</code> and <code>err</code> that were supposed to be removed in community\.docker 2\.0\.0 will now be removed in version 3\.0\.0 \([https\://github\.com/ansible\-collections/community\.docker/pull/362](https\://github\.com/ansible\-collections/community\.docker/pull/362)\)\. -<a id="bugfixes-26"></a> +<a id="bugfixes-27"></a> ### Bugfixes * docker\_container \- fail with a meaningful message instead of crashing if a port is specified with more than three colon\-separated parts \([https\://github\.com/ansible\-collections/community\.docker/pull/367](https\://github\.com/ansible\-collections/community\.docker/pull/367)\, [https\://github\.com/ansible\-collections/community\.docker/issues/365](https\://github\.com/ansible\-collections/community\.docker/issues/365)\)\. @@ -935,12 +952,12 @@ Bugfix and feature release\. <a id="v2-5-1"></a> ## v2\.5\.1 -<a id="release-summary-34"></a> +<a id="release-summary-35"></a> ### Release Summary Maintenance release\. -<a id="bugfixes-27"></a> +<a id="bugfixes-28"></a> ### Bugfixes * Include <code>PSF\-license\.txt</code> file for <code>plugins/module\_utils/\_version\.py</code>\. @@ -948,7 +965,7 @@ Maintenance release\. <a id="v2-5-0"></a> ## v2\.5\.0 -<a id="release-summary-35"></a> +<a id="release-summary-36"></a> ### Release Summary Regular feature release\. @@ -962,7 +979,7 @@ Regular feature release\. <a id="v2-4-0"></a> ## v2\.4\.0 -<a id="release-summary-36"></a> +<a id="release-summary-37"></a> ### Release Summary Regular feature and bugfix release\. @@ -974,7 +991,7 @@ Regular feature and bugfix release\. * current\_container\_facts \- add detection for GitHub Actions \([https\://github\.com/ansible\-collections/community\.docker/pull/336](https\://github\.com/ansible\-collections/community\.docker/pull/336)\)\. * docker\_container \- support returning Docker container log output when using Docker\'s <code>local</code> logging driver\, an optimized local logging driver introduced in Docker 18\.09 \([https\://github\.com/ansible\-collections/community\.docker/pull/337](https\://github\.com/ansible\-collections/community\.docker/pull/337)\)\. -<a id="bugfixes-28"></a> +<a id="bugfixes-29"></a> ### Bugfixes * docker connection plugin \- make sure that <code>docker\_extra\_args</code> is used for querying the Docker version\. Also ensures that the Docker version is only queried when needed\. This is currently the case if a remote user is specified \([https\://github\.com/ansible\-collections/community\.docker/issues/325](https\://github\.com/ansible\-collections/community\.docker/issues/325)\, [https\://github\.com/ansible\-collections/community\.docker/pull/327](https\://github\.com/ansible\-collections/community\.docker/pull/327)\)\. @@ -982,7 +999,7 @@ Regular feature and bugfix release\. <a id="v2-3-0"></a> ## v2\.3\.0 -<a id="release-summary-37"></a> +<a id="release-summary-38"></a> ### Release Summary Regular feature and bugfix release\. @@ -996,7 +1013,7 @@ Regular feature and bugfix release\. * docker\_api connection plugin \- implement connection reset by clearing internal container user/group ID cache \([https\://github\.com/ansible\-collections/community\.docker/pull/312](https\://github\.com/ansible\-collections/community\.docker/pull/312)\)\. * docker\_api connection plugin \- the plugin supports new ways to define the timeout\. These are the <code>ANSIBLE\_DOCKER\_TIMEOUT</code> environment variable\, the <code>timeout</code> setting in the <code>docker\_connection</code> section of <code>ansible\.cfg</code>\, and the <code>ansible\_docker\_timeout</code> variable \([https\://github\.com/ansible\-collections/community\.docker/pull/308](https\://github\.com/ansible\-collections/community\.docker/pull/308)\)\. -<a id="bugfixes-29"></a> +<a id="bugfixes-30"></a> ### Bugfixes * docker connection plugin \- fix option handling to be compatible with ansible\-core 2\.13 \([https\://github\.com/ansible\-collections/community\.docker/pull/297](https\://github\.com/ansible\-collections/community\.docker/pull/297)\, [https\://github\.com/ansible\-collections/community\.docker/issues/307](https\://github\.com/ansible\-collections/community\.docker/issues/307)\)\. @@ -1005,12 +1022,12 @@ Regular feature and bugfix release\. <a id="v2-2-1"></a> ## v2\.2\.1 -<a id="release-summary-38"></a> +<a id="release-summary-39"></a> ### Release Summary Regular bugfix release\. -<a id="bugfixes-30"></a> +<a id="bugfixes-31"></a> ### Bugfixes * docker\_compose \- fix Python 3 type error when extracting warnings or errors from docker\-compose\'s output \([https\://github\.com/ansible\-collections/community\.docker/pull/305](https\://github\.com/ansible\-collections/community\.docker/pull/305)\)\. @@ -1018,7 +1035,7 @@ Regular bugfix release\. <a id="v2-2-0"></a> ## v2\.2\.0 -<a id="release-summary-39"></a> +<a id="release-summary-40"></a> ### Release Summary Regular feature and bugfix release\. @@ -1030,7 +1047,7 @@ Regular feature and bugfix release\. * docker\_secret \- add support for rolling update\, set <code>rolling\_versions</code> to <code>true</code> to enable \([https\://github\.com/ansible\-collections/community\.docker/pull/293](https\://github\.com/ansible\-collections/community\.docker/pull/293)\, [https\://github\.com/ansible\-collections/community\.docker/issues/21](https\://github\.com/ansible\-collections/community\.docker/issues/21)\)\. * docker\_swarm\_service \- add support for setting capabilities with the <code>cap\_add</code> and <code>cap\_drop</code> parameters\. Usage is the same as with the <code>capabilities</code> and <code>cap\_drop</code> parameters for <code>docker\_container</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/294](https\://github\.com/ansible\-collections/community\.docker/pull/294)\)\. -<a id="bugfixes-31"></a> +<a id="bugfixes-32"></a> ### Bugfixes * docker\_container\, docker\_image \- adjust image finding code to peculiarities of <code>podman\-docker</code>\'s API emulation when Docker short names like <code>redis</code> are used \([https\://github\.com/ansible\-collections/community\.docker/issues/292](https\://github\.com/ansible\-collections/community\.docker/issues/292)\)\. @@ -1038,12 +1055,12 @@ Regular feature and bugfix release\. <a id="v2-1-1"></a> ## v2\.1\.1 -<a id="release-summary-40"></a> +<a id="release-summary-41"></a> ### Release Summary Emergency release to amend breaking change in previous release\. -<a id="bugfixes-32"></a> +<a id="bugfixes-33"></a> ### Bugfixes * Fix unintended breaking change caused by [an earlier fix](https\://github\.com/ansible\-collections/community\.docker/pull/258) by vendoring the deprecated Python standard library <code>distutils\.version</code> until this collection stops supporting Ansible 2\.9 and ansible\-base 2\.10 \([https\://github\.com/ansible\-collections/community\.docker/issues/267](https\://github\.com/ansible\-collections/community\.docker/issues/267)\, [https\://github\.com/ansible\-collections/community\.docker/pull/269](https\://github\.com/ansible\-collections/community\.docker/pull/269)\)\. @@ -1051,7 +1068,7 @@ Emergency release to amend breaking change in previous release\. <a id="v2-1-0"></a> ## v2\.1\.0 -<a id="release-summary-41"></a> +<a id="release-summary-42"></a> ### Release Summary Feature and bugfix release\. @@ -1062,7 +1079,7 @@ Feature and bugfix release\. * docker\_container\_exec \- add <code>detach</code> parameter \([https\://github\.com/ansible\-collections/community\.docker/issues/250](https\://github\.com/ansible\-collections/community\.docker/issues/250)\, [https\://github\.com/ansible\-collections/community\.docker/pull/255](https\://github\.com/ansible\-collections/community\.docker/pull/255)\)\. * docker\_container\_exec \- add <code>env</code> option \([https\://github\.com/ansible\-collections/community\.docker/issues/248](https\://github\.com/ansible\-collections/community\.docker/issues/248)\, [https\://github\.com/ansible\-collections/community\.docker/pull/254](https\://github\.com/ansible\-collections/community\.docker/pull/254)\)\. -<a id="bugfixes-33"></a> +<a id="bugfixes-34"></a> ### Bugfixes * Various modules and plugins \- use vendored version of <code>distutils\.version</code> included in ansible\-core 2\.12 if available\. This avoids breakage when <code>distutils</code> is removed from the standard library of Python 3\.12\. Note that ansible\-core 2\.11\, ansible\-base 2\.10 and Ansible 2\.9 are right now not compatible with Python 3\.12\, hence this fix does not target these ansible\-core/\-base/2\.9 versions \([https\://github\.com/ansible\-collections/community\.docker/pull/258](https\://github\.com/ansible\-collections/community\.docker/pull/258)\)\. @@ -1072,12 +1089,12 @@ Feature and bugfix release\. <a id="v2-0-2"></a> ## v2\.0\.2 -<a id="release-summary-42"></a> +<a id="release-summary-43"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-34"></a> +<a id="bugfixes-35"></a> ### Bugfixes * docker\_api connection plugin \- avoid passing an unnecessary argument to a Docker SDK for Python call that is only supported by version 3\.0\.0 or later \([https\://github\.com/ansible\-collections/community\.docker/pull/243](https\://github\.com/ansible\-collections/community\.docker/pull/243)\)\. @@ -1088,7 +1105,7 @@ Bugfix release\. <a id="v2-0-1"></a> ## v2\.0\.1 -<a id="release-summary-43"></a> +<a id="release-summary-44"></a> ### Release Summary Maintenance release with some documentation fixes\. @@ -1096,7 +1113,7 @@ Maintenance release with some documentation fixes\. <a id="v2-0-0"></a> ## v2\.0\.0 -<a id="release-summary-44"></a> +<a id="release-summary-45"></a> ### Release Summary New major release with some deprecations removed and a breaking change in the <code>docker\_compose</code> module regarding the <code>timeout</code> parameter\. @@ -1122,7 +1139,7 @@ New major release with some deprecations removed and a breaking change in the <c <a id="v1-10-0"></a> ## v1\.10\.0 -<a id="release-summary-45"></a> +<a id="release-summary-46"></a> ### Release Summary Regular feature and bugfix release\. @@ -1137,12 +1154,12 @@ Regular feature and bugfix release\. <a id="v1-9-1"></a> ## v1\.9\.1 -<a id="release-summary-46"></a> +<a id="release-summary-47"></a> ### Release Summary Regular bugfix release\. -<a id="bugfixes-35"></a> +<a id="bugfixes-36"></a> ### Bugfixes * docker\_compose \- fixed incorrect <code>changed</code> status for services with <code>profiles</code> defined\, but none enabled \([https\://github\.com/ansible\-collections/community\.docker/pull/192](https\://github\.com/ansible\-collections/community\.docker/pull/192)\)\. @@ -1150,7 +1167,7 @@ Regular bugfix release\. <a id="v1-9-0"></a> ## v1\.9\.0 -<a id="release-summary-47"></a> +<a id="release-summary-48"></a> ### Release Summary New bugfixes and features release\. @@ -1169,7 +1186,7 @@ New bugfixes and features release\. * docker\_container \- the new <code>command\_handling</code>\'s default value\, <code>compatibility</code>\, is deprecated and will change to <code>correct</code> in community\.docker 3\.0\.0\. A deprecation warning is emitted by the module in cases where the behavior will change\. Please note that ansible\-core will output a deprecation warning only once\, so if it is shown for an earlier task\, there could be more tasks with this warning where it is not shown \([https\://github\.com/ansible\-collections/community\.docker/pull/186](https\://github\.com/ansible\-collections/community\.docker/pull/186)\)\. -<a id="bugfixes-36"></a> +<a id="bugfixes-37"></a> ### Bugfixes * docker\_compose \- fixes task failures when bringing up services while using <code>docker\-compose \<1\.17\.0</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/180](https\://github\.com/ansible\-collections/community\.docker/issues/180)\)\. @@ -1188,7 +1205,7 @@ New bugfixes and features release\. <a id="v1-8-0"></a> ## v1\.8\.0 -<a id="release-summary-48"></a> +<a id="release-summary-49"></a> ### Release Summary Regular bugfix and feature release\. @@ -1202,7 +1219,7 @@ Regular bugfix and feature release\. * docker\_host\_info \- allow values for keys in <code>containers\_filters</code>\, <code>images\_filters</code>\, <code>networks\_filters</code>\, and <code>volumes\_filters</code> to be passed as YAML lists \([https\://github\.com/ansible\-collections/community\.docker/pull/160](https\://github\.com/ansible\-collections/community\.docker/pull/160)\)\. * docker\_plugin \- added <code>alias</code> option to specify local names for docker plugins \([https\://github\.com/ansible\-collections/community\.docker/pull/161](https\://github\.com/ansible\-collections/community\.docker/pull/161)\)\. -<a id="bugfixes-37"></a> +<a id="bugfixes-38"></a> ### Bugfixes * docker\_compose \- fix idempotence bug when using <code>stopped\: true</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/142](https\://github\.com/ansible\-collections/community\.docker/issues/142)\, [https\://github\.com/ansible\-collections/community\.docker/pull/159](https\://github\.com/ansible\-collections/community\.docker/pull/159)\)\. @@ -1210,7 +1227,7 @@ Regular bugfix and feature release\. <a id="v1-7-0"></a> ## v1\.7\.0 -<a id="release-summary-49"></a> +<a id="release-summary-50"></a> ### Release Summary Small feature and bugfix release\. @@ -1223,12 +1240,12 @@ Small feature and bugfix release\. <a id="v1-6-1"></a> ## v1\.6\.1 -<a id="release-summary-50"></a> +<a id="release-summary-51"></a> ### Release Summary Bugfix release to reduce deprecation warning spam\. -<a id="bugfixes-38"></a> +<a id="bugfixes-39"></a> ### Bugfixes * docker\_\* modules and plugins\, except <code>docker\_swarm</code> connection plugin and <code>docker\_compose</code> and <code>docker\_stack\*\` modules \- only emit \`\`tls\_hostname</code> deprecation message if TLS is actually used \([https\://github\.com/ansible\-collections/community\.docker/pull/143](https\://github\.com/ansible\-collections/community\.docker/pull/143)\)\. @@ -1236,7 +1253,7 @@ Bugfix release to reduce deprecation warning spam\. <a id="v1-6-0"></a> ## v1\.6\.0 -<a id="release-summary-51"></a> +<a id="release-summary-52"></a> ### Release Summary Regular bugfix and feature release\. @@ -1252,7 +1269,7 @@ Regular bugfix and feature release\. * docker\_\* modules and plugins\, except <code>docker\_swarm</code> connection plugin and <code>docker\_compose</code> and <code>docker\_stack\*\` modules \- the current default \`\`localhost</code> for <code>tls\_hostname</code> is deprecated\. In community\.docker 2\.0\.0 it will be computed from <code>docker\_host</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/134](https\://github\.com/ansible\-collections/community\.docker/pull/134)\)\. -<a id="bugfixes-39"></a> +<a id="bugfixes-40"></a> ### Bugfixes * docker\-compose \- fix not pulling when <code>state\: present</code> and <code>stopped\: true</code> \([https\://github\.com/ansible\-collections/community\.docker/issues/12](https\://github\.com/ansible\-collections/community\.docker/issues/12)\, [https\://github\.com/ansible\-collections/community\.docker/pull/119](https\://github\.com/ansible\-collections/community\.docker/pull/119)\)\. @@ -1262,7 +1279,7 @@ Regular bugfix and feature release\. <a id="v1-5-0"></a> ## v1\.5\.0 -<a id="release-summary-52"></a> +<a id="release-summary-53"></a> ### Release Summary Regular feature release\. @@ -1272,7 +1289,7 @@ Regular feature release\. * Add the <code>use\_ssh\_client</code> option to most docker modules and plugins \([https\://github\.com/ansible\-collections/community\.docker/issues/108](https\://github\.com/ansible\-collections/community\.docker/issues/108)\, [https\://github\.com/ansible\-collections/community\.docker/pull/114](https\://github\.com/ansible\-collections/community\.docker/pull/114)\)\. -<a id="bugfixes-40"></a> +<a id="bugfixes-41"></a> ### Bugfixes * all modules \- use <code>to\_native</code> to convert exceptions to strings \([https\://github\.com/ansible\-collections/community\.docker/pull/121](https\://github\.com/ansible\-collections/community\.docker/pull/121)\)\. @@ -1285,7 +1302,7 @@ Regular feature release\. <a id="v1-4-0"></a> ## v1\.4\.0 -<a id="release-summary-53"></a> +<a id="release-summary-54"></a> ### Release Summary Security release to address another potential secret leak\. Also includes regular bugfixes and features\. @@ -1305,7 +1322,7 @@ Security release to address another potential secret leak\. Also includes regula * docker\_swarm \- the <code>join\_token</code> option is now marked as <code>no\_log</code> so it is no longer written into logs \([https\://github\.com/ansible\-collections/community\.docker/pull/103](https\://github\.com/ansible\-collections/community\.docker/pull/103)\)\. -<a id="bugfixes-41"></a> +<a id="bugfixes-42"></a> ### Bugfixes * <code>docker\_swarm\_service</code> \- fix KeyError on caused by reference to deprecated option <code>update\_failure\_action</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/100](https\://github\.com/ansible\-collections/community\.docker/pull/100)\)\. @@ -1314,7 +1331,7 @@ Security release to address another potential secret leak\. Also includes regula <a id="v1-3-0"></a> ## v1\.3\.0 -<a id="release-summary-54"></a> +<a id="release-summary-55"></a> ### Release Summary Regular feature and bugfix release\. @@ -1327,7 +1344,7 @@ Regular feature and bugfix release\. * docker\_image \- properly support image IDs \(hashes\) for loading and tagging images \([https\://github\.com/ansible\-collections/community\.docker/issues/86](https\://github\.com/ansible\-collections/community\.docker/issues/86)\, [https\://github\.com/ansible\-collections/community\.docker/pull/87](https\://github\.com/ansible\-collections/community\.docker/pull/87)\)\. * docker\_swarm\_service \- adding support for maximum number of tasks per node \(<code>replicas\_max\_per\_node</code>\) when running swarm service in replicated mode\. Introduced in API 1\.40 \([https\://github\.com/ansible\-collections/community\.docker/issues/7](https\://github\.com/ansible\-collections/community\.docker/issues/7)\, [https\://github\.com/ansible\-collections/community\.docker/pull/92](https\://github\.com/ansible\-collections/community\.docker/pull/92)\)\. -<a id="bugfixes-42"></a> +<a id="bugfixes-43"></a> ### Bugfixes * docker\_container \- fix healthcheck disabling idempotency issue with strict comparison \([https\://github\.com/ansible\-collections/community\.docker/issues/85](https\://github\.com/ansible\-collections/community\.docker/issues/85)\)\. @@ -1345,7 +1362,7 @@ Regular feature and bugfix release\. <a id="v1-2-2"></a> ## v1\.2\.2 -<a id="release-summary-55"></a> +<a id="release-summary-56"></a> ### Release Summary Security bugfix release to address CVE\-2021\-20191\. @@ -1358,12 +1375,12 @@ Security bugfix release to address CVE\-2021\-20191\. <a id="v1-2-1"></a> ## v1\.2\.1 -<a id="release-summary-56"></a> +<a id="release-summary-57"></a> ### Release Summary Bugfix release\. -<a id="bugfixes-43"></a> +<a id="bugfixes-44"></a> ### Bugfixes * docker connection plugin \- fix Docker version parsing\, as some docker versions have a leading <code>v</code> in the output of the command <code>docker version \-\-format \"\{\{\.Server\.Version\}\}\"</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/76](https\://github\.com/ansible\-collections/community\.docker/pull/76)\)\. @@ -1371,7 +1388,7 @@ Bugfix release\. <a id="v1-2-0"></a> ## v1\.2\.0 -<a id="release-summary-57"></a> +<a id="release-summary-58"></a> ### Release Summary Feature release with one new feature and two bugfixes\. @@ -1381,7 +1398,7 @@ Feature release with one new feature and two bugfixes\. * docker\_container \- added <code>default\_host\_ip</code> option which allows to explicitly set the default IP string for published ports without explicitly specified IPs\. When using IPv6 binds with Docker 20\.10\.2 or newer\, this needs to be set to an empty string \(<code>\"\"</code>\) \([https\://github\.com/ansible\-collections/community\.docker/issues/70](https\://github\.com/ansible\-collections/community\.docker/issues/70)\, [https\://github\.com/ansible\-collections/community\.docker/pull/71](https\://github\.com/ansible\-collections/community\.docker/pull/71)\)\. -<a id="bugfixes-44"></a> +<a id="bugfixes-45"></a> ### Bugfixes * docker\_container \- allow IPv6 zones \(RFC 4007\) in bind IPs \([https\://github\.com/ansible\-collections/community\.docker/pull/66](https\://github\.com/ansible\-collections/community\.docker/pull/66)\)\. @@ -1390,7 +1407,7 @@ Feature release with one new feature and two bugfixes\. <a id="v1-1-0"></a> ## v1\.1\.0 -<a id="release-summary-58"></a> +<a id="release-summary-59"></a> ### Release Summary Feature release with three new plugins and modules\. @@ -1407,7 +1424,7 @@ Feature release with three new plugins and modules\. * docker\_container \- currently <code>published\_ports</code> can contain port mappings next to the special value <code>all</code>\, in which case the port mappings are ignored\. This behavior is deprecated for community\.docker 2\.0\.0\, at which point it will either be forbidden\, or this behavior will be properly implemented similar to how the Docker CLI tool handles this \([https\://github\.com/ansible\-collections/community\.docker/issues/8](https\://github\.com/ansible\-collections/community\.docker/issues/8)\, [https\://github\.com/ansible\-collections/community\.docker/pull/60](https\://github\.com/ansible\-collections/community\.docker/pull/60)\)\. -<a id="bugfixes-45"></a> +<a id="bugfixes-46"></a> ### Bugfixes * docker\_image \- if <code>push\=true</code> is used with <code>repository</code>\, and the image does not need to be tagged\, still push\. This can happen if <code>repository</code> and <code>name</code> are equal \([https\://github\.com/ansible\-collections/community\.docker/issues/52](https\://github\.com/ansible\-collections/community\.docker/issues/52)\, [https\://github\.com/ansible\-collections/community\.docker/pull/53](https\://github\.com/ansible\-collections/community\.docker/pull/53)\)\. @@ -1435,12 +1452,12 @@ Feature release with three new plugins and modules\. <a id="v1-0-1"></a> ## v1\.0\.1 -<a id="release-summary-59"></a> +<a id="release-summary-60"></a> ### Release Summary Maintenance release with a bugfix for <code>docker\_container</code>\. -<a id="bugfixes-46"></a> +<a id="bugfixes-47"></a> ### Bugfixes * docker\_container \- the validation for <code>capabilities</code> in <code>device\_requests</code> was incorrect \([https\://github\.com/ansible\-collections/community\.docker/issues/42](https\://github\.com/ansible\-collections/community\.docker/issues/42)\, [https\://github\.com/ansible\-collections/community\.docker/pull/43](https\://github\.com/ansible\-collections/community\.docker/pull/43)\)\. @@ -1448,7 +1465,7 @@ Maintenance release with a bugfix for <code>docker\_container</code>\. <a id="v1-0-0"></a> ## v1\.0\.0 -<a id="release-summary-60"></a> +<a id="release-summary-61"></a> ### Release Summary This is the first production \(non\-prerelease\) release of <code>community\.docker</code>\. @@ -1463,7 +1480,7 @@ This is the first production \(non\-prerelease\) release of <code>community\.doc <a id="v0-1-0"></a> ## v0\.1\.0 -<a id="release-summary-61"></a> +<a id="release-summary-62"></a> ### Release Summary The <code>community\.docker</code> continues the work on the Ansible docker modules and plugins from their state in <code>community\.general</code> 1\.2\.0\. The changes listed here are thus relative to the modules and plugins <code>community\.general\.docker\*</code>\. @@ -1501,7 +1518,7 @@ All deprecation removals planned for <code>community\.general</code> 2\.0\.0 hav * docker\_volume \- no longer returns <code>ansible\_facts</code> \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. * docker\_volume \- the <code>force</code> option has been removed\. Use <code>recreate</code> instead \([https\://github\.com/ansible\-collections/community\.docker/pull/1](https\://github\.com/ansible\-collections/community\.docker/pull/1)\)\. -<a id="bugfixes-47"></a> +<a id="bugfixes-48"></a> ### Bugfixes * docker\_login \- fix internal config file storage to handle credentials for more than one registry \([https\://github\.com/ansible\-collections/community\.general/issues/1117](https\://github\.com/ansible\-collections/community\.general/issues/1117)\)\. diff --git a/ansible_collections/community/docker/CHANGELOG.rst b/ansible_collections/community/docker/CHANGELOG.rst index dff8b150b..7543fd867 100644 --- a/ansible_collections/community/docker/CHANGELOG.rst +++ b/ansible_collections/community/docker/CHANGELOG.rst @@ -4,6 +4,20 @@ Docker Community Collection Release Notes .. contents:: Topics +v3.10.4 +======= + +Release Summary +--------------- + +Bugfix release. + +Bugfixes +-------- + +- docker_compose - make sure that the module uses the ``api_version`` parameter (https://github.com/ansible-collections/community.docker/pull/881). +- docker_compose_v2* modules - there was no check to make sure that one of ``project_src`` and ``definition`` is provided. The modules crashed if none were provided (https://github.com/ansible-collections/community.docker/issues/885, https://github.com/ansible-collections/community.docker/pull/886). + v3.10.3 ======= diff --git a/ansible_collections/community/docker/FILES.json b/ansible_collections/community/docker/FILES.json index c2f6a28c3..b84bef8d7 100644 --- a/ansible_collections/community/docker/FILES.json +++ b/ansible_collections/community/docker/FILES.json @@ -109,7 +109,7 @@ "name": ".azure-pipelines/azure-pipelines.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "eed726931f1b030bc5f6c4165c0251704a098760de49fe58cad4c56aa91522e0", + "chksum_sha256": "87305f1c245e1c52e7222b67f827cd5f801ed78a6208dfed5e29d0aa0e845c25", "format": 1 }, { @@ -130,7 +130,7 @@ "name": ".github/workflows/ansible-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b36f9ccf4acf3c6d9358268de4c973d43406516c7f2b09f4303fa7c9672ae69a", + "chksum_sha256": "619dd32a8e2dc4fc8f6fc052854345adfec190772705e3150b1129ca5f94bf5e", "format": 1 }, { @@ -151,7 +151,7 @@ "name": ".github/workflows/ee.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f7bad2dd69eaeb6413cc12e92a6bf9c962ed705563a8803a09c76669c39ca501", + "chksum_sha256": "2f30e1de609ea367102f9414192b3d490b57b0623f8a13dc7b639f8e12f853a4", "format": 1 }, { @@ -242,7 +242,7 @@ "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e678850bfb28299b51297b445b2319e25d84b492364f236ee0154baefcb7d8ce", + "chksum_sha256": "b070d4c6bf2b6514ee5e0c36abc759afc24c7d81d42d814c65ddc765f89bff92", "format": 1 }, { @@ -410,7 +410,7 @@ "name": "plugins/doc_fragments/compose_v2.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b92c9446b36c3a2d8faa368a8036561d65cf5dae443d5f6a26f8d800a767a9a5", + "chksum_sha256": "b933078742267339f91deefafecdb5b5734b981c9fe25981c1e708ee69a67635", "format": 1 }, { @@ -760,7 +760,7 @@ "name": "plugins/module_utils/compose_v2.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "010f71093f38f18e9fcd1b5cd78a5babe601d2dd79ceb16642b999d299719b6f", + "chksum_sha256": "416f931290cec2b13d46496c2357fe43b383ba5e240f826e141f0302df36b62c", "format": 1 }, { @@ -837,14 +837,14 @@ "name": "plugins/modules/docker_compose.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "973b8aee68fcb76dd620c243904c64dee7f234ca1f69019b87c83ca72a8efc48", + "chksum_sha256": "65293128ce247f1ee759daa55dd234b07b3ef720e7ab4a2dd8aea7a5f596135e", "format": 1 }, { "name": "plugins/modules/docker_compose_v2.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "299fc207fcda246f73bbb7213f0a3f1eca8c5ebf0a6344e571c867fff0eba258", + "chksum_sha256": "5a1ceb2917ba2515f62c8f2fb1c16046a6622bccd3d32a1550df60c1febb9b16", "format": 1 }, { @@ -1285,7 +1285,7 @@ "name": "tests/integration/targets/connection_docker/runme.sh", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5b05e80ee60e868b634ac29fbe44a9453f109867892361b4ecf61e7016dcb75f", + "chksum_sha256": "ee629dbe7fa3be75e076aef7245c3ab5be9fc1846a907233061f7f08f5eae653", "format": 1 }, { @@ -1341,7 +1341,7 @@ "name": "tests/integration/targets/connection_docker_api/runme.sh", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7e79404445ba135ee4250d7e0789d95b19f94cd316702b30f6d3082a02eb3d30", + "chksum_sha256": "c24e24cd3fa7f24e89352bcade32a0695c78653cfc949a30a10268af7a28777d", "format": 1 }, { @@ -1516,7 +1516,7 @@ "name": "tests/integration/targets/docker_compose/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6b8ed3ac1dcbc2e57090222c0122e12eed47715945aa536b910fb924733b57ee", + "chksum_sha256": "ba201578bf7c2802525e8aaaf87a7019d60542d6a372826559fc1413a5b0d052", "format": 1 }, { @@ -4904,7 +4904,7 @@ "name": "tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "10152adf3d38b6a56495180b4585ffea1ca37943561b97ce2fb504dcedcb6339", + "chksum_sha256": "80ff30ed65e73b2a13b7cf04eab0b0208205f055ae23b1abd2b14b15efd9f7b9", "format": 1 }, { @@ -6416,7 +6416,7 @@ "name": "CHANGELOG.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "42e61d2b2354fbf9c5f2da9873c0477a1c16afede7b23e7fa222f25a158f7590", + "chksum_sha256": "0f2f209b91bd3f38f3ac844605a9a920180a7cbf241d0ca8881d990d72114aed", "format": 1 }, { @@ -6430,7 +6430,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5f823c49d14587f6dfa983c8f2359a9a5ff36e0e34c73615f01eb6504d9d0f9b", + "chksum_sha256": "a5df87a1bab6df6d3dc2f0d9e43cfaedc31e633df6fe4bd82f46d9d8b4a1b415", "format": 1 }, { diff --git a/ansible_collections/community/docker/MANIFEST.json b/ansible_collections/community/docker/MANIFEST.json index 69ffc1b62..fe2dadd5b 100644 --- a/ansible_collections/community/docker/MANIFEST.json +++ b/ansible_collections/community/docker/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "docker", - "version": "3.10.3", + "version": "3.10.4", "authors": [ "Ansible Docker Working Group" ], @@ -28,7 +28,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c5b11456e6a1ea1ee5144451aa5a1c46f7f835b3102db5ad06d16a005b4af551", + "chksum_sha256": "438fa53b8b53c9b7566343ad04bc98237e3706a0f989c4f2e9a9310f7f0af89b", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/docker/changelogs/changelog.yaml b/ansible_collections/community/docker/changelogs/changelog.yaml index ba40629e7..85a0b07a4 100644 --- a/ansible_collections/community/docker/changelogs/changelog.yaml +++ b/ansible_collections/community/docker/changelogs/changelog.yaml @@ -1098,6 +1098,20 @@ releases: - 3.10.3.yml - 871-selectors.yml release_date: '2024-05-26' + 3.10.4: + changes: + bugfixes: + - docker_compose - make sure that the module uses the ``api_version`` parameter + (https://github.com/ansible-collections/community.docker/pull/881). + - docker_compose_v2* modules - there was no check to make sure that one of ``project_src`` + and ``definition`` is provided. The modules crashed if none were provided + (https://github.com/ansible-collections/community.docker/issues/885, https://github.com/ansible-collections/community.docker/pull/886). + release_summary: Bugfix release. + fragments: + - 3.10.4.yml + - 881-docker-compose-v1-api-version.yml + - 886-compose-v2-req.yml + release_date: '2024-06-16' 3.2.0: changes: deprecated_features: diff --git a/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py b/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py index 234a94fe2..58ea7dc28 100644 --- a/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py +++ b/ansible_collections/community/docker/plugins/doc_fragments/compose_v2.py @@ -18,7 +18,7 @@ options: - Path to a directory containing a Compose file (C(compose.yml), C(compose.yaml), C(docker-compose.yml), or C(docker-compose.yaml)). - If O(files) is provided, will look for these files in this directory instead. - - Mutually exclusive with O(definition). + - Mutually exclusive with O(definition). One of O(project_src) and O(definition) must be provided. type: path project_name: description: @@ -37,7 +37,7 @@ options: definition: description: - Compose file describing one or more services, networks and volumes. - - Mutually exclusive with O(project_src) and O(files). + - Mutually exclusive with O(project_src) and O(files). One of O(project_src) and O(definition) must be provided. - If provided, PyYAML must be available to this module, and O(project_name) must be specified. - Note that a temporary directory will be created and deleted afterwards when using this option. type: dict diff --git a/ansible_collections/community/docker/plugins/module_utils/compose_v2.py b/ansible_collections/community/docker/plugins/module_utils/compose_v2.py index 85fbd5d80..80d6be66f 100644 --- a/ansible_collections/community/docker/plugins/module_utils/compose_v2.py +++ b/ansible_collections/community/docker/plugins/module_utils/compose_v2.py @@ -518,6 +518,9 @@ def common_compose_argspec_ex(): ('definition', 'project_src'), ('definition', 'files') ], + required_one_of=[ + ('definition', 'project_src'), + ], required_by={ 'definition': ('project_name', ), }, diff --git a/ansible_collections/community/docker/plugins/modules/docker_compose.py b/ansible_collections/community/docker/plugins/modules/docker_compose.py index 3af3bebb1..dcba5adfb 100644 --- a/ansible_collections/community/docker/plugins/modules/docker_compose.py +++ b/ansible_collections/community/docker/plugins/modules/docker_compose.py @@ -675,6 +675,9 @@ class ContainerManager(DockerBaseClass): for key, value in client.module.params.items(): setattr(self, key, value) + if self.api_version: + os.environ['COMPOSE_API_VERSION'] = self.api_version + self.check_mode = client.check_mode if not self.debug: diff --git a/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py b/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py index 9972d45f6..921294bf9 100644 --- a/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py +++ b/ansible_collections/community/docker/plugins/modules/docker_compose_v2.py @@ -169,7 +169,7 @@ EXAMPLES = ''' ansible.builtin.debug: var: output - - name: Run `docker-compose up` again + - name: Run `docker compose up` again community.docker.docker_compose_v2: project_src: flask register: output diff --git a/ansible_collections/community/docker/tests/integration/targets/connection_docker/runme.sh b/ansible_collections/community/docker/tests/integration/targets/connection_docker/runme.sh index 0965c5d72..4ebbf22e2 100755 --- a/ansible_collections/community/docker/tests/integration/targets/connection_docker/runme.sh +++ b/ansible_collections/community/docker/tests/integration/targets/connection_docker/runme.sh @@ -42,12 +42,12 @@ trap cleanup INT TERM EXIT echo "Start containers" for CONTAINER in ${DOCKER_CONTAINERS}; do if [ "${ANSIBLE_TEST_COVERAGE:-}" == "" ]; then - docker run --rm --name ${CONTAINER} --detach "${IMAGE}" /bin/sh -c 'sleep 10m' + docker run --rm --name "${CONTAINER}" --detach "${IMAGE}" /bin/sh -c 'sleep 10m' else - docker run --rm --name ${CONTAINER} --detach -v /tmp:/tmp "${IMAGE}" /bin/sh -c 'sleep 10m' - docker exec ${CONTAINER} pip3 install coverage + docker run --rm --name "${CONTAINER}" --detach -v /tmp:/tmp "${IMAGE}" /bin/sh -c 'sleep 10m' + docker exec "${CONTAINER}" pip3 install coverage fi - echo ${CONTAINER} + echo "${CONTAINER}" done cat > test_connection.inventory << EOF diff --git a/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/runme.sh b/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/runme.sh index 893b019ad..ea5588a6a 100755 --- a/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/runme.sh +++ b/ansible_collections/community/docker/tests/integration/targets/connection_docker_api/runme.sh @@ -42,12 +42,12 @@ trap cleanup INT TERM EXIT echo "Start containers" for CONTAINER in ${DOCKER_CONTAINERS}; do if [ "${ANSIBLE_TEST_COVERAGE:-}" == "" ]; then - docker run --rm --name ${CONTAINER} --detach "${IMAGE}" /bin/sh -c 'sleep 10m' + docker run --rm --name "${CONTAINER}" --detach "${IMAGE}" /bin/sh -c 'sleep 10m' else - docker run --rm --name ${CONTAINER} --detach -v /tmp:/tmp "${IMAGE}" /bin/sh -c 'sleep 10m' - docker exec ${CONTAINER} pip3 install coverage + docker run --rm --name "${CONTAINER}" --detach -v /tmp:/tmp "${IMAGE}" /bin/sh -c 'sleep 10m' + docker exec "${CONTAINER}" pip3 install coverage fi - echo ${CONTAINER} + echo "${CONTAINER}" done cat > test_connection.inventory << EOF diff --git a/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml b/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml index 8ea59f865..34d518872 100644 --- a/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml +++ b/ansible_collections/community/docker/tests/integration/targets/docker_compose/tasks/main.yml @@ -19,7 +19,11 @@ msg: "Using container name prefix {{ cname_prefix }}" # Run the tests -- block: +- module_defaults: + community.docker.docker_compose: + api_version: '{{ omit if docker_api_version is version("1.45", "<") else "1.44" }}' + + block: - include_tasks: run-test.yml with_fileglob: - "tests/*.yml" diff --git a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml index f0698a3e4..bd619ad5b 100644 --- a/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml +++ b/ansible_collections/community/docker/tests/integration/targets/setup_docker_compose_v1/vars/Archlinux.yml @@ -7,3 +7,5 @@ docker_compose_pip_packages: - docker-compose # Force PyYAML to 5.3.1 - PyYAML==5.3.1 + # Force requests to < 2.32.0 (https://github.com/docker/docker-py/issues/3256) + - requests<2.32.0 diff --git a/ansible_collections/community/general/.azure-pipelines/azure-pipelines.yml b/ansible_collections/community/general/.azure-pipelines/azure-pipelines.yml index 7dc438ad3..3f9293ac1 100644 --- a/ansible_collections/community/general/.azure-pipelines/azure-pipelines.yml +++ b/ansible_collections/community/general/.azure-pipelines/azure-pipelines.yml @@ -53,7 +53,7 @@ variables: resources: containers: - container: default - image: quay.io/ansible/azure-pipelines-test-container:4.0.1 + image: quay.io/ansible/azure-pipelines-test-container:6.0.0 pool: Standard @@ -127,6 +127,7 @@ stages: - test: '3.10' - test: '3.11' - test: '3.12' + - test: '3.13' - stage: Units_2_17 displayName: Units 2.17 dependsOn: [] @@ -354,6 +355,7 @@ stages: targets: - test: '3.8' - test: '3.11' + - test: '3.13' - stage: Generic_2_17 displayName: Generic 2.17 dependsOn: [] diff --git a/ansible_collections/community/general/.github/BOTMETA.yml b/ansible_collections/community/general/.github/BOTMETA.yml index add324935..faedb4260 100644 --- a/ansible_collections/community/general/.github/BOTMETA.yml +++ b/ansible_collections/community/general/.github/BOTMETA.yml @@ -157,6 +157,8 @@ files: $filters/jc.py: maintainers: kellyjonbrazil $filters/json_query.py: {} + $filters/keep_keys.py: + maintainers: vbotka $filters/lists.py: maintainers: cfiehe $filters/lists_difference.yml: @@ -170,6 +172,10 @@ files: $filters/lists_union.yml: maintainers: cfiehe $filters/random_mac.py: {} + $filters/remove_keys.py: + maintainers: vbotka + $filters/replace_keys.py: + maintainers: vbotka $filters/time.py: maintainers: resmo $filters/to_days.yml: @@ -502,12 +508,16 @@ files: maintainers: tintoy $modules/discord.py: maintainers: cwollinger + $modules/django_check.py: + maintainers: russoz + $modules/django_command.py: + maintainers: russoz + $modules/django_createcachetable.py: + maintainers: russoz $modules/django_manage.py: ignore: scottanderson42 tastychutney labels: django_manage maintainers: russoz - $modules/django_command.py: - maintainers: russoz $modules/dnf_versionlock.py: maintainers: moreda $modules/dnf_config_manager.py: @@ -1415,6 +1425,8 @@ files: ignore: matze labels: zypper maintainers: $team_suse + $plugin_utils/keys_filter.py: + maintainers: vbotka $plugin_utils/unsafe.py: maintainers: felixfontein $tests/a_module.py: @@ -1454,6 +1466,10 @@ files: maintainers: baldwinSPC nurfet-becirevic t0mk teebes docs/docsite/rst/guide_scaleway.rst: maintainers: $team_scaleway + docs/docsite/rst/guide_deps.rst: + maintainers: russoz + docs/docsite/rst/guide_vardict.rst: + maintainers: russoz docs/docsite/rst/test_guide.rst: maintainers: felixfontein ######################### @@ -1485,7 +1501,7 @@ macros: team_ansible_core: team_aix: MorrisA bcoca d-little flynn1973 gforster kairoaraujo marvin-sinister mator molekuul ramooncamacho wtcross team_bsd: JoergFiedler MacLemon bcoca dch jasperla mekanix opoplawski overhacked tuxillo - team_consul: sgargan apollo13 + team_consul: sgargan apollo13 Ilgmi team_cyberark_conjur: jvanderhoof ryanprior team_e_spirit: MatrixCrawler getjack team_flatpak: JayKayy oolongbrothers diff --git a/ansible_collections/community/general/CHANGELOG.md b/ansible_collections/community/general/CHANGELOG.md index 91922fb7a..7a752cb6a 100644 --- a/ansible_collections/community/general/CHANGELOG.md +++ b/ansible_collections/community/general/CHANGELOG.md @@ -2,42 +2,118 @@ **Topics** -- <a href="#v9-0-1">v9\.0\.1</a> +- <a href="#v9-1-0">v9\.1\.0</a> - <a href="#release-summary">Release Summary</a> - <a href="#minor-changes">Minor Changes</a> + - <a href="#deprecated-features">Deprecated Features</a> - <a href="#bugfixes">Bugfixes</a> -- <a href="#v9-0-0">v9\.0\.0</a> + - <a href="#known-issues">Known Issues</a> + - <a href="#new-plugins">New Plugins</a> + - <a href="#filter">Filter</a> + - <a href="#new-modules">New Modules</a> +- <a href="#v9-0-1">v9\.0\.1</a> - <a href="#release-summary-1">Release Summary</a> - <a href="#minor-changes-1">Minor Changes</a> + - <a href="#bugfixes-1">Bugfixes</a> +- <a href="#v9-0-0">v9\.0\.0</a> + - <a href="#release-summary-2">Release Summary</a> + - <a href="#minor-changes-2">Minor Changes</a> - <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a> - - <a href="#deprecated-features">Deprecated Features</a> + - <a href="#deprecated-features-1">Deprecated Features</a> - <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a> - <a href="#security-fixes">Security Fixes</a> - - <a href="#bugfixes-1">Bugfixes</a> - - <a href="#new-plugins">New Plugins</a> + - <a href="#bugfixes-2">Bugfixes</a> + - <a href="#new-plugins-1">New Plugins</a> - <a href="#become">Become</a> - <a href="#callback">Callback</a> - <a href="#connection">Connection</a> - - <a href="#filter">Filter</a> + - <a href="#filter-1">Filter</a> - <a href="#lookup">Lookup</a> - <a href="#test">Test</a> - - <a href="#new-modules">New Modules</a> + - <a href="#new-modules-1">New Modules</a> This changelog describes changes after version 8\.0\.0\. +<a id="v9-1-0"></a> +## v9\.1\.0 + +<a id="release-summary"></a> +### Release Summary + +Regular feature and bugfix release\. + +<a id="minor-changes"></a> +### Minor Changes + +* CmdRunner module util \- argument formats can be specified as plain functions without calling <code>cmd\_runner\_fmt\.as\_func\(\)</code> \([https\://github\.com/ansible\-collections/community\.general/pull/8479](https\://github\.com/ansible\-collections/community\.general/pull/8479)\)\. +* ansible\_galaxy\_install \- add upgrade feature \([https\://github\.com/ansible\-collections/community\.general/pull/8431](https\://github\.com/ansible\-collections/community\.general/pull/8431)\, [https\://github\.com/ansible\-collections/community\.general/issues/8351](https\://github\.com/ansible\-collections/community\.general/issues/8351)\)\. +* cargo \- add option <code>directory</code>\, which allows source directory to be specified \([https\://github\.com/ansible\-collections/community\.general/pull/8480](https\://github\.com/ansible\-collections/community\.general/pull/8480)\)\. +* cmd\_runner module utils \- add decorator <code>cmd\_runner\_fmt\.stack</code> \([https\://github\.com/ansible\-collections/community\.general/pull/8415](https\://github\.com/ansible\-collections/community\.general/pull/8415)\)\. +* cmd\_runner\_fmt module utils \- simplify implementation of <code>cmd\_runner\_fmt\.as\_bool\_not\(\)</code> \([https\://github\.com/ansible\-collections/community\.general/pull/8512](https\://github\.com/ansible\-collections/community\.general/pull/8512)\)\. +* ipa\_dnsrecord \- adds <code>SSHFP</code> record type for managing SSH fingerprints in FreeIPA DNS \([https\://github\.com/ansible\-collections/community\.general/pull/8404](https\://github\.com/ansible\-collections/community\.general/pull/8404)\)\. +* keycloak\_client \- assign auth flow by name \([https\://github\.com/ansible\-collections/community\.general/pull/8428](https\://github\.com/ansible\-collections/community\.general/pull/8428)\)\. +* openbsd\_pkg \- adds diff support to show changes in installed package list\. This does not yet work for check mode \([https\://github\.com/ansible\-collections/community\.general/pull/8402](https\://github\.com/ansible\-collections/community\.general/pull/8402)\)\. +* proxmox \- allow specification of the API port when using proxmox\_\* \([https\://github\.com/ansible\-collections/community\.general/issues/8440](https\://github\.com/ansible\-collections/community\.general/issues/8440)\, [https\://github\.com/ansible\-collections/community\.general/pull/8441](https\://github\.com/ansible\-collections/community\.general/pull/8441)\)\. +* proxmox\_vm\_info \- add <code>network</code> option to retrieve current network information \([https\://github\.com/ansible\-collections/community\.general/pull/8471](https\://github\.com/ansible\-collections/community\.general/pull/8471)\)\. +* redfish\_command \- add <code>wait</code> and <code>wait\_timeout</code> options to allow a user to block a command until a service is accessible after performing the requested command \([https\://github\.com/ansible\-collections/community\.general/issues/8051](https\://github\.com/ansible\-collections/community\.general/issues/8051)\, [https\://github\.com/ansible\-collections/community\.general/pull/8434](https\://github\.com/ansible\-collections/community\.general/pull/8434)\)\. +* redfish\_info \- add command <code>CheckAvailability</code> to check if a service is accessible \([https\://github\.com/ansible\-collections/community\.general/issues/8051](https\://github\.com/ansible\-collections/community\.general/issues/8051)\, [https\://github\.com/ansible\-collections/community\.general/pull/8434](https\://github\.com/ansible\-collections/community\.general/pull/8434)\)\. +* redis\_info \- adds support for getting cluster info \([https\://github\.com/ansible\-collections/community\.general/pull/8464](https\://github\.com/ansible\-collections/community\.general/pull/8464)\)\. + +<a id="deprecated-features"></a> +### Deprecated Features + +* CmdRunner module util \- setting the value of the <code>ignore\_none</code> parameter within a <code>CmdRunner</code> context is deprecated and that feature should be removed in community\.general 12\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/8479](https\://github\.com/ansible\-collections/community\.general/pull/8479)\)\. +* git\_config \- the <code>list\_all</code> option has been deprecated and will be removed in community\.general 11\.0\.0\. Use the <code>community\.general\.git\_config\_info</code> module instead \([https\://github\.com/ansible\-collections/community\.general/pull/8453](https\://github\.com/ansible\-collections/community\.general/pull/8453)\)\. +* git\_config \- using <code>state\=present</code> without providing <code>value</code> is deprecated and will be disallowed in community\.general 11\.0\.0\. Use the <code>community\.general\.git\_config\_info</code> module instead to read a value \([https\://github\.com/ansible\-collections/community\.general/pull/8453](https\://github\.com/ansible\-collections/community\.general/pull/8453)\)\. + +<a id="bugfixes"></a> +### Bugfixes + +* git\_config \- fix behavior of <code>state\=absent</code> if <code>value</code> is present \([https\://github\.com/ansible\-collections/community\.general/issues/8436](https\://github\.com/ansible\-collections/community\.general/issues/8436)\, [https\://github\.com/ansible\-collections/community\.general/pull/8452](https\://github\.com/ansible\-collections/community\.general/pull/8452)\)\. +* keycloak\_realm \- add normalizations for <code>attributes</code> and <code>protocol\_mappers</code> \([https\://github\.com/ansible\-collections/community\.general/pull/8496](https\://github\.com/ansible\-collections/community\.general/pull/8496)\)\. +* launched \- correctly report changed status in check mode \([https\://github\.com/ansible\-collections/community\.general/pull/8406](https\://github\.com/ansible\-collections/community\.general/pull/8406)\)\. +* opennebula inventory plugin \- fix invalid reference to IP when inventory runs against NICs with no IPv4 address \([https\://github\.com/ansible\-collections/community\.general/pull/8489](https\://github\.com/ansible\-collections/community\.general/pull/8489)\)\. +* opentelemetry callback \- do not save the JSON response when using the <code>ansible\.builtin\.uri</code> module \([https\://github\.com/ansible\-collections/community\.general/pull/8430](https\://github\.com/ansible\-collections/community\.general/pull/8430)\)\. +* opentelemetry callback \- do not save the content response when using the <code>ansible\.builtin\.slurp</code> module \([https\://github\.com/ansible\-collections/community\.general/pull/8430](https\://github\.com/ansible\-collections/community\.general/pull/8430)\)\. +* paman \- do not fail if an empty list of packages has been provided and there is nothing to do \([https\://github\.com/ansible\-collections/community\.general/pull/8514](https\://github\.com/ansible\-collections/community\.general/pull/8514)\)\. + +<a id="known-issues"></a> +### Known Issues + +* homectl \- the module does not work under Python 3\.13 or newer\, since it relies on the removed <code>crypt</code> standard library module \([https\://github\.com/ansible\-collections/community\.general/issues/4691](https\://github\.com/ansible\-collections/community\.general/issues/4691)\, [https\://github\.com/ansible\-collections/community\.general/pull/8497](https\://github\.com/ansible\-collections/community\.general/pull/8497)\)\. +* udm\_user \- the module does not work under Python 3\.13 or newer\, since it relies on the removed <code>crypt</code> standard library module \([https\://github\.com/ansible\-collections/community\.general/issues/4690](https\://github\.com/ansible\-collections/community\.general/issues/4690)\, [https\://github\.com/ansible\-collections/community\.general/pull/8497](https\://github\.com/ansible\-collections/community\.general/pull/8497)\)\. + +<a id="new-plugins"></a> +### New Plugins + +<a id="filter"></a> +#### Filter + +* community\.general\.keep\_keys \- Keep specific keys from dictionaries in a list\. +* community\.general\.remove\_keys \- Remove specific keys from dictionaries in a list\. +* community\.general\.replace\_keys \- Replace specific keys in a list of dictionaries\. + +<a id="new-modules"></a> +### New Modules + +* community\.general\.consul\_agent\_check \- Add\, modify\, and delete checks within a consul cluster\. +* community\.general\.consul\_agent\_service \- Add\, modify and delete services within a consul cluster\. +* community\.general\.django\_check \- Wrapper for C\(django\-admin check\)\. +* community\.general\.django\_createcachetable \- Wrapper for C\(django\-admin createcachetable\)\. + <a id="v9-0-1"></a> ## v9\.0\.1 -<a id="release-summary"></a> +<a id="release-summary-1"></a> ### Release Summary Bugfix release for inclusion in Ansible 10\.0\.0rc1\. -<a id="minor-changes"></a> +<a id="minor-changes-1"></a> ### Minor Changes * ansible\_galaxy\_install \- minor refactor in the module \([https\://github\.com/ansible\-collections/community\.general/pull/8413](https\://github\.com/ansible\-collections/community\.general/pull/8413)\)\. -<a id="bugfixes"></a> +<a id="bugfixes-1"></a> ### Bugfixes * cpanm \- use new <code>VarDict</code> to prevent deprecation warning \([https\://github\.com/ansible\-collections/community\.general/issues/8410](https\://github\.com/ansible\-collections/community\.general/issues/8410)\, [https\://github\.com/ansible\-collections/community\.general/pull/8411](https\://github\.com/ansible\-collections/community\.general/pull/8411)\)\. @@ -56,12 +132,12 @@ Bugfix release for inclusion in Ansible 10\.0\.0rc1\. <a id="v9-0-0"></a> ## v9\.0\.0 -<a id="release-summary-1"></a> +<a id="release-summary-2"></a> ### Release Summary This is release 9\.0\.0 of <code>community\.general</code>\, released on 2024\-05\-20\. -<a id="minor-changes-1"></a> +<a id="minor-changes-2"></a> ### Minor Changes * PythonRunner module utils \- specialisation of <code>CmdRunner</code> to execute Python scripts \([https\://github\.com/ansible\-collections/community\.general/pull/8289](https\://github\.com/ansible\-collections/community\.general/pull/8289)\)\. @@ -190,7 +266,7 @@ This is release 9\.0\.0 of <code>community\.general</code>\, released on 2024\-0 * django\_manage \- the module will now fail if <code>virtualenv</code> is specified but no virtual environment exists at that location \([https\://github\.com/ansible\-collections/community\.general/pull/8198](https\://github\.com/ansible\-collections/community\.general/pull/8198)\)\. * redfish\_command\, redfish\_config\, redfish\_info \- change the default for <code>timeout</code> from 10 to 60 \([https\://github\.com/ansible\-collections/community\.general/pull/8198](https\://github\.com/ansible\-collections/community\.general/pull/8198)\)\. -<a id="deprecated-features"></a> +<a id="deprecated-features-1"></a> ### Deprecated Features * MH DependencyCtxMgr module\_utils \- deprecate <code>module\_utils\.mh\.mixin\.deps\.DependencyCtxMgr</code> in favour of <code>module\_utils\.deps</code> \([https\://github\.com/ansible\-collections/community\.general/pull/8280](https\://github\.com/ansible\-collections/community\.general/pull/8280)\)\. @@ -231,7 +307,7 @@ This is release 9\.0\.0 of <code>community\.general</code>\, released on 2024\-0 * cobbler\, gitlab\_runners\, icinga2\, linode\, lxd\, nmap\, online\, opennebula\, proxmox\, scaleway\, stackpath\_compute\, virtualbox\, and xen\_orchestra inventory plugin \- 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\.general/pull/8098](https\://github\.com/ansible\-collections/community\.general/pull/8098)\)\. * keycloak\_identity\_provider \- the client secret was not correctly sanitized by the module\. The return values <code>proposed</code>\, <code>existing</code>\, and <code>end\_state</code>\, as well as the diff\, did contain the client secret unmasked \([https\://github\.com/ansible\-collections/community\.general/pull/8355](https\://github\.com/ansible\-collections/community\.general/pull/8355)\)\. -<a id="bugfixes-1"></a> +<a id="bugfixes-2"></a> ### Bugfixes * aix\_filesystem \- fix <code>\_validate\_vg</code> not passing VG name to <code>lsvg\_cmd</code> \([https\://github\.com/ansible\-collections/community\.general/issues/8151](https\://github\.com/ansible\-collections/community\.general/issues/8151)\)\. @@ -306,7 +382,7 @@ This is release 9\.0\.0 of <code>community\.general</code>\, released on 2024\-0 * to\_ini filter plugin \- disabling interpolation of <code>ConfigParser</code> to allow converting values with a <code>\%</code> sign \([https\://github\.com/ansible\-collections/community\.general/issues/8183](https\://github\.com/ansible\-collections/community\.general/issues/8183)\, [https\://github\.com/ansible\-collections/community\.general/pull/8185](https\://github\.com/ansible\-collections/community\.general/pull/8185)\)\. * xml \- make module work with lxml 5\.1\.1\, which removed some internals that the module was relying on \([https\://github\.com/ansible\-collections/community\.general/pull/8169](https\://github\.com/ansible\-collections/community\.general/pull/8169)\)\. -<a id="new-plugins"></a> +<a id="new-plugins-1"></a> ### New Plugins <a id="become"></a> @@ -325,7 +401,7 @@ This is release 9\.0\.0 of <code>community\.general</code>\, released on 2024\-0 * community\.general\.incus \- Run tasks in Incus instances via the Incus CLI\. -<a id="filter"></a> +<a id="filter-1"></a> #### Filter * community\.general\.from\_ini \- Converts INI text input into a dictionary\. @@ -346,7 +422,7 @@ This is release 9\.0\.0 of <code>community\.general</code>\, released on 2024\-0 * community\.general\.fqdn\_valid \- Validates fully\-qualified domain names against RFC 1123\. -<a id="new-modules"></a> +<a id="new-modules-1"></a> ### New Modules * community\.general\.consul\_acl\_bootstrap \- Bootstrap ACLs in Consul\. diff --git a/ansible_collections/community/general/CHANGELOG.rst b/ansible_collections/community/general/CHANGELOG.rst index 384bee747..523acb975 100644 --- a/ansible_collections/community/general/CHANGELOG.rst +++ b/ansible_collections/community/general/CHANGELOG.rst @@ -6,6 +6,73 @@ Community General Release Notes This changelog describes changes after version 8.0.0. +v9.1.0 +====== + +Release Summary +--------------- + +Regular feature and bugfix release. + +Minor Changes +------------- + +- CmdRunner module util - argument formats can be specified as plain functions without calling ``cmd_runner_fmt.as_func()`` (https://github.com/ansible-collections/community.general/pull/8479). +- ansible_galaxy_install - add upgrade feature (https://github.com/ansible-collections/community.general/pull/8431, https://github.com/ansible-collections/community.general/issues/8351). +- cargo - add option ``directory``, which allows source directory to be specified (https://github.com/ansible-collections/community.general/pull/8480). +- cmd_runner module utils - add decorator ``cmd_runner_fmt.stack`` (https://github.com/ansible-collections/community.general/pull/8415). +- cmd_runner_fmt module utils - simplify implementation of ``cmd_runner_fmt.as_bool_not()`` (https://github.com/ansible-collections/community.general/pull/8512). +- ipa_dnsrecord - adds ``SSHFP`` record type for managing SSH fingerprints in FreeIPA DNS (https://github.com/ansible-collections/community.general/pull/8404). +- keycloak_client - assign auth flow by name (https://github.com/ansible-collections/community.general/pull/8428). +- openbsd_pkg - adds diff support to show changes in installed package list. This does not yet work for check mode (https://github.com/ansible-collections/community.general/pull/8402). +- proxmox - allow specification of the API port when using proxmox_* (https://github.com/ansible-collections/community.general/issues/8440, https://github.com/ansible-collections/community.general/pull/8441). +- proxmox_vm_info - add ``network`` option to retrieve current network information (https://github.com/ansible-collections/community.general/pull/8471). +- redfish_command - add ``wait`` and ``wait_timeout`` options to allow a user to block a command until a service is accessible after performing the requested command (https://github.com/ansible-collections/community.general/issues/8051, https://github.com/ansible-collections/community.general/pull/8434). +- redfish_info - add command ``CheckAvailability`` to check if a service is accessible (https://github.com/ansible-collections/community.general/issues/8051, https://github.com/ansible-collections/community.general/pull/8434). +- redis_info - adds support for getting cluster info (https://github.com/ansible-collections/community.general/pull/8464). + +Deprecated Features +------------------- + +- CmdRunner module util - setting the value of the ``ignore_none`` parameter within a ``CmdRunner`` context is deprecated and that feature should be removed in community.general 12.0.0 (https://github.com/ansible-collections/community.general/pull/8479). +- git_config - the ``list_all`` option has been deprecated and will be removed in community.general 11.0.0. Use the ``community.general.git_config_info`` module instead (https://github.com/ansible-collections/community.general/pull/8453). +- git_config - using ``state=present`` without providing ``value`` is deprecated and will be disallowed in community.general 11.0.0. Use the ``community.general.git_config_info`` module instead to read a value (https://github.com/ansible-collections/community.general/pull/8453). + +Bugfixes +-------- + +- git_config - fix behavior of ``state=absent`` if ``value`` is present (https://github.com/ansible-collections/community.general/issues/8436, https://github.com/ansible-collections/community.general/pull/8452). +- keycloak_realm - add normalizations for ``attributes`` and ``protocol_mappers`` (https://github.com/ansible-collections/community.general/pull/8496). +- launched - correctly report changed status in check mode (https://github.com/ansible-collections/community.general/pull/8406). +- opennebula inventory plugin - fix invalid reference to IP when inventory runs against NICs with no IPv4 address (https://github.com/ansible-collections/community.general/pull/8489). +- opentelemetry callback - do not save the JSON response when using the ``ansible.builtin.uri`` module (https://github.com/ansible-collections/community.general/pull/8430). +- opentelemetry callback - do not save the content response when using the ``ansible.builtin.slurp`` module (https://github.com/ansible-collections/community.general/pull/8430). +- paman - do not fail if an empty list of packages has been provided and there is nothing to do (https://github.com/ansible-collections/community.general/pull/8514). + +Known Issues +------------ + +- homectl - the module does not work under Python 3.13 or newer, since it relies on the removed ``crypt`` standard library module (https://github.com/ansible-collections/community.general/issues/4691, https://github.com/ansible-collections/community.general/pull/8497). +- udm_user - the module does not work under Python 3.13 or newer, since it relies on the removed ``crypt`` standard library module (https://github.com/ansible-collections/community.general/issues/4690, https://github.com/ansible-collections/community.general/pull/8497). + +New Plugins +----------- + +Filter +~~~~~~ + +- community.general.keep_keys - Keep specific keys from dictionaries in a list. +- community.general.remove_keys - Remove specific keys from dictionaries in a list. +- community.general.replace_keys - Replace specific keys in a list of dictionaries. + +New Modules +----------- + +- community.general.consul_agent_check - Add, modify, and delete checks within a consul cluster. +- community.general.consul_agent_service - Add, modify and delete services within a consul cluster. +- community.general.django_check - Wrapper for C(django-admin check). +- community.general.django_createcachetable - Wrapper for C(django-admin createcachetable). + v9.0.1 ====== diff --git a/ansible_collections/community/general/FILES.json b/ansible_collections/community/general/FILES.json index 87fdd5c9a..41f20623d 100644 --- a/ansible_collections/community/general/FILES.json +++ b/ansible_collections/community/general/FILES.json @@ -109,7 +109,7 @@ "name": ".azure-pipelines/azure-pipelines.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "48eb26e372a37363159b6a17ba403c830d01c2cb29c106bfa8e9748ad534ff50", + "chksum_sha256": "a79320cab46fce92c3205300c9f17c58bc8dacbb21868bebe83636d4a730e99d", "format": 1 }, { @@ -193,7 +193,7 @@ "name": ".github/BOTMETA.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "95b932042b339875673fcbe218094b962576d3900511a041b9b7fb91a858e68c", + "chksum_sha256": "cc8b862bd68049694fb8b89ff204b657855e0a8f80ea78a643647d19ed4997f3", "format": 1 }, { @@ -312,7 +312,7 @@ "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0014fa74832def0e1d47b994b7aee9fbe393a30553ac051acc1f9a2ac886be6a", + "chksum_sha256": "7079dd86212c9c1ba677b86a9b240c210f0f9d591eba846bd2b871050032cbf0", "format": 1 }, { @@ -368,14 +368,14 @@ "name": "docs/docsite/helper/lists_mergeby/example-001_vars/default-common.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bd2eef902441d9c71b84d997508e78803e648c534e75c8b12323e199eeca81d6", + "chksum_sha256": "1cf297e6880eb27f8fd1da74208b089d70647a972fb8357f613e58bf40334fcd", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-001_vars/list3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "663a3b0429cd096b10b06038a561f01872a34bc0e611f535abc9e626a474b6a9", + "chksum_sha256": "3cdee8eb1544ce35baf81583ab7e7c722dbe81e5643c3013d2739f22919581c0", "format": 1 }, { @@ -389,14 +389,14 @@ "name": "docs/docsite/helper/lists_mergeby/example-002_vars/default-common.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bd2eef902441d9c71b84d997508e78803e648c534e75c8b12323e199eeca81d6", + "chksum_sha256": "1cf297e6880eb27f8fd1da74208b089d70647a972fb8357f613e58bf40334fcd", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-002_vars/list3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "852a8518e33c1d8a2144f1835f6a10b0c17fcc13850cf45475ce538a4312171e", + "chksum_sha256": "39da0ce92bf01050b04f3aafecad1870fba5b6970e7301a618f9445d885ddf94", "format": 1 }, { @@ -410,14 +410,14 @@ "name": "docs/docsite/helper/lists_mergeby/example-003_vars/default-recursive-true.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ce747f67c1635a6dfd887c7ebf3ee02c2014b9eced5773b08d747a11fd916a95", + "chksum_sha256": "40233cee2ac468835816e1e05b898c6c2444c89dafeb81f5aac16a26dc417734", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-003_vars/list3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "73003165935630df144177b3cbb78954f7eeaccc3031d694a1e1c2f8b365d99d", + "chksum_sha256": "2f7de68a5c297dc9bec3127737002cf214052069d709b77412df2c42eb03d3bb", "format": 1 }, { @@ -431,14 +431,14 @@ "name": "docs/docsite/helper/lists_mergeby/example-004_vars/default-recursive-true.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ce747f67c1635a6dfd887c7ebf3ee02c2014b9eced5773b08d747a11fd916a95", + "chksum_sha256": "40233cee2ac468835816e1e05b898c6c2444c89dafeb81f5aac16a26dc417734", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-004_vars/list3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1b04d243241c56ad51cdee8c34a6475af76482801a74a55a269a296122c3be44", + "chksum_sha256": "a260b433df2d9d689bf5cd61141e91a40f86677c944f8ad75e85da0c1fb02a31", "format": 1 }, { @@ -452,14 +452,14 @@ "name": "docs/docsite/helper/lists_mergeby/example-005_vars/default-recursive-true.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ce747f67c1635a6dfd887c7ebf3ee02c2014b9eced5773b08d747a11fd916a95", + "chksum_sha256": "40233cee2ac468835816e1e05b898c6c2444c89dafeb81f5aac16a26dc417734", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-005_vars/list3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d4541eb704de6d64c4c34c12cc22328e19016c66811e99af22b4be27053d9526", + "chksum_sha256": "2a198e5156b90d540962bf0adfffdb445294449e815cf2c0471efcafdfd3a996", "format": 1 }, { @@ -473,14 +473,14 @@ "name": "docs/docsite/helper/lists_mergeby/example-006_vars/default-recursive-true.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ce747f67c1635a6dfd887c7ebf3ee02c2014b9eced5773b08d747a11fd916a95", + "chksum_sha256": "40233cee2ac468835816e1e05b898c6c2444c89dafeb81f5aac16a26dc417734", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-006_vars/list3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "205959e977ba30d49bdfd879f4b7bb2f50b50762361d89b2360cbb419a6af931", + "chksum_sha256": "577f0bd0c766630aa359f0453691007d9a9d3a0f4535b9b9b161ce407bff2d6d", "format": 1 }, { @@ -494,14 +494,14 @@ "name": "docs/docsite/helper/lists_mergeby/example-007_vars/default-recursive-true.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ce747f67c1635a6dfd887c7ebf3ee02c2014b9eced5773b08d747a11fd916a95", + "chksum_sha256": "40233cee2ac468835816e1e05b898c6c2444c89dafeb81f5aac16a26dc417734", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-007_vars/list3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f5517facd2643e52b06c5181df7768b096b2916ac411f7403484f0ad1b7d8ee1", + "chksum_sha256": "41b95615fb4eca9d5beab31ea436ca9875a2b2d109dc036919cd68388fc64b17", "format": 1 }, { @@ -515,119 +515,154 @@ "name": "docs/docsite/helper/lists_mergeby/example-008_vars/default-recursive-true.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ce747f67c1635a6dfd887c7ebf3ee02c2014b9eced5773b08d747a11fd916a95", + "chksum_sha256": "40233cee2ac468835816e1e05b898c6c2444c89dafeb81f5aac16a26dc417734", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-008_vars/list3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a833536f106aebd7a5f737743f96c791302260e72f9393be53bdda0a86a10c9a", + "chksum_sha256": "9b2d102869f86a54b1ad7c5b38bdd6515aa3b7e444747069dce98d32fa12f640", + "format": 1 + }, + { + "name": "docs/docsite/helper/lists_mergeby/example-009_vars", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "docs/docsite/helper/lists_mergeby/example-009_vars/default-common.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1cf297e6880eb27f8fd1da74208b089d70647a972fb8357f613e58bf40334fcd", + "format": 1 + }, + { + "name": "docs/docsite/helper/lists_mergeby/example-009_vars/list3.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4523d397880b12fc1b8ec3c85403c30cf59e95fdfafc9b40e4e3279856f3fa5a", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/default-common.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bd2eef902441d9c71b84d997508e78803e648c534e75c8b12323e199eeca81d6", + "chksum_sha256": "1cf297e6880eb27f8fd1da74208b089d70647a972fb8357f613e58bf40334fcd", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/default-recursive-true.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ce747f67c1635a6dfd887c7ebf3ee02c2014b9eced5773b08d747a11fd916a95", + "chksum_sha256": "40233cee2ac468835816e1e05b898c6c2444c89dafeb81f5aac16a26dc417734", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-001.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ec664dbed63f2d8f9d7173a44f6f53b8aac3917e4c152082157ae06b2b64b717", + "chksum_sha256": "b7f83ae4eda65288a5c7b1e448d3f379ac69f5c40c0bbb2b180d0ad71b33ac3b", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-002.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "174db79b357280e60b4b37b96e77708148894d4d81571fa10d65d9846bbcf365", + "chksum_sha256": "c5abd9609513167ba5a0df49223fb9269e288d3ecd597004a6ae066179c6d368", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-003.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5fac7cdbb3fc0b3addddb5ffaa58fcbf241df07195b41ad011f2550df1281fc7", + "chksum_sha256": "211edd2c682dcee996f4211f8c832896401ef0dc76f38f6e91aef6c5789d7721", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-004.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c7781daf8df6f6e6403fc8bd8ba40a6a5515e24b1ffa96f85b4d3cb2e23d926e", + "chksum_sha256": "05090716aaf46cb3ed48035d83482aec11ff0b3c30cc850f30fb5320844c8877", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-005.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c02a2a83fc72b27668c5ce96e0c3feb466ea89047f5fa8bc961260bce0aa97b5", + "chksum_sha256": "6dc6b4160e81b1d49936db28762428d182da87441fa66817146daa4b747998b2", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-006.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9eda979168ded0b39e43a4ae0e02c38cdccecc236604b61cbf80069869e762e3", + "chksum_sha256": "03adfa30300af062e28fb963bc2472cabf4102dce03e088470727ee35df488db", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-007.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "78a002ab23ee4a16c60322ce988af490a5d900131fb621ada85541afee932fdd", + "chksum_sha256": "c5ab5b8f580cd9bca71c93f2e0581593e170357d4a677fafefa10023524f6bd5", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/example-008.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "11c87a5bd327951a21baaf28e47d11c0c07e8a12cdcc5326fcd7f8b0d5217d56", + "chksum_sha256": "ac56a41a9e1bcdef1c80c590484f9081ec7f095106df18777a56e506a3a26970", + "format": 1 + }, + { + "name": "docs/docsite/helper/lists_mergeby/example-009.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1cb469396a08823b54768d987f12bf94414e82f218c3923d9af1c421833c09e1", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/examples.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "fe278ca276168ebfc2167cf5ad2e2d4b3cae0d6cdd246326b11620db259e2eb3", + "chksum_sha256": "f22163a6554b36a7df5d626e0061f3c4b8d83d4fe7f6c64b3f3ff3373598bb92", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/examples_all.rst.j2", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "31f8a0a79c3aebf801b74e0cc7587ea7486fc221a7ab948701211f0178310ace", + "chksum_sha256": "55874c71532504a32b927c036756f8e32a8dc6695f34c4451e91defa6c62b316", + "format": 1 + }, + { + "name": "docs/docsite/helper/lists_mergeby/extra-vars.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3cc1cfbd48140a9368dc9583683da172197ce124e3e1e44a75bb50e524945729", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "27fd7341d931b081d0caa6d9dbeacee7cd788bb5418019fb70e5794293f15582", + "chksum_sha256": "1f30ab3058307c531437e39abb3aaa7b0258b8a1537adcb82844f9b51d5bc1fc", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/list3.out.j2", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d228735e576466950b3a90b1de44b6a503de957521b3db41a492d742695d8d71", + "chksum_sha256": "e3a21ec55be646c12180396c2311c85d341ab5f75bf8a16ea09fe3c214b47da9", "format": 1 }, { "name": "docs/docsite/helper/lists_mergeby/playbook.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "825f6e9f15549cd02a8fa1cf5a6b6bdbc1dc39ff80ce59f5014af8c0358bee58", + "chksum_sha256": "840405c1b7fc7cd852404e9ee35337626f97cd6843457cc7ad5a4de50902a707", "format": 1 }, { @@ -683,7 +718,7 @@ "name": "docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a0a81486d2b415efa2e2f8576b3aadb98125e74b10b2113f13f6dcf1e652faed", + "chksum_sha256": "6b7a3ec73c58b87695919903c13805db6bac8c2b44d0a916f432651ac1e4ee58", "format": 1 }, { @@ -743,6 +778,13 @@ "format": 1 }, { + "name": "docs/docsite/rst/guide_deps.rst", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "df07337b3596ae5246294cceecf12ca46287436ad2e381a7e7d25a84ed33e9bd", + "format": 1 + }, + { "name": "docs/docsite/rst/guide_online.rst", "ftype": "file", "chksum_type": "sha256", @@ -764,6 +806,13 @@ "format": 1 }, { + "name": "docs/docsite/rst/guide_vardict.rst", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "eabc2712be99330fba6016b38ef1410427b115631ff10bad98922c1c0dc1705a", + "format": 1 + }, + { "name": "docs/docsite/rst/test_guide.rst", "ftype": "file", "chksum_type": "sha256", @@ -781,7 +830,7 @@ "name": "docs/docsite/extra-docs.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f3f9cbc513d494da6c34cf6db49319f34645a8dd1ee79736360c0e48643e76af", + "chksum_sha256": "3099ca216ce7a424bef49f96819691f5c0411bf838ebeb814f3fd2c0ef8c8eeb", "format": 1 }, { @@ -802,7 +851,7 @@ "name": "meta/runtime.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bdd7473e27902ea009dac03f604dd957a93413ee0275b561aff956ff26caf391", + "chksum_sha256": "6934d562c2c37a3ffb229276c9bfbaf2f869a1d9e0538072b004885e09c0b13f", "format": 1 }, { @@ -1075,7 +1124,7 @@ "name": "plugins/callback/opentelemetry.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6eb005c02c46afa1b07d7d7861b54496d30ced27113f10b156719b3f151b3014", + "chksum_sha256": "f53258ebf00c73a1ac7908a1e963b100673c586e1f68da40592caf0af78bdb10", "format": 1 }, { @@ -1278,7 +1327,7 @@ "name": "plugins/doc_fragments/django.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0836d2f746a8b62a1408455fdd54bcbd8f41342eb2f07a681b378b0efef5f3c8", + "chksum_sha256": "e30b30e859e4c2861828eee9c1b35b54c535ef2aa0ac77ba12cfcf1611ab9bb4", "format": 1 }, { @@ -1453,7 +1502,7 @@ "name": "plugins/doc_fragments/proxmox.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "daa7d15e8a1ffc6e4c539712099537ab9c0f667684d2bcf4ba89e196caf9e460", + "chksum_sha256": "b64edf0d5addde754b70fd42e65b304913c0ff2e45004853d04d0b2bd5adbbca", "format": 1 }, { @@ -1604,6 +1653,13 @@ "format": 1 }, { + "name": "plugins/filter/keep_keys.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f4474076e83cfe8850482fbe29663644d0ca4b15f179a0a2646b9b92bbe7b824", + "format": 1 + }, + { "name": "plugins/filter/lists.py", "ftype": "file", "chksum_type": "sha256", @@ -1628,7 +1684,7 @@ "name": "plugins/filter/lists_mergeby.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4163df17512c4388bf020417cdd3f9919db9c6f1c23b2a57852bd10523a0abbe", + "chksum_sha256": "6ab23ff362b7940d0ec340eda1ef9a0d3262dc6894a9139fa1357ffdbb2674da", "format": 1 }, { @@ -1653,6 +1709,20 @@ "format": 1 }, { + "name": "plugins/filter/remove_keys.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d8c3d19a4129c1007a675dbb97f9f593aa410c35887891dfeb556e68a5aec62a", + "format": 1 + }, + { + "name": "plugins/filter/replace_keys.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c5ddedca5a0fa34413b894a9e40991aa91ba6cb112269fe3e4bf311c86dc99bf", + "format": 1 + }, + { "name": "plugins/filter/time.py", "ftype": "file", "chksum_type": "sha256", @@ -1803,7 +1873,7 @@ "name": "plugins/inventory/opennebula.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "954bb22612557fbe3be3510d3ebc7e230164cb3dcb689345a287270b85234970", + "chksum_sha256": "e3fd2fdd5abb43a0690b6b97daa79d45bfa334268e9d1051f11a5806b87956e4", "format": 1 }, { @@ -2342,14 +2412,14 @@ "name": "plugins/module_utils/cmd_runner.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9b9f5d0e0ed818b1bdc80e8a6a4a858ba23f92bcaf6d5b224073b4e4a5de1e4c", + "chksum_sha256": "d627300d236348a1df761fcb8624c5d55f72c33938a08250097c7e28259294d8", "format": 1 }, { "name": "plugins/module_utils/consul.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9e572ae8233e2f4a72bbdaba9d39f0e0d631ff4ccb3684a32f853d0b7b6581bd", + "chksum_sha256": "3f55f60552f8187b7db9c4ce3bc915cf6e278594f21c0e30c5024af736aff172", "format": 1 }, { @@ -2391,7 +2461,7 @@ "name": "plugins/module_utils/django.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "78e63b0a1b6304d42171f878bcb50bfd1ff96bfead0ba41220c0b43b6ad1f7cb", + "chksum_sha256": "46b9d866dcc4432d3c7bf67b4e31037d1fdd064bf421359a1c1660bd4331bc32", "format": 1 }, { @@ -2587,7 +2657,7 @@ "name": "plugins/module_utils/proxmox.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "756e2b829ba10cf0f2d177b8729b92007ef23edaf1a708c064b1cbdb9b96b02c", + "chksum_sha256": "235bc199d79987aaa2d49984ad2b8140fbb58f3fa536109e82d660381316d57b", "format": 1 }, { @@ -2615,7 +2685,7 @@ "name": "plugins/module_utils/redfish_utils.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ce4679e15df51fc1a102f5f6f8ef1cb8f8153cfb5a896786c5531829d76ce0e2", + "chksum_sha256": "43fc29e5b41bc436a7c1d2face5334cc3a8a79861defbcece2dc5156b78c0081", "format": 1 }, { @@ -2811,7 +2881,7 @@ "name": "plugins/modules/ansible_galaxy_install.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7d6e02e1a7306d048c97e5e9f2e5553fe8ece50ded61a39f014af2fecd51da2a", + "chksum_sha256": "a482de0224539003f97a7cc019a7ec499c7fb3b40a95964f421c47f19d397935", "format": 1 }, { @@ -2986,7 +3056,7 @@ "name": "plugins/modules/cargo.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1f937d2d6b2eb1d54baaaddc8aad6e45ff219c1762ea07d73e028b1030b47601", + "chksum_sha256": "59179736f71cff627a2c85788a5cd93bc0885347bfeb5037bfd1d4921ba20382", "format": 1 }, { @@ -3137,17 +3207,31 @@ "format": 1 }, { + "name": "plugins/modules/consul_agent_check.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4b47d0ab359a40730c169d01873d0eb1023ade6c0c42529910cb047ec0fb4be1", + "format": 1 + }, + { + "name": "plugins/modules/consul_agent_service.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "dc493896df6b2b2754a68c557e7902214acfc9a34fcdaea25dd754e90a17c6e0", + "format": 1 + }, + { "name": "plugins/modules/consul_auth_method.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "776c407945f239f40ea36e24f42606d20141316ffa7f36e95cb3f00efa4c6bcb", + "chksum_sha256": "0ee3b66b9b873472ad25479c8809b34ea9da645e942efd602b9f0ff7fe6ccafd", "format": 1 }, { "name": "plugins/modules/consul_binding_rule.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bfc78b6b53d3ad705f099e2ed04eaff75ab0d1ef3d823b3de58d6881efe2178d", + "chksum_sha256": "78859326d12520ddec8e4f3b324f6e7b8150e8252a0babd4dc7932ae29dad096", "format": 1 }, { @@ -3161,14 +3245,14 @@ "name": "plugins/modules/consul_policy.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "05fcd6bd9085bb781d7f9bdc8a808f1e63f493d018299ce3dcb6a8c7f89ae729", + "chksum_sha256": "3757983feca43c6da4a0cf08fc6dbbf71f6095bf7e16cf6f3698d47fe171cb5f", "format": 1 }, { "name": "plugins/modules/consul_role.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f18b68eab0c232b18fefe5d66164dfa49e4e9c11396616200e23b0774c98c5ae", + "chksum_sha256": "33f6b5f02c216241fef4dd98371c08737c1cb8094f058f4a08f71828d4eeed0b", "format": 1 }, { @@ -3182,7 +3266,7 @@ "name": "plugins/modules/consul_token.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8572e2337ce15303534844ed997859fc6e26b3b5537ea80fbea280f1bfa17419", + "chksum_sha256": "34b3c9e7bed0b8566edb79ccdd46f49c466f7c261e0b69c1b1d748dcbbe6ab86", "format": 1 }, { @@ -3270,6 +3354,13 @@ "format": 1 }, { + "name": "plugins/modules/django_check.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5e028e8dd895fef7c8002e310ec5ac92c183c4993fc8d061c80fa0de916c057c", + "format": 1 + }, + { "name": "plugins/modules/django_command.py", "ftype": "file", "chksum_type": "sha256", @@ -3277,6 +3368,13 @@ "format": 1 }, { + "name": "plugins/modules/django_createcachetable.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "66f18cc86d806a4447888afd48e3e7d008933f0ee93b109c0fea62b5b8e1ec4a", + "format": 1 + }, + { "name": "plugins/modules/django_manage.py", "ftype": "file", "chksum_type": "sha256", @@ -3441,7 +3539,7 @@ "name": "plugins/modules/git_config.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3764f124422fcd3be0c60b955a6286da22e458fff5023c57ba73d0e90d3842a7", + "chksum_sha256": "92c164fb3a497d2d0887b0f239657c66d82f1ecd22cf2950a01c2f2b5b35e174", "format": 1 }, { @@ -3707,7 +3805,7 @@ "name": "plugins/modules/homectl.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f5af3533ea90dda0925e64715ea23b8aea4418020c0fb66115fa0595d452d749", + "chksum_sha256": "c8dac7831a418cc0385c4616484aefea40eddc91eef77f85404e58b3a6e47633", "format": 1 }, { @@ -4022,7 +4120,7 @@ "name": "plugins/modules/ipa_dnsrecord.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c8ae9aa977adb6ec60404eb8bf40adbaa7b1ce897e6707769d5e90230b40f16c", + "chksum_sha256": "2f3e8e8a7e64541c19873a1fb534afb8295f163d9c2204e6687031f68675ef31", "format": 1 }, { @@ -4351,7 +4449,7 @@ "name": "plugins/modules/keycloak_client.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7870103accbfbd0204f1b7adeee0e20b9a6b8cddad0edda0bd31ec252572f186", + "chksum_sha256": "1200158abd819a25429fc2ad8c563623c117c668e4740dc9ffa68b22b1660abc", "format": 1 }, { @@ -4372,7 +4470,7 @@ "name": "plugins/modules/keycloak_clientscope.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c712e8e6d6b9d27297f7fbed371d7338aea6c92c6fc940fea1cf9e8c4b897c71", + "chksum_sha256": "3bf4a3c511dca811693ec895233193c633ead77585e3f3710844e7f3f6cb3510", "format": 1 }, { @@ -4505,7 +4603,7 @@ "name": "plugins/modules/launchd.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "239bdd1ceebfc51da46babbede85732efd5aca73719214225bd505c202cc4915", + "chksum_sha256": "0008d09fc7fb13a3bd959dbbc7f0089a22a8d6c5720fdf0fb69acee361cddd62", "format": 1 }, { @@ -5233,7 +5331,7 @@ "name": "plugins/modules/openbsd_pkg.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "aa5f9a76a91826cfcf340da018cee24dec149b5d858e9161023cf94e5867ac09", + "chksum_sha256": "eea55d4a493ae779edcf4fa9d6d9d401c502b9cf0acc000c9c4c85fafe78215a", "format": 1 }, { @@ -5338,7 +5436,7 @@ "name": "plugins/modules/pacman.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3e92ff37a394cf3ee414ca9e55e928fae7d2875992630b8e80e7fad1c5d1273f", + "chksum_sha256": "77db65d60288cc9d30ab7fa148a1f94f969d61d6f5c23a34bf76fda8306fd478", "format": 1 }, { @@ -5597,7 +5695,7 @@ "name": "plugins/modules/proxmox_kvm.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "030cd0ca64eb1eac59e15bd62ce58239e6466b01391a6abc314feff1c8a32614", + "chksum_sha256": "afdba49a542d59df6afba627eb4a3ca187f9033070193b1db599667427102cfc", "format": 1 }, { @@ -5674,7 +5772,7 @@ "name": "plugins/modules/proxmox_vm_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9bb1491ad5da16bd483f659726e5d99a29ac784a23f615244165ad4d9bde0120", + "chksum_sha256": "84b5e54194e9b6f67c49b01b5e20b795bd67f3cd82adcece514d8256827bd2d0", "format": 1 }, { @@ -5730,7 +5828,7 @@ "name": "plugins/modules/redfish_command.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3a06abd918e13f440dcd7bd66a1eae9d77a414aa80dc231eba9ddad2c3fc16d7", + "chksum_sha256": "c3beab5266697dca3d00e13de6760bbcb8ca48dc39d1425ab1da361ba39eb051", "format": 1 }, { @@ -5744,7 +5842,7 @@ "name": "plugins/modules/redfish_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3f14d5645eb692b829ab83dac5e38eac9ea9fc7bae38f87ffd532ad2e8d49de5", + "chksum_sha256": "7a423fb3fd03d467af475d4823658c2ff3cba2f2c2a72ac63be4bca9292e5466", "format": 1 }, { @@ -5786,7 +5884,7 @@ "name": "plugins/modules/redis_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5c544a02b0415efa329c84abc4119e0039991bfadcbdae32d14d484c7443e47a", + "chksum_sha256": "ace8770d46241e343ba03a55a42f56d674acc9f88e4f12e06fe130c81bb1da41", "format": 1 }, { @@ -6444,7 +6542,7 @@ "name": "plugins/modules/udm_user.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "108d20d909305308b8e5e7a6bf5e323f154db4c473c02e47734e8fb0c8bc7b07", + "chksum_sha256": "b061e35e6e8ea1970710888fe431a17dd3739b40e59e6342846e50dbdd9154ef", "format": 1 }, { @@ -6798,6 +6896,13 @@ "format": 1 }, { + "name": "plugins/plugin_utils/keys_filter.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "950a97d3f8fc8d57b0495b08dc40be2ad47e4436e65c2ac1384a8b656c07c2b0", + "format": 1 + }, + { "name": "plugins/plugin_utils/unsafe.py", "ftype": "file", "chksum_type": "sha256", @@ -7130,7 +7235,7 @@ "name": "tests/integration/targets/ansible_galaxy_install/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "db8a8fd9d62a035862276fb8ce6bae558ccfe9ee6a03a498c561272236301307", + "chksum_sha256": "f6896e1d1f1b563728905f203d6623fcc9ced037e88132af50457c368d750fb8", "format": 1 }, { @@ -7662,7 +7767,7 @@ "name": "tests/integration/targets/cargo/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e5f66835ea6bd23ef85f61c95211e57f257d3f2ecab06d669afe311ba64045b3", + "chksum_sha256": "9370d274dfb0bec0b81f998ccc03441f09cbb731d9647e1810043a5857ff5c52", "format": 1 }, { @@ -7673,6 +7778,13 @@ "format": 1 }, { + "name": "tests/integration/targets/cargo/tasks/test_directory.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3aed8a73a3b83b455c377054f1198be385d5cfb5e055368be7222a70fc0f40a7", + "format": 1 + }, + { "name": "tests/integration/targets/cargo/tasks/test_general.yml", "ftype": "file", "chksum_type": "sha256", @@ -8051,6 +8163,20 @@ "format": 1 }, { + "name": "tests/integration/targets/consul/tasks/consul_agent_check.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ac1e5b0cf2a5483ba484c99016b34975759a6a8060a503603146d7c9be552f75", + "format": 1 + }, + { + "name": "tests/integration/targets/consul/tasks/consul_agent_service.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4f7deacb2c709ea660887c954c8005acc6f8163958cc71e9a5f5cec547784d33", + "format": 1 + }, + { "name": "tests/integration/targets/consul/tasks/consul_auth_method.yml", "ftype": "file", "chksum_type": "sha256", @@ -8110,7 +8236,7 @@ "name": "tests/integration/targets/consul/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6bafc431979010557c06259d8b5cccc03f49d1ec2097a26118dd3a2091fd4cc7", + "chksum_sha256": "76dec6dcfe653795428e6eaa8f0eb4c8eccd6d04d7c3896b99362c386ac93ffc", "format": 1 }, { @@ -9297,6 +9423,55 @@ "format": 1 }, { + "name": "tests/integration/targets/filter_keep_keys", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/filter_keep_keys/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/filter_keep_keys/tasks/keep_keys.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1ece426f8edfd07e80705b0925b97d70c0b020dc7ed6c2bd02dc7ed69834a85f", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_keep_keys/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "928ea7662292fac8633465e8405edf98c5e71c0c9de8b81d6cf1b33e7aabfe4c", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_keep_keys/vars", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/filter_keep_keys/vars/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "da6753430b6dea343d2a605d0a7af54e6ac66640bdca97159417c54c75696be0", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_keep_keys/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "96646c5ab7118c53b8b722f6abe91a7ed4d3eed9be401faefb399d6a8f427c2e", + "format": 1 + }, + { "name": "tests/integration/targets/filter_lists", "ftype": "dir", "chksum_type": null, @@ -9465,6 +9640,111 @@ "format": 1 }, { + "name": "tests/integration/targets/filter_remove_keys", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/filter_remove_keys/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/filter_remove_keys/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3815b9d04a798cc01c090d0494ca27544bec4a4a08bd1995fa8ff586e1201c40", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_remove_keys/tasks/remove_keys.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "430024a06df2b362cd3d5d658102a8389ddacc780613dde834d95c01cd5cff21", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_remove_keys/vars", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/filter_remove_keys/vars/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "19b18860ad324c02cfb996c048e2516e53e7d6b84f13059abeff602e9802120c", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_remove_keys/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "96646c5ab7118c53b8b722f6abe91a7ed4d3eed9be401faefb399d6a8f427c2e", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_replace_keys", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/filter_replace_keys/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/filter_replace_keys/tasks/fn-test-replace_keys.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b62bfcb4f9b61bc818b033993b111eb88196dbd8ddf6fa0942f93badf3274338", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_replace_keys/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1efdb33269dba21292e7b4525611ca41360277f60aaed0d476d3115b6b683c74", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_replace_keys/tasks/replace_keys.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4f92e48603760a77ca302371847e004bec26b1599f863fe7719d6bcfa37d8e33", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_replace_keys/vars", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/filter_replace_keys/vars/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "12fb80e1cc0fed908d3bb9ae1bb3b1e1bbebeb7f2e259476f16cf4a75173cbc6", + "format": 1 + }, + { + "name": "tests/integration/targets/filter_replace_keys/aliases", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "96646c5ab7118c53b8b722f6abe91a7ed4d3eed9be401faefb399d6a8f427c2e", + "format": 1 + }, + { "name": "tests/integration/targets/filter_time", "ftype": "dir", "chksum_type": null, @@ -10028,7 +10308,7 @@ "name": "tests/integration/targets/git_config/tasks/unset_value.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e31339e0f76aecbacc8839d3755b7fd21fa1882a8189d5cc79890e45d65e559c", + "chksum_sha256": "a8836b380c222836aea5c2aee38187580c031cbb7aec8d70fa55588f7a162f75", "format": 1 }, { @@ -13010,7 +13290,7 @@ "name": "tests/integration/targets/keycloak_client/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "10f83e1b6754b9dbc932e5bc5e6dfd85d028dffb2f85c5f9023f197211ea85bc", + "chksum_sha256": "dac1226601e47b2dc8127eca264d249e57054828048d590f6e9a260ef9b675ec", "format": 1 }, { @@ -23237,7 +23517,7 @@ "name": "tests/unit/plugins/module_utils/test_cmd_runner.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5e44ed79ba57b534227340b6e97849f84d20811597aaed62aa697d09ab6243f6", + "chksum_sha256": "98b8cc91992ff261d7bddcafc08f106a0ff38a17d6f45240f3387c4c019eecff", "format": 1 }, { @@ -26538,6 +26818,20 @@ "format": 1 }, { + "name": "tests/unit/plugins/modules/test_django_check.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "71fb52b56b5957aa54aebeb786ff74f396902effb388a202a86627e0cf0256d5", + "format": 1 + }, + { + "name": "tests/unit/plugins/modules/test_django_check.yaml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "7f3e625f4f6aec1e810913ecd137e8340c8d3c1f97dc2dc81bffa0c1600eed1d", + "format": 1 + }, + { "name": "tests/unit/plugins/modules/test_django_command.py", "ftype": "file", "chksum_type": "sha256", @@ -26552,6 +26846,20 @@ "format": 1 }, { + "name": "tests/unit/plugins/modules/test_django_createcachetable.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b12c8d85f2466e732a6f05e80485a6105d26fdd5c67477e4e46031c43f46086b", + "format": 1 + }, + { + "name": "tests/unit/plugins/modules/test_django_createcachetable.yaml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4eaa1b63defefb1bf8e4be46b98ce23ac97c49a01b06225bf1da803b3ebcce63", + "format": 1 + }, + { "name": "tests/unit/plugins/modules/test_dnf_config_manager.py", "ftype": "file", "chksum_type": "sha256", @@ -27654,7 +27962,7 @@ "name": "CHANGELOG.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2fc9c5d7b462624c77da1320ae1acaa13e7e4f765f0fe3393278146104281693", + "chksum_sha256": "d4edd4ccef5e7c4b176e19e06f7deb76de1ce252c72ad839644ee37f0a181476", "format": 1 }, { @@ -27668,7 +27976,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "28d86e5061f86ee8a49776681a2f660ee38c29d057b9c23c6d2ab473c0f218a5", + "chksum_sha256": "781bf561f0bec0521238cbf4b7481f2887d01fef494ed6ff450fae4daa870616", "format": 1 }, { diff --git a/ansible_collections/community/general/MANIFEST.json b/ansible_collections/community/general/MANIFEST.json index ffbae1e0e..26506ad50 100644 --- a/ansible_collections/community/general/MANIFEST.json +++ b/ansible_collections/community/general/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "general", - "version": "9.0.1", + "version": "9.1.0", "authors": [ "Ansible (https://github.com/ansible)" ], @@ -23,7 +23,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "be2f78923401a69f1bb6105804257106a4092634b2fa6a02058fea1e14de1bff", + "chksum_sha256": "98bfdff0974e81d3a63af8d9b29886515483d7536197a6f78e3c706272aba8f8", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/general/changelogs/changelog.yaml b/ansible_collections/community/general/changelogs/changelog.yaml index 6215a89ce..609989343 100644 --- a/ansible_collections/community/general/changelogs/changelog.yaml +++ b/ansible_collections/community/general/changelogs/changelog.yaml @@ -794,3 +794,111 @@ releases: - 8413-galaxy-refactor.yml - 9.0.1.yml release_date: '2024-05-27' + 9.1.0: + changes: + bugfixes: + - git_config - fix behavior of ``state=absent`` if ``value`` is present (https://github.com/ansible-collections/community.general/issues/8436, + https://github.com/ansible-collections/community.general/pull/8452). + - keycloak_realm - add normalizations for ``attributes`` and ``protocol_mappers`` + (https://github.com/ansible-collections/community.general/pull/8496). + - launched - correctly report changed status in check mode (https://github.com/ansible-collections/community.general/pull/8406). + - opennebula inventory plugin - fix invalid reference to IP when inventory runs + against NICs with no IPv4 address (https://github.com/ansible-collections/community.general/pull/8489). + - opentelemetry callback - do not save the JSON response when using the ``ansible.builtin.uri`` + module (https://github.com/ansible-collections/community.general/pull/8430). + - opentelemetry callback - do not save the content response when using the ``ansible.builtin.slurp`` + module (https://github.com/ansible-collections/community.general/pull/8430). + - paman - do not fail if an empty list of packages has been provided and there + is nothing to do (https://github.com/ansible-collections/community.general/pull/8514). + deprecated_features: + - CmdRunner module util - setting the value of the ``ignore_none`` parameter + within a ``CmdRunner`` context is deprecated and that feature should be removed + in community.general 12.0.0 (https://github.com/ansible-collections/community.general/pull/8479). + - git_config - the ``list_all`` option has been deprecated and will be removed + in community.general 11.0.0. Use the ``community.general.git_config_info`` + module instead (https://github.com/ansible-collections/community.general/pull/8453). + - git_config - using ``state=present`` without providing ``value`` is deprecated + and will be disallowed in community.general 11.0.0. Use the ``community.general.git_config_info`` + module instead to read a value (https://github.com/ansible-collections/community.general/pull/8453). + known_issues: + - homectl - the module does not work under Python 3.13 or newer, since it relies + on the removed ``crypt`` standard library module (https://github.com/ansible-collections/community.general/issues/4691, + https://github.com/ansible-collections/community.general/pull/8497). + - udm_user - the module does not work under Python 3.13 or newer, since it relies + on the removed ``crypt`` standard library module (https://github.com/ansible-collections/community.general/issues/4690, + https://github.com/ansible-collections/community.general/pull/8497). + minor_changes: + - CmdRunner module util - argument formats can be specified as plain functions + without calling ``cmd_runner_fmt.as_func()`` (https://github.com/ansible-collections/community.general/pull/8479). + - ansible_galaxy_install - add upgrade feature (https://github.com/ansible-collections/community.general/pull/8431, + https://github.com/ansible-collections/community.general/issues/8351). + - cargo - add option ``directory``, which allows source directory to be specified + (https://github.com/ansible-collections/community.general/pull/8480). + - cmd_runner module utils - add decorator ``cmd_runner_fmt.stack`` (https://github.com/ansible-collections/community.general/pull/8415). + - cmd_runner_fmt module utils - simplify implementation of ``cmd_runner_fmt.as_bool_not()`` + (https://github.com/ansible-collections/community.general/pull/8512). + - ipa_dnsrecord - adds ``SSHFP`` record type for managing SSH fingerprints in + FreeIPA DNS (https://github.com/ansible-collections/community.general/pull/8404). + - keycloak_client - assign auth flow by name (https://github.com/ansible-collections/community.general/pull/8428). + - openbsd_pkg - adds diff support to show changes in installed package list. + This does not yet work for check mode (https://github.com/ansible-collections/community.general/pull/8402). + - proxmox - allow specification of the API port when using proxmox_* (https://github.com/ansible-collections/community.general/issues/8440, + https://github.com/ansible-collections/community.general/pull/8441). + - proxmox_vm_info - add ``network`` option to retrieve current network information + (https://github.com/ansible-collections/community.general/pull/8471). + - redfish_command - add ``wait`` and ``wait_timeout`` options to allow a user + to block a command until a service is accessible after performing the requested + command (https://github.com/ansible-collections/community.general/issues/8051, + https://github.com/ansible-collections/community.general/pull/8434). + - redfish_info - add command ``CheckAvailability`` to check if a service is + accessible (https://github.com/ansible-collections/community.general/issues/8051, + https://github.com/ansible-collections/community.general/pull/8434). + - redis_info - adds support for getting cluster info (https://github.com/ansible-collections/community.general/pull/8464). + release_summary: Regular feature and bugfix release. + fragments: + - 8051-Redfish-Wait-For-Service.yml + - 8402-add-diif-mode-openbsd-pkg.yml + - 8404-ipa_dnsrecord_sshfp.yml + - 8415-cmd-runner-stack.yml + - 8428-assign-auth-flow-by-name-keycloak-client.yaml + - 8430-fix-opentelemetry-when-using-logs-with-uri-or-slurp-tasks.yaml + - 8431-galaxy-upgrade.yml + - 8440-allow-api-port-specification.yaml + - 8452-git_config-absent.yml + - 8453-git_config-deprecate-read.yml + - 8464-redis-add-cluster-info.yml + - 8471-proxmox-vm-info-network.yml + - 8476-launchd-check-mode-changed.yaml + - 8479-cmdrunner-improvements.yml + - 8480-directory-feature-cargo.yml + - 8489-fix-opennebula-inventory-crash-when-nic-has-no-ip.yml + - 8496-keycloak_clientscope-add-normalizations.yaml + - 8497-crypt.yml + - 8512-as-bool-not.yml + - 8514-pacman-empty.yml + - 9.1.0.yml + modules: + - description: Add, modify, and delete checks within a consul cluster. + name: consul_agent_check + namespace: '' + - description: Add, modify and delete services within a consul cluster. + name: consul_agent_service + namespace: '' + - description: Wrapper for C(django-admin check). + name: django_check + namespace: '' + - description: Wrapper for C(django-admin createcachetable). + name: django_createcachetable + namespace: '' + plugins: + filter: + - description: Keep specific keys from dictionaries in a list. + name: keep_keys + namespace: null + - description: Remove specific keys from dictionaries in a list. + name: remove_keys + namespace: null + - description: Replace specific keys in a list of dictionaries. + name: replace_keys + namespace: null + release_date: '2024-06-17' diff --git a/ansible_collections/community/general/docs/docsite/extra-docs.yml b/ansible_collections/community/general/docs/docsite/extra-docs.yml index 529573606..3bed9e35f 100644 --- a/ansible_collections/community/general/docs/docsite/extra-docs.yml +++ b/ansible_collections/community/general/docs/docsite/extra-docs.yml @@ -14,3 +14,7 @@ sections: - guide_online - guide_packet - guide_scaleway + - title: Developer Guides + toctree: + - guide_deps + - guide_vardict diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/default-common.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/default-common.yml index fd874e5c9..4431fe27d 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/default-common.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/default-common.yml @@ -2,17 +2,11 @@ # 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 - list1: - - name: foo - extra: true - - name: bar - extra: false - - name: meh - extra: true + - {name: foo, extra: true} + - {name: bar, extra: false} + - {name: meh, extra: true} list2: - - name: foo - path: /foo - - name: baz - path: /baz + - {name: foo, path: /foo} + - {name: baz, path: /baz} diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/default-recursive-true.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/default-recursive-true.yml index 133c8f2ae..eb83ea82e 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/default-recursive-true.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/default-recursive-true.yml @@ -2,14 +2,12 @@ # 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 - list1: - name: myname01 param01: x: default_value y: default_value - list: - - default_value + list: [default_value] - name: myname02 param01: [1, 1, 2, 3] @@ -18,7 +16,6 @@ list2: param01: y: patch_value z: patch_value - list: - - patch_value + list: [patch_value] - name: myname02 - param01: [3, 4, 4, {key: value}] + param01: [3, 4, 4] diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001.yml index 0cf6a9b8a..c27b019e5 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001.yml @@ -8,7 +8,7 @@ dir: example-001_vars - debug: var: list3 - when: debug|d(false)|bool + when: debug | d(false) | bool - template: src: list3.out.j2 dest: example-001.out diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001_vars/default-common.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001_vars/default-common.yml index fd874e5c9..4431fe27d 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001_vars/default-common.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001_vars/default-common.yml @@ -2,17 +2,11 @@ # 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 - list1: - - name: foo - extra: true - - name: bar - extra: false - - name: meh - extra: true + - {name: foo, extra: true} + - {name: bar, extra: false} + - {name: meh, extra: true} list2: - - name: foo - path: /foo - - name: baz - path: /baz + - {name: foo, path: /foo} + - {name: baz, path: /baz} diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001_vars/list3.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001_vars/list3.yml index 0604feccb..8bd8bc8f2 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001_vars/list3.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-001_vars/list3.yml @@ -2,6 +2,5 @@ # 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 - -list3: "{{ list1| +list3: "{{ list1 | community.general.lists_mergeby(list2, 'name') }}" diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002.yml index 5e6e0315d..e164db125 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002.yml @@ -8,7 +8,7 @@ dir: example-002_vars - debug: var: list3 - when: debug|d(false)|bool + when: debug | d(false) | bool - template: src: list3.out.j2 dest: example-002.out diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002_vars/default-common.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002_vars/default-common.yml index fd874e5c9..4431fe27d 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002_vars/default-common.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002_vars/default-common.yml @@ -2,17 +2,11 @@ # 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 - list1: - - name: foo - extra: true - - name: bar - extra: false - - name: meh - extra: true + - {name: foo, extra: true} + - {name: bar, extra: false} + - {name: meh, extra: true} list2: - - name: foo - path: /foo - - name: baz - path: /baz + - {name: foo, path: /foo} + - {name: baz, path: /baz} diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002_vars/list3.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002_vars/list3.yml index 8ad752407..be6cfcbf3 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002_vars/list3.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-002_vars/list3.yml @@ -2,6 +2,5 @@ # 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 - -list3: "{{ [list1, list2]| +list3: "{{ [list1, list2] | community.general.lists_mergeby('name') }}" diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003.yml index 2f93ab8a2..cbc5e43a5 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003.yml @@ -8,7 +8,7 @@ dir: example-003_vars - debug: var: list3 - when: debug|d(false)|bool + when: debug | d(false) | bool - template: src: list3.out.j2 dest: example-003.out diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003_vars/default-recursive-true.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003_vars/default-recursive-true.yml index 133c8f2ae..eb83ea82e 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003_vars/default-recursive-true.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003_vars/default-recursive-true.yml @@ -2,14 +2,12 @@ # 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 - list1: - name: myname01 param01: x: default_value y: default_value - list: - - default_value + list: [default_value] - name: myname02 param01: [1, 1, 2, 3] @@ -18,7 +16,6 @@ list2: param01: y: patch_value z: patch_value - list: - - patch_value + list: [patch_value] - name: myname02 - param01: [3, 4, 4, {key: value}] + param01: [3, 4, 4] diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003_vars/list3.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003_vars/list3.yml index d5374eece..2eff5df41 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003_vars/list3.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-003_vars/list3.yml @@ -2,7 +2,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 - -list3: "{{ [list1, list2]| +list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true) }}" diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004.yml index 3ef067faf..68e77dea8 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004.yml @@ -8,7 +8,7 @@ dir: example-004_vars - debug: var: list3 - when: debug|d(false)|bool + when: debug | d(false) | bool - template: src: list3.out.j2 dest: example-004.out diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004_vars/default-recursive-true.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004_vars/default-recursive-true.yml index 133c8f2ae..eb83ea82e 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004_vars/default-recursive-true.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004_vars/default-recursive-true.yml @@ -2,14 +2,12 @@ # 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 - list1: - name: myname01 param01: x: default_value y: default_value - list: - - default_value + list: [default_value] - name: myname02 param01: [1, 1, 2, 3] @@ -18,7 +16,6 @@ list2: param01: y: patch_value z: patch_value - list: - - patch_value + list: [patch_value] - name: myname02 - param01: [3, 4, 4, {key: value}] + param01: [3, 4, 4] diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004_vars/list3.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004_vars/list3.yml index a054ea1e7..94c8ceed3 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004_vars/list3.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-004_vars/list3.yml @@ -2,8 +2,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 - -list3: "{{ [list1, list2]| +list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='keep') }}" diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005.yml index 57e7a779d..b7b81de29 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005.yml @@ -8,7 +8,7 @@ dir: example-005_vars - debug: var: list3 - when: debug|d(false)|bool + when: debug | d(false) | bool - template: src: list3.out.j2 dest: example-005.out diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005_vars/default-recursive-true.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005_vars/default-recursive-true.yml index 133c8f2ae..eb83ea82e 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005_vars/default-recursive-true.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005_vars/default-recursive-true.yml @@ -2,14 +2,12 @@ # 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 - list1: - name: myname01 param01: x: default_value y: default_value - list: - - default_value + list: [default_value] - name: myname02 param01: [1, 1, 2, 3] @@ -18,7 +16,6 @@ list2: param01: y: patch_value z: patch_value - list: - - patch_value + list: [patch_value] - name: myname02 - param01: [3, 4, 4, {key: value}] + param01: [3, 4, 4] diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005_vars/list3.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005_vars/list3.yml index 3480bf658..f0d7751f2 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005_vars/list3.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-005_vars/list3.yml @@ -2,8 +2,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 - -list3: "{{ [list1, list2]| +list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='append') }}" diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006.yml index 41fc88e49..1be3becbc 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006.yml @@ -8,7 +8,7 @@ dir: example-006_vars - debug: var: list3 - when: debug|d(false)|bool + when: debug | d(false) | bool - template: src: list3.out.j2 dest: example-006.out diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006_vars/default-recursive-true.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006_vars/default-recursive-true.yml index 133c8f2ae..eb83ea82e 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006_vars/default-recursive-true.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006_vars/default-recursive-true.yml @@ -2,14 +2,12 @@ # 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 - list1: - name: myname01 param01: x: default_value y: default_value - list: - - default_value + list: [default_value] - name: myname02 param01: [1, 1, 2, 3] @@ -18,7 +16,6 @@ list2: param01: y: patch_value z: patch_value - list: - - patch_value + list: [patch_value] - name: myname02 - param01: [3, 4, 4, {key: value}] + param01: [3, 4, 4] diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006_vars/list3.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006_vars/list3.yml index 97513b559..f555c8dcb 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006_vars/list3.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-006_vars/list3.yml @@ -2,8 +2,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 - -list3: "{{ [list1, list2]| +list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='prepend') }}" diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007.yml index 3de715844..8a596ea68 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007.yml @@ -8,7 +8,7 @@ dir: example-007_vars - debug: var: list3 - when: debug|d(false)|bool + when: debug|d(false) | bool - template: src: list3.out.j2 dest: example-007.out diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007_vars/default-recursive-true.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007_vars/default-recursive-true.yml index 133c8f2ae..eb83ea82e 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007_vars/default-recursive-true.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007_vars/default-recursive-true.yml @@ -2,14 +2,12 @@ # 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 - list1: - name: myname01 param01: x: default_value y: default_value - list: - - default_value + list: [default_value] - name: myname02 param01: [1, 1, 2, 3] @@ -18,7 +16,6 @@ list2: param01: y: patch_value z: patch_value - list: - - patch_value + list: [patch_value] - name: myname02 - param01: [3, 4, 4, {key: value}] + param01: [3, 4, 4] diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007_vars/list3.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007_vars/list3.yml index cb51653b4..d8ad16cf4 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007_vars/list3.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-007_vars/list3.yml @@ -2,8 +2,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 - -list3: "{{ [list1, list2]| +list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='append_rp') }}" diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008.yml index e33828bf9..6d5c03bc6 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008.yml @@ -8,7 +8,7 @@ dir: example-008_vars - debug: var: list3 - when: debug|d(false)|bool + when: debug | d(false) | bool - template: src: list3.out.j2 dest: example-008.out diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008_vars/default-recursive-true.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008_vars/default-recursive-true.yml index 133c8f2ae..eb83ea82e 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008_vars/default-recursive-true.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008_vars/default-recursive-true.yml @@ -2,14 +2,12 @@ # 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 - list1: - name: myname01 param01: x: default_value y: default_value - list: - - default_value + list: [default_value] - name: myname02 param01: [1, 1, 2, 3] @@ -18,7 +16,6 @@ list2: param01: y: patch_value z: patch_value - list: - - patch_value + list: [patch_value] - name: myname02 - param01: [3, 4, 4, {key: value}] + param01: [3, 4, 4] diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008_vars/list3.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008_vars/list3.yml index af7001fc4..b2051376e 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008_vars/list3.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-008_vars/list3.yml @@ -2,8 +2,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 - -list3: "{{ [list1, list2]| +list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='prepend_rp') }}" diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-009.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-009.yml new file mode 100644 index 000000000..beef5d356 --- /dev/null +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-009.yml @@ -0,0 +1,14 @@ +--- +# 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: 9. Merge single list by common attribute 'name' + include_vars: + dir: example-009_vars +- debug: + var: list3 + when: debug | d(false) | bool +- template: + src: list3.out.j2 + dest: example-009.out diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-009_vars/default-common.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-009_vars/default-common.yml new file mode 100644 index 000000000..4431fe27d --- /dev/null +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-009_vars/default-common.yml @@ -0,0 +1,12 @@ +--- +# 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 +list1: + - {name: foo, extra: true} + - {name: bar, extra: false} + - {name: meh, extra: true} + +list2: + - {name: foo, path: /foo} + - {name: baz, path: /baz} diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-009_vars/list3.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-009_vars/list3.yml new file mode 100644 index 000000000..1708e3baf --- /dev/null +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/example-009_vars/list3.yml @@ -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 +list3: "{{ [list1 + list2, []] | + community.general.lists_mergeby('name') }}" diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/examples.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/examples.yml index 83b985084..34ad2d155 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/examples.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/examples.yml @@ -4,51 +4,75 @@ # SPDX-License-Identifier: GPL-3.0-or-later examples: - - label: 'In the example below the lists are merged by the attribute ``name``:' + - title: Two lists + description: 'In the example below the lists are merged by the attribute ``name``:' file: example-001_vars/list3.yml lang: 'yaml+jinja' - - label: 'This produces:' + - title: + description: 'This produces:' file: example-001.out lang: 'yaml' - - label: 'It is possible to use a list of lists as an input of the filter:' + - title: List of two lists + description: 'It is possible to use a list of lists as an input of the filter:' file: example-002_vars/list3.yml lang: 'yaml+jinja' - - label: 'This produces the same result as in the previous example:' + - title: + description: 'This produces the same result as in the previous example:' file: example-002.out lang: 'yaml' - - label: 'Example ``list_merge=replace`` (default):' + - title: Single list + description: 'It is possible to merge single list:' + file: example-009_vars/list3.yml + lang: 'yaml+jinja' + - title: + description: 'This produces the same result as in the previous example:' + file: example-009.out + lang: 'yaml' + - title: list_merge=replace (default) + description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=replace` (default):' file: example-003_vars/list3.yml lang: 'yaml+jinja' - - label: 'This produces:' + - title: + description: 'This produces:' file: example-003.out lang: 'yaml' - - label: 'Example ``list_merge=keep``:' + - title: list_merge=keep + description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=keep`:' file: example-004_vars/list3.yml lang: 'yaml+jinja' - - label: 'This produces:' + - title: + description: 'This produces:' file: example-004.out lang: 'yaml' - - label: 'Example ``list_merge=append``:' + - title: list_merge=append + description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append`:' file: example-005_vars/list3.yml lang: 'yaml+jinja' - - label: 'This produces:' + - title: + description: 'This produces:' file: example-005.out lang: 'yaml' - - label: 'Example ``list_merge=prepend``:' + - title: list_merge=prepend + description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend`:' file: example-006_vars/list3.yml lang: 'yaml+jinja' - - label: 'This produces:' + - title: + description: 'This produces:' file: example-006.out lang: 'yaml' - - label: 'Example ``list_merge=append_rp``:' + - title: list_merge=append_rp + description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append_rp`:' file: example-007_vars/list3.yml lang: 'yaml+jinja' - - label: 'This produces:' + - title: + description: 'This produces:' file: example-007.out lang: 'yaml' - - label: 'Example ``list_merge=prepend_rp``:' + - title: list_merge=prepend_rp + description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend_rp`:' file: example-008_vars/list3.yml lang: 'yaml+jinja' - - label: 'This produces:' + - title: + description: 'This produces:' file: example-008.out lang: 'yaml' diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/examples_all.rst.j2 b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/examples_all.rst.j2 index 95a0fafdd..88098683b 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/examples_all.rst.j2 +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/examples_all.rst.j2 @@ -4,10 +4,10 @@ SPDX-License-Identifier: GPL-3.0-or-later {% for i in examples %} -{{ i.label }} +{{ i.description }} .. code-block:: {{ i.lang }} - {{ lookup('file', i.file)|indent(2) }} + {{ lookup('file', i.file) | split('\n') | reject('match', '^(#|---)') | join ('\n') | indent(2) }} {% endfor %} diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/extra-vars.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/extra-vars.yml new file mode 100644 index 000000000..0482c7ff2 --- /dev/null +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/extra-vars.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 +examples_one: true +examples_all: true +merging_lists_of_dictionaries: true diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2 b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2 index 71d0d5da6..ad74161dc 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2 +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2 @@ -6,57 +6,69 @@ Merging lists of dictionaries ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you have two or more lists of dictionaries and want to combine them into a list of merged dictionaries, where the dictionaries are merged by an attribute, you can use the ``lists_mergeby`` filter. +If you have two or more lists of dictionaries and want to combine them into a list of merged dictionaries, where the dictionaries are merged by an attribute, you can use the :ansplugin:`community.general.lists_mergeby <community.general.lists_mergeby#filter>` filter. -.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See :ref:`the documentation for the community.general.yaml callback plugin <ansible_collections.community.general.yaml_callback>`. +.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See the documentation for the :ansplugin:`community.general.yaml callback plugin <community.general.yaml#callback>`. Let us use the lists below in the following examples: .. code-block:: yaml - {{ lookup('file', 'default-common.yml')|indent(2) }} + {{ lookup('file', 'default-common.yml') | split('\n') | reject('match', '^(#|---)') | join ('\n') | indent(2) }} {% for i in examples[0:2] %} -{{ i.label }} +{% if i.title | d('', true) | length > 0 %} +{{ i.title }} +{{ "%s" % ('"' * i.title|length) }} +{% endif %} +{{ i.description }} .. code-block:: {{ i.lang }} - {{ lookup('file', i.file)|indent(2) }} + {{ lookup('file', i.file) | split('\n') | reject('match', '^(#|---)') | join ('\n') | indent(2) }} {% endfor %} .. versionadded:: 2.0.0 -{% for i in examples[2:4] %} -{{ i.label }} +{% for i in examples[2:6] %} +{% if i.title | d('', true) | length > 0 %} +{{ i.title }} +{{ "%s" % ('"' * i.title|length) }} +{% endif %} +{{ i.description }} .. code-block:: {{ i.lang }} - {{ lookup('file', i.file)|indent(2) }} + {{ lookup('file', i.file) | split('\n') | reject('match', '^(#|---)') | join ('\n') | indent(2) }} {% endfor %} -The filter also accepts two optional parameters: ``recursive`` and ``list_merge``. These parameters are only supported when used with ansible-base 2.10 or ansible-core, but not with Ansible 2.9. This is available since community.general 4.4.0. +The filter also accepts two optional parameters: :ansopt:`community.general.lists_mergeby#filter:recursive` and :ansopt:`community.general.lists_mergeby#filter:list_merge`. This is available since community.general 4.4.0. **recursive** - Is a boolean, default to ``False``. Should the ``community.general.lists_mergeby`` recursively merge nested hashes. Note: It does not depend on the value of the ``hash_behaviour`` setting in ``ansible.cfg``. + Is a boolean, default to ``false``. Should the :ansplugin:`community.general.lists_mergeby#filter` filter recursively merge nested hashes. Note: It does not depend on the value of the ``hash_behaviour`` setting in ``ansible.cfg``. **list_merge** - Is a string, its possible values are ``replace`` (default), ``keep``, ``append``, ``prepend``, ``append_rp`` or ``prepend_rp``. It modifies the behaviour of ``community.general.lists_mergeby`` when the hashes to merge contain arrays/lists. + Is a string, its possible values are :ansval:`replace` (default), :ansval:`keep`, :ansval:`append`, :ansval:`prepend`, :ansval:`append_rp` or :ansval:`prepend_rp`. It modifies the behaviour of :ansplugin:`community.general.lists_mergeby#filter` when the hashes to merge contain arrays/lists. -The examples below set ``recursive=true`` and display the differences among all six options of ``list_merge``. Functionality of the parameters is exactly the same as in the filter ``combine``. See :ref:`Combining hashes/dictionaries <combine_filter>` to learn details about these options. +The examples below set :ansopt:`community.general.lists_mergeby#filter:recursive=true` and display the differences among all six options of :ansopt:`community.general.lists_mergeby#filter:list_merge`. Functionality of the parameters is exactly the same as in the filter :ansplugin:`ansible.builtin.combine#filter`. See :ref:`Combining hashes/dictionaries <combine_filter>` to learn details about these options. Let us use the lists below in the following examples .. code-block:: yaml - {{ lookup('file', 'default-recursive-true.yml')|indent(2) }} + {{ lookup('file', 'default-recursive-true.yml') | split('\n') | reject('match', '^(#|---)') | join ('\n') |indent(2) }} -{% for i in examples[4:16] %} -{{ i.label }} +{% for i in examples[6:] %} +{% if i.title | d('', true) | length > 0 %} +{{ i.title }} +{{ "%s" % ('"' * i.title|length) }} +{% endif %} +{{ i.description }} .. code-block:: {{ i.lang }} - {{ lookup('file', i.file)|indent(2) }} + {{ lookup('file', i.file) | split('\n') | reject('match', '^(#|---)') | join ('\n') |indent(2) }} {% endfor %} diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/list3.out.j2 b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/list3.out.j2 index b51f6b868..a30a5c4ab 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/list3.out.j2 +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/list3.out.j2 @@ -4,4 +4,4 @@ GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://w SPDX-License-Identifier: GPL-3.0-or-later #} list3: -{{ list3|to_nice_yaml(indent=0) }} + {{ list3 | to_yaml(indent=2, sort_keys=false) | indent(2) }} diff --git a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/playbook.yml b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/playbook.yml index 793d23348..ab389fa12 100644 --- a/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/playbook.yml +++ b/ansible_collections/community/general/docs/docsite/helper/lists_mergeby/playbook.yml @@ -5,7 +5,7 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # 1) Run all examples and create example-XXX.out -# shell> ansible-playbook playbook.yml -e examples=true +# shell> ansible-playbook playbook.yml -e examples_one=true # # 2) Optionally, for testing, create examples_all.rst # shell> ansible-playbook playbook.yml -e examples_all=true @@ -45,18 +45,20 @@ tags: t007 - import_tasks: example-008.yml tags: t008 - when: examples|d(false)|bool + - import_tasks: example-009.yml + tags: t009 + when: examples_one | d(false) | bool - block: - include_vars: examples.yml - template: src: examples_all.rst.j2 dest: examples_all.rst - when: examples_all|d(false)|bool + when: examples_all | d(false) | bool - block: - include_vars: examples.yml - template: src: filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2 dest: filter_guide_abstract_informations_merging_lists_of_dictionaries.rst - when: merging_lists_of_dictionaries|d(false)|bool + when: merging_lists_of_dictionaries | d(false) | bool diff --git a/ansible_collections/community/general/docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst b/ansible_collections/community/general/docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst index 06fa79d16..cafe04e5c 100644 --- a/ansible_collections/community/general/docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst +++ b/ansible_collections/community/general/docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst @@ -6,33 +6,30 @@ Merging lists of dictionaries ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you have two or more lists of dictionaries and want to combine them into a list of merged dictionaries, where the dictionaries are merged by an attribute, you can use the :ansplugin:`community.general.lists_mergeby filter <community.general.lists_mergeby#filter>`. +If you have two or more lists of dictionaries and want to combine them into a list of merged dictionaries, where the dictionaries are merged by an attribute, you can use the :ansplugin:`community.general.lists_mergeby <community.general.lists_mergeby#filter>` filter. -.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See :ref:`the documentation for the community.general.yaml callback plugin <ansible_collections.community.general.yaml_callback>`. +.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See the documentation for the :ansplugin:`community.general.yaml callback plugin <community.general.yaml#callback>`. Let us use the lists below in the following examples: .. code-block:: yaml list1: - - name: foo - extra: true - - name: bar - extra: false - - name: meh - extra: true + - {name: foo, extra: true} + - {name: bar, extra: false} + - {name: meh, extra: true} list2: - - name: foo - path: /foo - - name: baz - path: /baz + - {name: foo, path: /foo} + - {name: baz, path: /baz} +Two lists +""""""""" In the example below the lists are merged by the attribute ``name``: .. code-block:: yaml+jinja - list3: "{{ list1| + list3: "{{ list1 | community.general.lists_mergeby(list2, 'name') }}" This produces: @@ -40,24 +37,21 @@ This produces: .. code-block:: yaml list3: - - extra: false - name: bar - - name: baz - path: /baz - - extra: true - name: foo - path: /foo - - extra: true - name: meh + - {name: bar, extra: false} + - {name: baz, path: /baz} + - {name: foo, extra: true, path: /foo} + - {name: meh, extra: true} .. versionadded:: 2.0.0 +List of two lists +""""""""""""""""" It is possible to use a list of lists as an input of the filter: .. code-block:: yaml+jinja - list3: "{{ [list1, list2]| + list3: "{{ [list1, list2] | community.general.lists_mergeby('name') }}" This produces the same result as in the previous example: @@ -65,15 +59,29 @@ This produces the same result as in the previous example: .. code-block:: yaml list3: - - extra: false - name: bar - - name: baz - path: /baz - - extra: true - name: foo - path: /foo - - extra: true - name: meh + - {name: bar, extra: false} + - {name: baz, path: /baz} + - {name: foo, extra: true, path: /foo} + - {name: meh, extra: true} + +Single list +""""""""""" +It is possible to merge single list: + +.. code-block:: yaml+jinja + + list3: "{{ [list1 + list2, []] | + community.general.lists_mergeby('name') }}" + +This produces the same result as in the previous example: + +.. code-block:: yaml + + list3: + - {name: bar, extra: false} + - {name: baz, path: /baz} + - {name: foo, extra: true, path: /foo} + - {name: meh, extra: true} The filter also accepts two optional parameters: :ansopt:`community.general.lists_mergeby#filter:recursive` and :ansopt:`community.general.lists_mergeby#filter:list_merge`. This is available since community.general 4.4.0. @@ -95,8 +103,7 @@ Let us use the lists below in the following examples param01: x: default_value y: default_value - list: - - default_value + list: [default_value] - name: myname02 param01: [1, 1, 2, 3] @@ -105,16 +112,17 @@ Let us use the lists below in the following examples param01: y: patch_value z: patch_value - list: - - patch_value + list: [patch_value] - name: myname02 - param01: [3, 4, 4, {key: value}] + param01: [3, 4, 4] +list_merge=replace (default) +"""""""""""""""""""""""""""" Example :ansopt:`community.general.lists_mergeby#filter:list_merge=replace` (default): .. code-block:: yaml+jinja - list3: "{{ [list1, list2]| + list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true) }}" @@ -123,25 +131,22 @@ This produces: .. code-block:: yaml list3: - - name: myname01 - param01: - list: - - patch_value - x: default_value - y: patch_value - z: patch_value - - name: myname02 - param01: - - 3 - - 4 - - 4 - - key: value + - name: myname01 + param01: + x: default_value + y: patch_value + list: [patch_value] + z: patch_value + - name: myname02 + param01: [3, 4, 4] +list_merge=keep +""""""""""""""" Example :ansopt:`community.general.lists_mergeby#filter:list_merge=keep`: .. code-block:: yaml+jinja - list3: "{{ [list1, list2]| + list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='keep') }}" @@ -151,25 +156,22 @@ This produces: .. code-block:: yaml list3: - - name: myname01 - param01: - list: - - default_value - x: default_value - y: patch_value - z: patch_value - - name: myname02 - param01: - - 1 - - 1 - - 2 - - 3 + - name: myname01 + param01: + x: default_value + y: patch_value + list: [default_value] + z: patch_value + - name: myname02 + param01: [1, 1, 2, 3] +list_merge=append +""""""""""""""""" Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append`: .. code-block:: yaml+jinja - list3: "{{ [list1, list2]| + list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='append') }}" @@ -179,30 +181,22 @@ This produces: .. code-block:: yaml list3: - - name: myname01 - param01: - list: - - default_value - - patch_value - x: default_value - y: patch_value - z: patch_value - - name: myname02 - param01: - - 1 - - 1 - - 2 - - 3 - - 3 - - 4 - - 4 - - key: value + - name: myname01 + param01: + x: default_value + y: patch_value + list: [default_value, patch_value] + z: patch_value + - name: myname02 + param01: [1, 1, 2, 3, 3, 4, 4] +list_merge=prepend +"""""""""""""""""" Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend`: .. code-block:: yaml+jinja - list3: "{{ [list1, list2]| + list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='prepend') }}" @@ -212,30 +206,22 @@ This produces: .. code-block:: yaml list3: - - name: myname01 - param01: - list: - - patch_value - - default_value - x: default_value - y: patch_value - z: patch_value - - name: myname02 - param01: - - 3 - - 4 - - 4 - - key: value - - 1 - - 1 - - 2 - - 3 + - name: myname01 + param01: + x: default_value + y: patch_value + list: [patch_value, default_value] + z: patch_value + - name: myname02 + param01: [3, 4, 4, 1, 1, 2, 3] +list_merge=append_rp +"""""""""""""""""""" Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append_rp`: .. code-block:: yaml+jinja - list3: "{{ [list1, list2]| + list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='append_rp') }}" @@ -245,29 +231,22 @@ This produces: .. code-block:: yaml list3: - - name: myname01 - param01: - list: - - default_value - - patch_value - x: default_value - y: patch_value - z: patch_value - - name: myname02 - param01: - - 1 - - 1 - - 2 - - 3 - - 4 - - 4 - - key: value + - name: myname01 + param01: + x: default_value + y: patch_value + list: [default_value, patch_value] + z: patch_value + - name: myname02 + param01: [1, 1, 2, 3, 4, 4] +list_merge=prepend_rp +""""""""""""""""""""" Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend_rp`: .. code-block:: yaml+jinja - list3: "{{ [list1, list2]| + list3: "{{ [list1, list2] | community.general.lists_mergeby('name', recursive=true, list_merge='prepend_rp') }}" @@ -277,21 +256,12 @@ This produces: .. code-block:: yaml list3: - - name: myname01 - param01: - list: - - patch_value - - default_value - x: default_value - y: patch_value - z: patch_value - - name: myname02 - param01: - - 3 - - 4 - - 4 - - key: value - - 1 - - 1 - - 2 + - name: myname01 + param01: + x: default_value + y: patch_value + list: [patch_value, default_value] + z: patch_value + - name: myname02 + param01: [3, 4, 4, 1, 1, 2] diff --git a/ansible_collections/community/general/docs/docsite/rst/guide_deps.rst b/ansible_collections/community/general/docs/docsite/rst/guide_deps.rst new file mode 100644 index 000000000..4c0c4687a --- /dev/null +++ b/ansible_collections/community/general/docs/docsite/rst/guide_deps.rst @@ -0,0 +1,74 @@ +.. + 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 + +.. _ansible_collections.community.general.docsite.guide_deps: + +``deps`` Guide +============== + + +Using ``deps`` +^^^^^^^^^^^^^^ + +The ``ansible_collections.community.general.plugins.module_utils.deps`` module util simplifies +the importing of code as described in :ref:`Importing and using shared code <shared_code>`. +Please notice that ``deps`` is meant to be used specifically with Ansible modules, and not other types of plugins. + +The same example from the Developer Guide would become: + +.. code-block:: python + + from ansible_collections.community.general.plugins.module_utils import deps + + with deps.declare("foo"): + import foo + +Then in ``main()``, just after the argspec (or anywhere in the code, for that matter), do + +.. code-block:: python + + deps.validate(module) # assuming module is a valid AnsibleModule instance + +By default, ``deps`` will rely on ``ansible.module_utils.basic.missing_required_lib`` to generate +a message about a failing import. That function accepts parameters ``reason`` and ``url``, and +and so does ``deps```: + +.. code-block:: python + + with deps.declare("foo", reason="foo is needed to properly bar", url="https://foo.bar.io"): + import foo + +If you would rather write a custom message instead of using ``missing_required_lib`` then do: + +.. code-block:: python + + with deps.declare("foo", msg="Custom msg explaining why foo is needed"): + import foo + +``deps`` allows for multiple dependencies to be declared: + +.. code-block:: python + + with deps.declare("foo"): + import foo + + with deps.declare("bar"): + import bar + + with deps.declare("doe"): + import doe + +By default, ``deps.validate()`` will check on all the declared dependencies, but if so desired, +they can be validated selectively by doing: + +.. code-block:: python + + deps.validate(module, "foo") # only validates the "foo" dependency + + deps.validate(module, "doe:bar") # only validates the "doe" and "bar" dependencies + + deps.validate(module, "-doe:bar") # validates all dependencies except "doe" and "bar" + +.. versionadded:: 6.1.0 diff --git a/ansible_collections/community/general/docs/docsite/rst/guide_vardict.rst b/ansible_collections/community/general/docs/docsite/rst/guide_vardict.rst new file mode 100644 index 000000000..f65b09055 --- /dev/null +++ b/ansible_collections/community/general/docs/docsite/rst/guide_vardict.rst @@ -0,0 +1,176 @@ +.. + 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 + +.. _ansible_collections.community.general.docsite.guide_vardict: + +VarDict Guide +============= + +Introduction +^^^^^^^^^^^^ + +The ``ansible_collections.community.general.plugins.module_utils.vardict`` module util provides the +``VarDict`` class to help manage the module variables. That class is a container for module variables, +especially the ones for which the module must keep track of state changes, and the ones that should +be published as return values. + +Each variable has extra behaviors controlled by associated metadata, simplifying the generation of +output values from the module. + +Quickstart +"""""""""" + +The simplest way of using ``VarDict`` is: + +.. code-block:: python + + from ansible_collections.community.general.plugins.module_utils.vardict import VarDict + +Then in ``main()``, or any other function called from there: + +.. code-block:: python + + vars = VarDict() + + # Next 3 statements are equivalent + vars.abc = 123 + vars["abc"] = 123 + vars.set("abc", 123) + + vars.xyz = "bananas" + vars.ghi = False + +And by the time the module is about to exit: + +.. code-block:: python + + results = vars.output() + module.exit_json(**results) + +That makes the return value of the module: + +.. code-block:: javascript + + { + "abc": 123, + "xyz": "bananas", + "ghi": false + } + +Metadata +"""""""" + +The metadata values associated with each variable are: + +- ``output: bool`` - marks the variable for module output as a module return value. +- ``fact: bool`` - marks the variable for module output as an Ansible fact. +- ``verbosity: int`` - sets the minimum level of verbosity for which the variable will be included in the output. +- ``change: bool`` - controls the detection of changes in the variable value. +- ``initial_value: any`` - when using ``change`` and need to forcefully set an intial value to the variable. +- ``diff: bool`` - used along with ``change``, this generates an Ansible-style diff ``dict``. + +See the sections below for more details on how to use the metadata. + + +Using VarDict +^^^^^^^^^^^^^ + +Basic Usage +""""""""""" + +As shown above, variables can be accessed using the ``[]`` operator, as in a ``dict`` object, +and also as an object attribute, such as ``vars.abc``. The form using the ``set()`` +method is special in the sense that you can use it to set metadata values: + +.. code-block:: python + + vars.set("abc", 123, output=False) + vars.set("abc", 123, output=True, change=True) + +Another way to set metadata after the variables have been created is: + +.. code-block:: python + + vars.set_meta("abc", output=False) + vars.set_meta("abc", output=True, change=True, diff=True) + +You can use either operator and attribute forms to access the value of the variable. Other ways to +access its value and its metadata are: + +.. code-block:: python + + print("abc value = {0}".format(vars.var("abc")["value"])) # get the value + print("abc output? {0}".format(vars.get_meta("abc")["output"])) # get the metadata like this + +The names of methods, such as ``set``, ``get_meta``, ``output`` amongst others, are reserved and +cannot be used as variable names. If you try to use a reserved name a ``ValueError`` exception +is raised with the message "Name <var> is reserved". + +Generating output +""""""""""""""""" + +By default, every variable create will be enable for output with minimum verbosity set to zero, in +other words, they will always be in the output by default. + +You can control that when creating the variable for the first time or later in the code: + +.. code-block:: python + + vars.set("internal", x + 4, output=False) + vars.set_meta("internal", output=False) + +You can also set the verbosity of some variable, like: + +.. code-block:: python + + vars.set("abc", x + 4) + vars.set("debug_x", x, verbosity=3) + + results = vars.output(module._verbosity) + module.exit_json(**results) + +If the module was invoked with verbosity lower than 3, then the output will only contain +the variable ``abc``. If running at higher verbosity, as in ``ansible-playbook -vvv``, +then the output will also contain ``debug_x``. + +Generating facts is very similar to regular output, but variables are not marked as facts by default. + +.. code-block:: python + + vars.set("modulefact", x + 4, fact=True) + vars.set("debugfact", x, fact=True, verbosity=3) + + results = vars.output(module._verbosity) + results["ansible_facts"] = {"module_name": vars.facts(module._verbosity)} + module.exit_json(**results) + +Handling change +""""""""""""""" + +You can use ``VarDict`` to determine whether variables have had their values changed. + +.. code-block:: python + + vars.set("abc", 42, change=True) + vars.abc = 90 + + results = vars.output() + results["changed"] = vars.has_changed + module.exit_json(**results) + +If tracking changes in variables, you may want to present the difference between the initial and the final +values of it. For that, you want to use: + +.. code-block:: python + + vars.set("abc", 42, change=True, diff=True) + vars.abc = 90 + + results = vars.output() + results["changed"] = vars.has_changed + results["diff"] = vars.diff() + module.exit_json(**results) + +.. versionadded:: 7.1.0 diff --git a/ansible_collections/community/general/meta/runtime.yml b/ansible_collections/community/general/meta/runtime.yml index edeb53005..4f5007b4a 100644 --- a/ansible_collections/community/general/meta/runtime.yml +++ b/ansible_collections/community/general/meta/runtime.yml @@ -6,6 +6,8 @@ requires_ansible: '>=2.13.0' action_groups: consul: + - consul_agent_check + - consul_agent_service - consul_auth_method - consul_binding_rule - consul_policy diff --git a/ansible_collections/community/general/plugins/callback/opentelemetry.py b/ansible_collections/community/general/plugins/callback/opentelemetry.py index 58cfa057b..c6e8a87c1 100644 --- a/ansible_collections/community/general/plugins/callback/opentelemetry.py +++ b/ansible_collections/community/general/plugins/callback/opentelemetry.py @@ -556,11 +556,19 @@ class CallbackModule(CallbackBase): self.otel_exporter_otlp_traces_protocol = self.get_option('otel_exporter_otlp_traces_protocol') - def dump_results(self, result): + def dump_results(self, task, result): """ dump the results if disable_logs is not enabled """ if self.disable_logs: return "" - return self._dump_results(result._result) + # ansible.builtin.uri contains the response in the json field + save = dict(result._result) + + if "json" in save and task.action in ("ansible.builtin.uri", "ansible.legacy.uri", "uri"): + save.pop("json") + # ansible.builtin.slurp contains the response in the content field + if "content" in save and task.action in ("ansible.builtin.slurp", "ansible.legacy.slurp", "slurp"): + save.pop("content") + return self._dump_results(save) def v2_playbook_on_start(self, playbook): self.ansible_playbook = basename(playbook._file_name) @@ -611,7 +619,7 @@ class CallbackModule(CallbackBase): self.tasks_data, status, result, - self.dump_results(result) + self.dump_results(self.tasks_data[result._task._uuid], result) ) def v2_runner_on_ok(self, result): @@ -619,7 +627,7 @@ class CallbackModule(CallbackBase): self.tasks_data, 'ok', result, - self.dump_results(result) + self.dump_results(self.tasks_data[result._task._uuid], result) ) def v2_runner_on_skipped(self, result): @@ -627,7 +635,7 @@ class CallbackModule(CallbackBase): self.tasks_data, 'skipped', result, - self.dump_results(result) + self.dump_results(self.tasks_data[result._task._uuid], result) ) def v2_playbook_on_include(self, included_file): diff --git a/ansible_collections/community/general/plugins/doc_fragments/django.py b/ansible_collections/community/general/plugins/doc_fragments/django.py index d92799937..f89ec9144 100644 --- a/ansible_collections/community/general/plugins/doc_fragments/django.py +++ b/ansible_collections/community/general/plugins/doc_fragments/django.py @@ -51,3 +51,12 @@ seealso: Please make sure that you select the right version of Django in the version selector on that page. link: https://docs.djangoproject.com/en/5.0/ref/django-admin/ ''' + + DATABASE = r''' +options: + database: + description: + - Specify the database to be used. + type: str + default: default +''' diff --git a/ansible_collections/community/general/plugins/doc_fragments/proxmox.py b/ansible_collections/community/general/plugins/doc_fragments/proxmox.py index cb533fefa..239dba06d 100644 --- a/ansible_collections/community/general/plugins/doc_fragments/proxmox.py +++ b/ansible_collections/community/general/plugins/doc_fragments/proxmox.py @@ -16,6 +16,13 @@ options: - Specify the target host of the Proxmox VE cluster. type: str required: true + api_port: + description: + - Specify the target port of the Proxmox VE cluster. + - Uses the E(PROXMOX_PORT) environment variable if not specified. + type: int + required: false + version_added: 9.1.0 api_user: description: - Specify the user to authenticate with. diff --git a/ansible_collections/community/general/plugins/filter/keep_keys.py b/ansible_collections/community/general/plugins/filter/keep_keys.py new file mode 100644 index 000000000..dffccba35 --- /dev/null +++ b/ansible_collections/community/general/plugins/filter/keep_keys.py @@ -0,0 +1,138 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2024 Vladimir Botka <vbotka@gmail.com> +# 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 + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +DOCUMENTATION = ''' + name: keep_keys + short_description: Keep specific keys from dictionaries in a list + version_added: "9.1.0" + author: + - Vladimir Botka (@vbotka) + - Felix Fontein (@felixfontein) + description: This filter keeps only specified keys from a provided list of dictionaries. + options: + _input: + description: + - A list of dictionaries. + - Top level keys must be strings. + type: list + elements: dictionary + required: true + target: + description: + - A single key or key pattern to keep, or a list of keys or keys patterns to keep. + - If O(matching_parameter=regex) there must be exactly one pattern provided. + type: raw + required: true + matching_parameter: + description: Specify the matching option of target keys. + type: str + default: equal + choices: + equal: Matches keys of exactly one of the O(target) items. + starts_with: Matches keys that start with one of the O(target) items. + ends_with: Matches keys that end with one of the O(target) items. + regex: + - Matches keys that match the regular expresion provided in O(target). + - In this case, O(target) must be a regex string or a list with single regex string. +''' + +EXAMPLES = ''' + l: + - {k0_x0: A0, k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar} + + # 1) By default match keys that equal any of the items in the target. + t: [k0_x0, k1_x1] + r: "{{ l | community.general.keep_keys(target=t) }}" + + # 2) Match keys that start with any of the items in the target. + t: [k0, k1] + r: "{{ l | community.general.keep_keys(target=t, matching_parameter='starts_with') }}" + + # 3) Match keys that end with any of the items in target. + t: [x0, x1] + r: "{{ l | community.general.keep_keys(target=t, matching_parameter='ends_with') }}" + + # 4) Match keys by the regex. + t: ['^.*[01]_x.*$'] + r: "{{ l | community.general.keep_keys(target=t, matching_parameter='regex') }}" + + # 5) Match keys by the regex. + t: '^.*[01]_x.*$' + r: "{{ l | community.general.keep_keys(target=t, matching_parameter='regex') }}" + + # The results of above examples 1-5 are all the same. + r: + - {k0_x0: A0, k1_x1: B0} + - {k0_x0: A1, k1_x1: B1} + + # 6) By default match keys that equal the target. + t: k0_x0 + r: "{{ l | community.general.keep_keys(target=t) }}" + + # 7) Match keys that start with the target. + t: k0 + r: "{{ l | community.general.keep_keys(target=t, matching_parameter='starts_with') }}" + + # 8) Match keys that end with the target. + t: x0 + r: "{{ l | community.general.keep_keys(target=t, matching_parameter='ends_with') }}" + + # 9) Match keys by the regex. + t: '^.*0_x.*$' + r: "{{ l | community.general.keep_keys(target=t, matching_parameter='regex') }}" + + # The results of above examples 6-9 are all the same. + r: + - {k0_x0: A0} + - {k0_x0: A1} +''' + +RETURN = ''' + _value: + description: The list of dictionaries with selected keys. + type: list + elements: dictionary +''' + +from ansible_collections.community.general.plugins.plugin_utils.keys_filter import ( + _keys_filter_params, + _keys_filter_target_str) + + +def keep_keys(data, target=None, matching_parameter='equal'): + """keep specific keys from dictionaries in a list""" + + # test parameters + _keys_filter_params(data, matching_parameter) + # test and transform target + tt = _keys_filter_target_str(target, matching_parameter) + + if matching_parameter == 'equal': + def keep_key(key): + return key in tt + elif matching_parameter == 'starts_with': + def keep_key(key): + return key.startswith(tt) + elif matching_parameter == 'ends_with': + def keep_key(key): + return key.endswith(tt) + elif matching_parameter == 'regex': + def keep_key(key): + return tt.match(key) is not None + + return [dict((k, v) for k, v in d.items() if keep_key(k)) for d in data] + + +class FilterModule(object): + + def filters(self): + return { + 'keep_keys': keep_keys, + } diff --git a/ansible_collections/community/general/plugins/filter/lists_mergeby.py b/ansible_collections/community/general/plugins/filter/lists_mergeby.py index caf183492..0e47d5017 100644 --- a/ansible_collections/community/general/plugins/filter/lists_mergeby.py +++ b/ansible_collections/community/general/plugins/filter/lists_mergeby.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2020-2022, Vladimir Botka <vbotka@gmail.com> +# Copyright (c) 2020-2024, Vladimir Botka <vbotka@gmail.com> # 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 @@ -12,22 +12,32 @@ DOCUMENTATION = ''' version_added: 2.0.0 author: Vladimir Botka (@vbotka) description: - - Merge two or more lists by attribute O(index). Optional parameters O(recursive) and O(list_merge) - control the merging of the lists in values. The function merge_hash from ansible.utils.vars - is used. To learn details on how to use the parameters O(recursive) and O(list_merge) see - Ansible User's Guide chapter "Using filters to manipulate data" section "Combining - hashes/dictionaries". + - Merge two or more lists by attribute O(index). Optional + parameters O(recursive) and O(list_merge) control the merging of + the nested dictionaries and lists. + - The function C(merge_hash) from C(ansible.utils.vars) is used. + - To learn details on how to use the parameters O(recursive) and + O(list_merge) see Ansible User's Guide chapter "Using filters to + manipulate data" section R(Combining hashes/dictionaries, combine_filter) or the + filter P(ansible.builtin.combine#filter). + positional: another_list, index options: _input: - description: A list of dictionaries. + description: + - A list of dictionaries, or a list of lists of dictionaries. + - The required type of the C(elements) is set to C(raw) + because all elements of O(_input) can be either dictionaries + or lists. type: list - elements: dictionary + elements: raw required: true another_list: - description: Another list of dictionaries. This parameter can be specified multiple times. + description: + - Another list of dictionaries, or a list of lists of dictionaries. + - This parameter can be specified multiple times. type: list - elements: dictionary + elements: raw index: description: - The dictionary key that must be present in every dictionary in every list that is used to @@ -55,40 +65,134 @@ DOCUMENTATION = ''' ''' EXAMPLES = ''' -- name: Merge two lists +# Some results below are manually formatted for better readability. The +# dictionaries' keys will be sorted alphabetically in real output. + +- name: Example 1. Merge two lists. The results r1 and r2 are the same. + ansible.builtin.debug: + msg: | + r1: {{ r1 }} + r2: {{ r2 }} + vars: + list1: + - {index: a, value: 123} + - {index: b, value: 4} + list2: + - {index: a, foo: bar} + - {index: c, foo: baz} + r1: "{{ list1 | community.general.lists_mergeby(list2, 'index') }}" + r2: "{{ [list1, list2] | community.general.lists_mergeby('index') }}" + +# r1: +# - {index: a, foo: bar, value: 123} +# - {index: b, value: 4} +# - {index: c, foo: baz} +# r2: +# - {index: a, foo: bar, value: 123} +# - {index: b, value: 4} +# - {index: c, foo: baz} + +- name: Example 2. Merge three lists + ansible.builtin.debug: + var: r + vars: + list1: + - {index: a, value: 123} + - {index: b, value: 4} + list2: + - {index: a, foo: bar} + - {index: c, foo: baz} + list3: + - {index: d, foo: qux} + r: "{{ [list1, list2, list3] | community.general.lists_mergeby('index') }}" + +# r: +# - {index: a, foo: bar, value: 123} +# - {index: b, value: 4} +# - {index: c, foo: baz} +# - {index: d, foo: qux} + +- name: Example 3. Merge single list. The result is the same as 2. + ansible.builtin.debug: + var: r + vars: + list1: + - {index: a, value: 123} + - {index: b, value: 4} + - {index: a, foo: bar} + - {index: c, foo: baz} + - {index: d, foo: qux} + r: "{{ [list1, []] | community.general.lists_mergeby('index') }}" + +# r: +# - {index: a, foo: bar, value: 123} +# - {index: b, value: 4} +# - {index: c, foo: baz} +# - {index: d, foo: qux} + +- name: Example 4. Merge two lists. By default, replace nested lists. + ansible.builtin.debug: + var: r + vars: + list1: + - {index: a, foo: [X1, X2]} + - {index: b, foo: [X1, X2]} + list2: + - {index: a, foo: [Y1, Y2]} + - {index: b, foo: [Y1, Y2]} + r: "{{ [list1, list2] | community.general.lists_mergeby('index') }}" + +# r: +# - {index: a, foo: [Y1, Y2]} +# - {index: b, foo: [Y1, Y2]} + +- name: Example 5. Merge two lists. Append nested lists. + ansible.builtin.debug: + var: r + vars: + list1: + - {index: a, foo: [X1, X2]} + - {index: b, foo: [X1, X2]} + list2: + - {index: a, foo: [Y1, Y2]} + - {index: b, foo: [Y1, Y2]} + r: "{{ [list1, list2] | community.general.lists_mergeby('index', list_merge='append') }}" + +# r: +# - {index: a, foo: [X1, X2, Y1, Y2]} +# - {index: b, foo: [X1, X2, Y1, Y2]} + +- name: Example 6. Merge two lists. By default, do not merge nested dictionaries. + ansible.builtin.debug: + var: r + vars: + list1: + - {index: a, foo: {x: 1, y: 2}} + - {index: b, foo: [X1, X2]} + list2: + - {index: a, foo: {y: 3, z: 4}} + - {index: b, foo: [Y1, Y2]} + r: "{{ [list1, list2] | community.general.lists_mergeby('index') }}" + +# r: +# - {index: a, foo: {y: 3, z: 4}} +# - {index: b, foo: [Y1, Y2]} + +- name: Example 7. Merge two lists. Merge nested dictionaries too. ansible.builtin.debug: - msg: >- - {{ list1 | community.general.lists_mergeby( - list2, - 'index', - recursive=True, - list_merge='append' - ) }}" + var: r vars: list1: - - index: a - value: 123 - - index: b - value: 42 + - {index: a, foo: {x: 1, y: 2}} + - {index: b, foo: [X1, X2]} list2: - - index: a - foo: bar - - index: c - foo: baz - # Produces the following list of dictionaries: - # { - # "index": "a", - # "foo": "bar", - # "value": 123 - # }, - # { - # "index": "b", - # "value": 42 - # }, - # { - # "index": "c", - # "foo": "baz" - # } + - {index: a, foo: {y: 3, z: 4}} + - {index: b, foo: [Y1, Y2]} + r: "{{ [list1, list2] | community.general.lists_mergeby('index', recursive=true) }}" + +# r: +# - {index: a, foo: {x:1, y: 3, z: 4}} +# - {index: b, foo: [Y1, Y2]} ''' RETURN = ''' @@ -108,13 +212,14 @@ from operator import itemgetter def list_mergeby(x, y, index, recursive=False, list_merge='replace'): - ''' Merge 2 lists by attribute 'index'. The function merge_hash from ansible.utils.vars is used. - This function is used by the function lists_mergeby. + '''Merge 2 lists by attribute 'index'. The function 'merge_hash' + from ansible.utils.vars is used. This function is used by the + function lists_mergeby. ''' d = defaultdict(dict) - for l in (x, y): - for elem in l: + for lst in (x, y): + for elem in lst: if not isinstance(elem, Mapping): msg = "Elements of list arguments for lists_mergeby must be dictionaries. %s is %s" raise AnsibleFilterError(msg % (elem, type(elem))) @@ -124,20 +229,9 @@ def list_mergeby(x, y, index, recursive=False, list_merge='replace'): def lists_mergeby(*terms, **kwargs): - ''' Merge 2 or more lists by attribute 'index'. Optional parameters 'recursive' and 'list_merge' - control the merging of the lists in values. The function merge_hash from ansible.utils.vars - is used. To learn details on how to use the parameters 'recursive' and 'list_merge' see - Ansible User's Guide chapter "Using filters to manipulate data" section "Combining - hashes/dictionaries". - - Example: - - debug: - msg: "{{ list1| - community.general.lists_mergeby(list2, - 'index', - recursive=True, - list_merge='append')| - list }}" + '''Merge 2 or more lists by attribute 'index'. To learn details + on how to use the parameters 'recursive' and 'list_merge' see + the filter ansible.builtin.combine. ''' recursive = kwargs.pop('recursive', False) @@ -155,7 +249,7 @@ def lists_mergeby(*terms, **kwargs): "must be lists. %s is %s") raise AnsibleFilterError(msg % (sublist, type(sublist))) if len(sublist) > 0: - if all(isinstance(l, Sequence) for l in sublist): + if all(isinstance(lst, Sequence) for lst in sublist): for item in sublist: flat_list.append(item) else: diff --git a/ansible_collections/community/general/plugins/filter/remove_keys.py b/ansible_collections/community/general/plugins/filter/remove_keys.py new file mode 100644 index 000000000..cabce1468 --- /dev/null +++ b/ansible_collections/community/general/plugins/filter/remove_keys.py @@ -0,0 +1,138 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2024 Vladimir Botka <vbotka@gmail.com> +# 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 + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +DOCUMENTATION = ''' + name: remove_keys + short_description: Remove specific keys from dictionaries in a list + version_added: "9.1.0" + author: + - Vladimir Botka (@vbotka) + - Felix Fontein (@felixfontein) + description: This filter removes only specified keys from a provided list of dictionaries. + options: + _input: + description: + - A list of dictionaries. + - Top level keys must be strings. + type: list + elements: dictionary + required: true + target: + description: + - A single key or key pattern to remove, or a list of keys or keys patterns to remove. + - If O(matching_parameter=regex) there must be exactly one pattern provided. + type: raw + required: true + matching_parameter: + description: Specify the matching option of target keys. + type: str + default: equal + choices: + equal: Matches keys of exactly one of the O(target) items. + starts_with: Matches keys that start with one of the O(target) items. + ends_with: Matches keys that end with one of the O(target) items. + regex: + - Matches keys that match the regular expresion provided in O(target). + - In this case, O(target) must be a regex string or a list with single regex string. +''' + +EXAMPLES = ''' + l: + - {k0_x0: A0, k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar} + + # 1) By default match keys that equal any of the items in the target. + t: [k0_x0, k1_x1] + r: "{{ l | community.general.remove_keys(target=t) }}" + + # 2) Match keys that start with any of the items in the target. + t: [k0, k1] + r: "{{ l | community.general.remove_keys(target=t, matching_parameter='starts_with') }}" + + # 3) Match keys that end with any of the items in target. + t: [x0, x1] + r: "{{ l | community.general.remove_keys(target=t, matching_parameter='ends_with') }}" + + # 4) Match keys by the regex. + t: ['^.*[01]_x.*$'] + r: "{{ l | community.general.remove_keys(target=t, matching_parameter='regex') }}" + + # 5) Match keys by the regex. + t: '^.*[01]_x.*$' + r: "{{ l | community.general.remove_keys(target=t, matching_parameter='regex') }}" + + # The results of above examples 1-5 are all the same. + r: + - {k2_x2: [C0], k3_x3: foo} + - {k2_x2: [C1], k3_x3: bar} + + # 6) By default match keys that equal the target. + t: k0_x0 + r: "{{ l | community.general.remove_keys(target=t) }}" + + # 7) Match keys that start with the target. + t: k0 + r: "{{ l | community.general.remove_keys(target=t, matching_parameter='starts_with') }}" + + # 8) Match keys that end with the target. + t: x0 + r: "{{ l | community.general.remove_keys(target=t, matching_parameter='ends_with') }}" + + # 9) Match keys by the regex. + t: '^.*0_x.*$' + r: "{{ l | community.general.remove_keys(target=t, matching_parameter='regex') }}" + + # The results of above examples 6-9 are all the same. + r: + - {k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k1_x1: B1, k2_x2: [C1], k3_x3: bar} +''' + +RETURN = ''' + _value: + description: The list of dictionaries with selected keys removed. + type: list + elements: dictionary +''' + +from ansible_collections.community.general.plugins.plugin_utils.keys_filter import ( + _keys_filter_params, + _keys_filter_target_str) + + +def remove_keys(data, target=None, matching_parameter='equal'): + """remove specific keys from dictionaries in a list""" + + # test parameters + _keys_filter_params(data, matching_parameter) + # test and transform target + tt = _keys_filter_target_str(target, matching_parameter) + + if matching_parameter == 'equal': + def keep_key(key): + return key not in tt + elif matching_parameter == 'starts_with': + def keep_key(key): + return not key.startswith(tt) + elif matching_parameter == 'ends_with': + def keep_key(key): + return not key.endswith(tt) + elif matching_parameter == 'regex': + def keep_key(key): + return tt.match(key) is None + + return [dict((k, v) for k, v in d.items() if keep_key(k)) for d in data] + + +class FilterModule(object): + + def filters(self): + return { + 'remove_keys': remove_keys, + } diff --git a/ansible_collections/community/general/plugins/filter/replace_keys.py b/ansible_collections/community/general/plugins/filter/replace_keys.py new file mode 100644 index 000000000..d3b12c05d --- /dev/null +++ b/ansible_collections/community/general/plugins/filter/replace_keys.py @@ -0,0 +1,180 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2024 Vladimir Botka <vbotka@gmail.com> +# 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 + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +DOCUMENTATION = ''' + name: replace_keys + short_description: Replace specific keys in a list of dictionaries + version_added: "9.1.0" + author: + - Vladimir Botka (@vbotka) + - Felix Fontein (@felixfontein) + description: This filter replaces specified keys in a provided list of dictionaries. + options: + _input: + description: + - A list of dictionaries. + - Top level keys must be strings. + type: list + elements: dictionary + required: true + target: + description: + - A list of dictionaries with attributes C(before) and C(after). + - The value of O(target[].after) replaces key matching O(target[].before). + type: list + elements: dictionary + required: true + suboptions: + before: + description: + - A key or key pattern to change. + - The interpretation of O(target[].before) depends on O(matching_parameter). + - For a key that matches multiple O(target[].before)s, the B(first) matching O(target[].after) will be used. + type: str + after: + description: A matching key change to. + type: str + matching_parameter: + description: Specify the matching option of target keys. + type: str + default: equal + choices: + equal: Matches keys of exactly one of the O(target[].before) items. + starts_with: Matches keys that start with one of the O(target[].before) items. + ends_with: Matches keys that end with one of the O(target[].before) items. + regex: Matches keys that match one of the regular expressions provided in O(target[].before). +''' + +EXAMPLES = ''' + l: + - {k0_x0: A0, k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar} + + # 1) By default, replace keys that are equal any of the attributes before. + t: + - {before: k0_x0, after: a0} + - {before: k1_x1, after: a1} + r: "{{ l | community.general.replace_keys(target=t) }}" + + # 2) Replace keys that starts with any of the attributes before. + t: + - {before: k0, after: a0} + - {before: k1, after: a1} + r: "{{ l | community.general.replace_keys(target=t, matching_parameter='starts_with') }}" + + # 3) Replace keys that ends with any of the attributes before. + t: + - {before: x0, after: a0} + - {before: x1, after: a1} + r: "{{ l | community.general.replace_keys(target=t, matching_parameter='ends_with') }}" + + # 4) Replace keys that match any regex of the attributes before. + t: + - {before: "^.*0_x.*$", after: a0} + - {before: "^.*1_x.*$", after: a1} + r: "{{ l | community.general.replace_keys(target=t, matching_parameter='regex') }}" + + # The results of above examples 1-4 are all the same. + r: + - {a0: A0, a1: B0, k2_x2: [C0], k3_x3: foo} + - {a0: A1, a1: B1, k2_x2: [C1], k3_x3: bar} + + # 5) If more keys match the same attribute before the last one will be used. + t: + - {before: "^.*_x.*$", after: X} + r: "{{ l | community.general.replace_keys(target=t, matching_parameter='regex') }}" + + # gives + + r: + - X: foo + - X: bar + + # 6) If there are items with equal attribute before the first one will be used. + t: + - {before: "^.*_x.*$", after: X} + - {before: "^.*_x.*$", after: Y} + r: "{{ l | community.general.replace_keys(target=t, matching_parameter='regex') }}" + + # gives + + r: + - X: foo + - X: bar + + # 7) If there are more matches for a key the first one will be used. + l: + - {aaa1: A, bbb1: B, ccc1: C} + - {aaa2: D, bbb2: E, ccc2: F} + t: + - {before: a, after: X} + - {before: aa, after: Y} + r: "{{ l | community.general.replace_keys(target=t, matching_parameter='starts_with') }}" + + # gives + + r: + - {X: A, bbb1: B, ccc1: C} + - {X: D, bbb2: E, ccc2: F} +''' + +RETURN = ''' + _value: + description: The list of dictionaries with replaced keys. + type: list + elements: dictionary +''' + +from ansible_collections.community.general.plugins.plugin_utils.keys_filter import ( + _keys_filter_params, + _keys_filter_target_dict) + + +def replace_keys(data, target=None, matching_parameter='equal'): + """replace specific keys in a list of dictionaries""" + + # test parameters + _keys_filter_params(data, matching_parameter) + # test and transform target + tz = _keys_filter_target_dict(target, matching_parameter) + + if matching_parameter == 'equal': + def replace_key(key): + for b, a in tz: + if key == b: + return a + return key + elif matching_parameter == 'starts_with': + def replace_key(key): + for b, a in tz: + if key.startswith(b): + return a + return key + elif matching_parameter == 'ends_with': + def replace_key(key): + for b, a in tz: + if key.endswith(b): + return a + return key + elif matching_parameter == 'regex': + def replace_key(key): + for b, a in tz: + if b.match(key): + return a + return key + + return [dict((replace_key(k), v) for k, v in d.items()) for d in data] + + +class FilterModule(object): + + def filters(self): + return { + 'replace_keys': replace_keys, + } diff --git a/ansible_collections/community/general/plugins/inventory/opennebula.py b/ansible_collections/community/general/plugins/inventory/opennebula.py index b097307c3..bf81758ef 100644 --- a/ansible_collections/community/general/plugins/inventory/opennebula.py +++ b/ansible_collections/community/general/plugins/inventory/opennebula.py @@ -143,7 +143,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable): nic = [nic] for net in nic: - return net['IP'] + if net.get('IP'): + return net['IP'] return False diff --git a/ansible_collections/community/general/plugins/module_utils/cmd_runner.py b/ansible_collections/community/general/plugins/module_utils/cmd_runner.py index 2bf2b32e8..da4f1b6fc 100644 --- a/ansible_collections/community/general/plugins/module_utils/cmd_runner.py +++ b/ansible_collections/community/general/plugins/module_utils/cmd_runner.py @@ -89,18 +89,31 @@ class FormatError(CmdRunnerException): class _ArgFormat(object): + # DEPRECATION: set default value for ignore_none to True in community.general 12.0.0 def __init__(self, func, ignore_none=None, ignore_missing_value=False): self.func = func self.ignore_none = ignore_none self.ignore_missing_value = ignore_missing_value - def __call__(self, value, ctx_ignore_none): + # DEPRECATION: remove parameter ctx_ignore_none in community.general 12.0.0 + def __call__(self, value, ctx_ignore_none=True): + # DEPRECATION: replace ctx_ignore_none with True in community.general 12.0.0 ignore_none = self.ignore_none if self.ignore_none is not None else ctx_ignore_none if value is None and ignore_none: return [] f = self.func return [str(x) for x in f(value)] + def __str__(self): + return "<ArgFormat: func={0}, ignore_none={1}, ignore_missing_value={2}>".format( + self.func, + self.ignore_none, + self.ignore_missing_value, + ) + + def __repr__(self): + return str(self) + class _Format(object): @staticmethod @@ -114,7 +127,7 @@ class _Format(object): @staticmethod def as_bool_not(args): - return _ArgFormat(lambda value: [] if value else _ensure_list(args), ignore_none=False) + return _Format.as_bool([], args, ignore_none=False) @staticmethod def as_optval(arg, ignore_none=None): @@ -184,6 +197,19 @@ class _Format(object): return func(**v) return wrapper + @staticmethod + def stack(fmt): + @wraps(fmt) + def wrapper(*args, **kwargs): + new_func = fmt(ignore_none=True, *args, **kwargs) + + def stacking(value): + stack = [new_func(v) for v in value if v] + stack = [x for args in stack for x in args] + return stack + return _ArgFormat(stacking, ignore_none=True) + return wrapper + class CmdRunner(object): """ @@ -204,7 +230,11 @@ class CmdRunner(object): self.default_args_order = self._prepare_args_order(default_args_order) if arg_formats is None: arg_formats = {} - self.arg_formats = dict(arg_formats) + self.arg_formats = {} + for fmt_name, fmt in arg_formats.items(): + if not isinstance(fmt, _ArgFormat): + fmt = _Format.as_func(func=fmt, ignore_none=True) + self.arg_formats[fmt_name] = fmt self.check_rc = check_rc self.force_lang = force_lang self.path_prefix = path_prefix @@ -223,7 +253,16 @@ class CmdRunner(object): def binary(self): return self.command[0] - def __call__(self, args_order=None, output_process=None, ignore_value_none=True, check_mode_skip=False, check_mode_return=None, **kwargs): + # remove parameter ignore_value_none in community.general 12.0.0 + def __call__(self, args_order=None, output_process=None, ignore_value_none=None, check_mode_skip=False, check_mode_return=None, **kwargs): + if ignore_value_none is None: + ignore_value_none = True + else: + self.module.deprecate( + "Using ignore_value_none when creating the runner context is now deprecated, " + "and the parameter will be removed in community.general 12.0.0. ", + version="12.0.0", collection_name="community.general" + ) if output_process is None: output_process = _process_as_is if args_order is None: @@ -235,7 +274,7 @@ class CmdRunner(object): return _CmdRunnerContext(runner=self, args_order=args_order, output_process=output_process, - ignore_value_none=ignore_value_none, + ignore_value_none=ignore_value_none, # DEPRECATION: remove in community.general 12.0.0 check_mode_skip=check_mode_skip, check_mode_return=check_mode_return, **kwargs) @@ -251,6 +290,7 @@ class _CmdRunnerContext(object): self.runner = runner self.args_order = tuple(args_order) self.output_process = output_process + # DEPRECATION: parameter ignore_value_none at the context level is deprecated and will be removed in community.general 12.0.0 self.ignore_value_none = ignore_value_none self.check_mode_skip = check_mode_skip self.check_mode_return = check_mode_return @@ -290,6 +330,7 @@ class _CmdRunnerContext(object): value = named_args[arg_name] elif not runner.arg_formats[arg_name].ignore_missing_value: raise MissingArgumentValue(self.args_order, arg_name) + # DEPRECATION: remove parameter ctx_ignore_none in 12.0.0 self.cmd.extend(runner.arg_formats[arg_name](value, ctx_ignore_none=self.ignore_value_none)) except MissingArgumentValue: raise @@ -306,7 +347,7 @@ class _CmdRunnerContext(object): @property def run_info(self): return dict( - ignore_value_none=self.ignore_value_none, + ignore_value_none=self.ignore_value_none, # DEPRECATION: remove in community.general 12.0.0 check_rc=self.check_rc, environ_update=self.environ_update, args_order=self.args_order, diff --git a/ansible_collections/community/general/plugins/module_utils/consul.py b/ansible_collections/community/general/plugins/module_utils/consul.py index 68c1a130b..cd54a105f 100644 --- a/ansible_collections/community/general/plugins/module_utils/consul.py +++ b/ansible_collections/community/general/plugins/module_utils/consul.py @@ -10,6 +10,7 @@ __metaclass__ = type import copy import json +import re from ansible.module_utils.six.moves.urllib import error as urllib_error from ansible.module_utils.six.moves.urllib.parse import urlencode @@ -68,6 +69,25 @@ def camel_case_key(key): return "".join(parts) +def validate_check(check): + validate_duration_keys = ['Interval', 'Ttl', 'Timeout'] + validate_tcp_regex = r"(?P<host>.*):(?P<port>(?:[0-9]+))$" + if check.get('Tcp') is not None: + match = re.match(validate_tcp_regex, check['Tcp']) + if not match: + raise Exception('tcp check must be in host:port format') + for duration in validate_duration_keys: + if duration in check and check[duration] is not None: + check[duration] = validate_duration(check[duration]) + + +def validate_duration(duration): + if duration: + if not re.search(r"\d+(?:ns|us|ms|s|m|h)", duration): + duration = "{0}s".format(duration) + return duration + + STATE_PARAMETER = "state" STATE_PRESENT = "present" STATE_ABSENT = "absent" @@ -81,7 +101,7 @@ OPERATION_DELETE = "remove" def _normalize_params(params, arg_spec): final_params = {} for k, v in params.items(): - if k not in arg_spec: # Alias + if k not in arg_spec or v is None: # Alias continue spec = arg_spec[k] if ( @@ -105,9 +125,10 @@ class _ConsulModule: """ api_endpoint = None # type: str - unique_identifier = None # type: str + unique_identifiers = None # type: list result_key = None # type: str create_only_fields = set() + operational_attributes = set() params = {} def __init__(self, module): @@ -119,6 +140,8 @@ class _ConsulModule: if k not in STATE_PARAMETER and k not in AUTH_ARGUMENTS_SPEC } + self.operational_attributes.update({"CreateIndex", "CreateTime", "Hash", "ModifyIndex"}) + def execute(self): obj = self.read_object() @@ -203,14 +226,24 @@ class _ConsulModule: return False def prepare_object(self, existing, obj): - operational_attributes = {"CreateIndex", "CreateTime", "Hash", "ModifyIndex"} existing = { - k: v for k, v in existing.items() if k not in operational_attributes + k: v for k, v in existing.items() if k not in self.operational_attributes } for k, v in obj.items(): existing[k] = v return existing + def id_from_obj(self, obj, camel_case=False): + def key_func(key): + return camel_case_key(key) if camel_case else key + + if self.unique_identifiers: + for identifier in self.unique_identifiers: + identifier = key_func(identifier) + if identifier in obj: + return obj[identifier] + return None + def endpoint_url(self, operation, identifier=None): if operation == OPERATION_CREATE: return self.api_endpoint @@ -219,7 +252,8 @@ class _ConsulModule: raise RuntimeError("invalid arguments passed") def read_object(self): - url = self.endpoint_url(OPERATION_READ, self.params.get(self.unique_identifier)) + identifier = self.id_from_obj(self.params) + url = self.endpoint_url(OPERATION_READ, identifier) try: return self.get(url) except RequestError as e: @@ -233,25 +267,28 @@ class _ConsulModule: if self._module.check_mode: return obj else: - return self.put(self.api_endpoint, data=self.prepare_object({}, obj)) + url = self.endpoint_url(OPERATION_CREATE) + created_obj = self.put(url, data=self.prepare_object({}, obj)) + if created_obj is None: + created_obj = self.read_object() + return created_obj def update_object(self, existing, obj): - url = self.endpoint_url( - OPERATION_UPDATE, existing.get(camel_case_key(self.unique_identifier)) - ) merged_object = self.prepare_object(existing, obj) if self._module.check_mode: return merged_object else: - return self.put(url, data=merged_object) + url = self.endpoint_url(OPERATION_UPDATE, self.id_from_obj(existing, camel_case=True)) + updated_obj = self.put(url, data=merged_object) + if updated_obj is None: + updated_obj = self.read_object() + return updated_obj def delete_object(self, obj): if self._module.check_mode: return {} else: - url = self.endpoint_url( - OPERATION_DELETE, obj.get(camel_case_key(self.unique_identifier)) - ) + url = self.endpoint_url(OPERATION_DELETE, self.id_from_obj(obj, camel_case=True)) return self.delete(url) def _request(self, method, url_parts, data=None, params=None): @@ -309,7 +346,9 @@ class _ConsulModule: if 400 <= status < 600: raise RequestError(status, response_data) - return json.loads(response_data) + if response_data: + return json.loads(response_data) + return None def get(self, url_parts, **kwargs): return self._request("GET", url_parts, **kwargs) diff --git a/ansible_collections/community/general/plugins/module_utils/django.py b/ansible_collections/community/general/plugins/module_utils/django.py index fbaf840db..5fb375c6f 100644 --- a/ansible_collections/community/general/plugins/module_utils/django.py +++ b/ansible_collections/community/general/plugins/module_utils/django.py @@ -7,6 +7,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type +from ansible.module_utils.common.dict_transformations import dict_merge from ansible_collections.community.general.plugins.module_utils.cmd_runner import cmd_runner_fmt from ansible_collections.community.general.plugins.module_utils.python_runner import PythonRunner from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper @@ -33,6 +34,18 @@ _django_std_arg_fmts = dict( skip_checks=cmd_runner_fmt.as_bool("--skip-checks"), ) +_django_database_args = dict( + database=dict(type="str", default="default"), +) + +_args_menu = dict( + std=(django_std_args, _django_std_arg_fmts), + database=(_django_database_args, {"database": cmd_runner_fmt.as_opt_eq_val("--database")}), + noinput=({}, {"noinput": cmd_runner_fmt.as_fixed("--noinput")}), + dry_run=({}, {"dry_run": cmd_runner_fmt.as_bool("--dry-run")}), + check=({}, {"check": cmd_runner_fmt.as_bool("--check")}), +) + class _DjangoRunner(PythonRunner): def __init__(self, module, arg_formats=None, **kwargs): @@ -55,15 +68,30 @@ class DjangoModuleHelper(ModuleHelper): arg_formats = {} django_admin_arg_order = () use_old_vardict = False + _django_args = [] + _check_mode_arg = "" def __init__(self): - argument_spec = dict(django_std_args) - argument_spec.update(self.module.get("argument_spec", {})) - self.module["argument_spec"] = argument_spec + self.module["argument_spec"], self.arg_formats = self._build_args(self.module.get("argument_spec", {}), + self.arg_formats, + *(["std"] + self._django_args)) super(DjangoModuleHelper, self).__init__(self.module) if self.django_admin_cmd is not None: self.vars.command = self.django_admin_cmd + @staticmethod + def _build_args(arg_spec, arg_format, *names): + res_arg_spec = {} + res_arg_fmts = {} + for name in names: + args, fmts = _args_menu[name] + res_arg_spec = dict_merge(res_arg_spec, args) + res_arg_fmts = dict_merge(res_arg_fmts, fmts) + res_arg_spec = dict_merge(res_arg_spec, arg_spec) + res_arg_fmts = dict_merge(res_arg_fmts, arg_format) + + return res_arg_spec, res_arg_fmts + def __run__(self): runner = _DjangoRunner(self.module, default_args_order=self.django_admin_arg_order, @@ -71,7 +99,10 @@ class DjangoModuleHelper(ModuleHelper): venv=self.vars.venv, check_rc=True) with runner() as ctx: - results = ctx.run() + run_params = self.vars.as_dict() + if self._check_mode_arg: + run_params.update({self._check_mode_arg: self.check_mode}) + results = ctx.run(**run_params) self.vars.stdout = ctx.results_out self.vars.stderr = ctx.results_err self.vars.cmd = ctx.cmd diff --git a/ansible_collections/community/general/plugins/module_utils/proxmox.py b/ansible_collections/community/general/plugins/module_utils/proxmox.py index 5fd783d65..05bf1874b 100644 --- a/ansible_collections/community/general/plugins/module_utils/proxmox.py +++ b/ansible_collections/community/general/plugins/module_utils/proxmox.py @@ -29,6 +29,9 @@ def proxmox_auth_argument_spec(): required=True, fallback=(env_fallback, ['PROXMOX_HOST']) ), + api_port=dict(type='int', + fallback=(env_fallback, ['PROXMOX_PORT']) + ), api_user=dict(type='str', required=True, fallback=(env_fallback, ['PROXMOX_USER']) @@ -82,6 +85,7 @@ class ProxmoxAnsible(object): def _connect(self): api_host = self.module.params['api_host'] + api_port = self.module.params['api_port'] api_user = self.module.params['api_user'] api_password = self.module.params['api_password'] api_token_id = self.module.params['api_token_id'] @@ -89,6 +93,10 @@ class ProxmoxAnsible(object): validate_certs = self.module.params['validate_certs'] auth_args = {'user': api_user} + + if api_port: + auth_args['port'] = api_port + if api_password: auth_args['password'] = api_password else: diff --git a/ansible_collections/community/general/plugins/module_utils/redfish_utils.py b/ansible_collections/community/general/plugins/module_utils/redfish_utils.py index 6935573d0..139628bd9 100644 --- a/ansible_collections/community/general/plugins/module_utils/redfish_utils.py +++ b/ansible_collections/community/general/plugins/module_utils/redfish_utils.py @@ -11,6 +11,7 @@ import os import random import string import gzip +import time from io import BytesIO from ansible.module_utils.urls import open_url from ansible.module_utils.common.text.converters import to_native @@ -132,11 +133,13 @@ class RedfishUtils(object): return resp # The following functions are to send GET/POST/PATCH/DELETE requests - def get_request(self, uri, override_headers=None, allow_no_resp=False): + def get_request(self, uri, override_headers=None, allow_no_resp=False, timeout=None): req_headers = dict(GET_HEADERS) if override_headers: req_headers.update(override_headers) username, password, basic_auth = self._auth_params(req_headers) + if timeout is None: + timeout = self.timeout try: # Service root is an unauthenticated resource; remove credentials # in case the caller will be using sessions later. @@ -146,7 +149,7 @@ class RedfishUtils(object): url_username=username, url_password=password, force_basic_auth=basic_auth, validate_certs=False, follow_redirects='all', - use_proxy=True, timeout=self.timeout) + use_proxy=True, timeout=timeout) headers = dict((k.lower(), v) for (k, v) in resp.info().items()) try: if headers.get('content-encoding') == 'gzip' and LooseVersion(ansible_version) < LooseVersion('2.14'): @@ -624,6 +627,24 @@ class RedfishUtils(object): allowable_values = default_values return allowable_values + def check_service_availability(self): + """ + Checks if the service is accessible. + + :return: dict containing the status of the service + """ + + # Get the service root + # Override the timeout since the service root is expected to be readily + # available. + service_root = self.get_request(self.root_uri + self.service_root, timeout=10) + if service_root['ret'] is False: + # Failed, either due to a timeout or HTTP error; not available + return {'ret': True, 'available': False} + + # Successfully accessed the service root; available + return {'ret': True, 'available': True} + def get_logs(self): log_svcs_uri_list = [] list_of_logs = [] @@ -1083,11 +1104,12 @@ class RedfishUtils(object): return self.manage_power(command, self.systems_uri, '#ComputerSystem.Reset') - def manage_manager_power(self, command): + def manage_manager_power(self, command, wait=False, wait_timeout=120): return self.manage_power(command, self.manager_uri, - '#Manager.Reset') + '#Manager.Reset', wait, wait_timeout) - def manage_power(self, command, resource_uri, action_name): + def manage_power(self, command, resource_uri, action_name, wait=False, + wait_timeout=120): key = "Actions" reset_type_values = ['On', 'ForceOff', 'GracefulShutdown', 'GracefulRestart', 'ForceRestart', 'Nmi', @@ -1147,6 +1169,30 @@ class RedfishUtils(object): response = self.post_request(self.root_uri + action_uri, payload) if response['ret'] is False: return response + + # If requested to wait for the service to be available again, block + # until it's ready + if wait: + elapsed_time = 0 + start_time = time.time() + # Start with a large enough sleep. Some services will process new + # requests while in the middle of shutting down, thus breaking out + # early. + time.sleep(30) + + # Periodically check for the service's availability. + while elapsed_time <= wait_timeout: + status = self.check_service_availability() + if status['available']: + # It's available; we're done + break + time.sleep(5) + elapsed_time = time.time() - start_time + + if elapsed_time > wait_timeout: + # Exhausted the wait timer; error + return {'ret': False, 'changed': True, + 'msg': 'The service did not become available after %d seconds' % wait_timeout} return {'ret': True, 'changed': True} def manager_reset_to_defaults(self, command): diff --git a/ansible_collections/community/general/plugins/modules/ansible_galaxy_install.py b/ansible_collections/community/general/plugins/modules/ansible_galaxy_install.py index d382ed93a..b0f3aeb5d 100644 --- a/ansible_collections/community/general/plugins/modules/ansible_galaxy_install.py +++ b/ansible_collections/community/general/plugins/modules/ansible_galaxy_install.py @@ -32,6 +32,19 @@ attributes: diff_mode: support: none options: + state: + description: + - > + If O(state=present) then the collection or role will be installed. + Note that the collections and roles are not updated with this option. + - > + Currently the O(state=latest) is ignored unless O(type=collection), and it will + ensure the collection is installed and updated to the latest available version. + - Please note that O(force=true) can be used to perform upgrade regardless of O(type). + type: str + choices: [ present, latest ] + default: present + version_added: 9.1.0 type: description: - The type of installation performed by C(ansible-galaxy). @@ -69,7 +82,8 @@ options: default: false force: description: - - Force overwriting an existing role or collection. + - Force overwriting existing roles and/or collections. + - It can be used for upgrading, but the module output will always report C(changed=true). - Using O(force=true) is mandatory when downgrading. type: bool default: false @@ -188,6 +202,7 @@ class AnsibleGalaxyInstall(ModuleHelper): output_params = ('type', 'name', 'dest', 'requirements_file', 'force', 'no_deps') module = dict( argument_spec=dict( + state=dict(type='str', choices=['present', 'latest'], default='present'), type=dict(type='str', choices=('collection', 'role', 'both'), required=True), name=dict(type='str'), requirements_file=dict(type='path'), @@ -206,6 +221,7 @@ class AnsibleGalaxyInstall(ModuleHelper): command_args_formats = dict( type=cmd_runner_fmt.as_func(lambda v: [] if v == 'both' else [v]), galaxy_cmd=cmd_runner_fmt.as_list(), + upgrade=cmd_runner_fmt.as_bool("--upgrade"), requirements_file=cmd_runner_fmt.as_opt_val('-r'), dest=cmd_runner_fmt.as_opt_val('-p'), force=cmd_runner_fmt.as_bool("--force"), @@ -244,9 +260,7 @@ class AnsibleGalaxyInstall(ModuleHelper): def __init_module__(self): self.runner, self.ansible_version = self._get_ansible_galaxy_version() if self.ansible_version < (2, 11): - self.module.fail_json( - msg="Support for Ansible 2.9 and ansible-base 2.10 has been removed." - ) + self.module.fail_json(msg="Support for Ansible 2.9 and ansible-base 2.10 has been removed.") self.vars.set("new_collections", {}, change=True) self.vars.set("new_roles", {}, change=True) if self.vars.type != "collection": @@ -299,8 +313,9 @@ class AnsibleGalaxyInstall(ModuleHelper): elif match.group("role"): self.vars.new_roles[match.group("role")] = match.group("rversion") - with self.runner("type galaxy_cmd force no_deps dest requirements_file name", output_process=process) as ctx: - ctx.run(galaxy_cmd="install") + upgrade = (self.vars.type == "collection" and self.vars.state == "latest") + with self.runner("type galaxy_cmd upgrade force no_deps dest requirements_file name", output_process=process) as ctx: + ctx.run(galaxy_cmd="install", upgrade=upgrade) if self.verbosity > 2: self.vars.set("run_info", ctx.run_info) diff --git a/ansible_collections/community/general/plugins/modules/cargo.py b/ansible_collections/community/general/plugins/modules/cargo.py index ba9c05ed7..2fc729da2 100644 --- a/ansible_collections/community/general/plugins/modules/cargo.py +++ b/ansible_collections/community/general/plugins/modules/cargo.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021 Radek Sprta <mail@radeksprta.eu> +# Copyright (c) 2024 Colin Nolan <cn580@alumni.york.ac.uk> # 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 @@ -65,6 +66,13 @@ options: type: str default: present choices: [ "present", "absent", "latest" ] + directory: + description: + - Path to the source directory to install the Rust package from. + - This is only used when installing packages. + type: path + required: false + version_added: 9.1.0 requirements: - cargo installed """ @@ -98,8 +106,14 @@ EXAMPLES = r""" community.general.cargo: name: ludusavi state: latest + +- name: Install "ludusavi" Rust package from source directory + community.general.cargo: + name: ludusavi + directory: /path/to/ludusavi/source """ +import json import os import re @@ -115,6 +129,7 @@ class Cargo(object): self.state = kwargs["state"] self.version = kwargs["version"] self.locked = kwargs["locked"] + self.directory = kwargs["directory"] @property def path(self): @@ -143,7 +158,7 @@ class Cargo(object): data, dummy = self._exec(cmd, True, False, False) - package_regex = re.compile(r"^([\w\-]+) v(.+):$") + package_regex = re.compile(r"^([\w\-]+) v(\S+).*:$") installed = {} for line in data.splitlines(): package_info = package_regex.match(line) @@ -163,19 +178,53 @@ class Cargo(object): if self.version: cmd.append("--version") cmd.append(self.version) + if self.directory: + cmd.append("--path") + cmd.append(self.directory) return self._exec(cmd) def is_outdated(self, name): installed_version = self.get_installed().get(name) + latest_version = ( + self.get_latest_published_version(name) + if not self.directory + else self.get_source_directory_version(name) + ) + return installed_version != latest_version + def get_latest_published_version(self, name): cmd = ["search", name, "--limit", "1"] data, dummy = self._exec(cmd, True, False, False) match = re.search(r'"(.+)"', data) - if match: - latest_version = match.group(1) - - return installed_version != latest_version + if not match: + self.module.fail_json( + msg="No published version for package %s found" % name + ) + return match.group(1) + + def get_source_directory_version(self, name): + cmd = [ + "metadata", + "--format-version", + "1", + "--no-deps", + "--manifest-path", + os.path.join(self.directory, "Cargo.toml"), + ] + data, dummy = self._exec(cmd, True, False, False) + manifest = json.loads(data) + + package = next( + (package for package in manifest["packages"] if package["name"] == name), + None, + ) + if not package: + self.module.fail_json( + msg="Package %s not defined in source, found: %s" + % (name, [x["name"] for x in manifest["packages"]]) + ) + return package["version"] def uninstall(self, packages=None): cmd = ["uninstall"] @@ -191,16 +240,21 @@ def main(): state=dict(default="present", choices=["present", "absent", "latest"]), version=dict(default=None, type="str"), locked=dict(default=False, type="bool"), + directory=dict(default=None, type="path"), ) module = AnsibleModule(argument_spec=arg_spec, supports_check_mode=True) name = module.params["name"] state = module.params["state"] version = module.params["version"] + directory = module.params["directory"] if not name: module.fail_json(msg="Package name must be specified") + if directory is not None and not os.path.isdir(directory): + module.fail_json(msg="Source directory does not exist") + # Set LANG env since we parse stdout module.run_command_environ_update = dict( LANG="C", LC_ALL="C", LC_MESSAGES="C", LC_CTYPE="C" diff --git a/ansible_collections/community/general/plugins/modules/consul_agent_check.py b/ansible_collections/community/general/plugins/modules/consul_agent_check.py new file mode 100644 index 000000000..373926004 --- /dev/null +++ b/ansible_collections/community/general/plugins/modules/consul_agent_check.py @@ -0,0 +1,254 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2024, Michael Ilg +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +module: consul_agent_check +short_description: Add, modify, and delete checks within a consul cluster +version_added: 9.1.0 +description: + - Allows the addition, modification and deletion of checks in a consul + cluster via the agent. For more details on using and configuring Checks, + see U(https://developer.hashicorp.com/consul/api-docs/agent/check). + - Currently, there is no complete way to retrieve the script, interval or TTL + metadata for a registered check. Without this metadata it is not possible to + tell if the data supplied with ansible represents a change to a check. As a + result this does not attempt to determine changes and will always report a + changed occurred. An API method is planned to supply this metadata so at that + stage change management will be added. +author: + - Michael Ilg (@Ilgmi) +extends_documentation_fragment: + - community.general.consul + - community.general.consul.actiongroup_consul + - community.general.consul.token + - community.general.attributes +attributes: + check_mode: + support: full + details: + - The result is the object as it is defined in the module options and not the object structure of the consul API. + For a better overview of what the object structure looks like, + take a look at U(https://developer.hashicorp.com/consul/api-docs/agent/check#list-checks). + diff_mode: + support: partial + details: + - In check mode the diff will show the object as it is defined in the module options and not the object structure of the consul API. +options: + state: + description: + - Whether the check should be present or absent. + choices: ['present', 'absent'] + default: present + type: str + name: + description: + - Required name for the service check. + type: str + id: + description: + - Specifies a unique ID for this check on the node. This defaults to the O(name) parameter, but it may be necessary to provide + an ID for uniqueness. This value will return in the response as "CheckId". + type: str + interval: + description: + - The interval at which the service check will be run. + This is a number with a V(s) or V(m) suffix to signify the units of seconds or minutes, for example V(15s) or V(1m). + If no suffix is supplied V(s) will be used by default, for example V(10) will be V(10s). + - Required if one of the parameters O(args), O(http), or O(tcp) is specified. + type: str + notes: + description: + - Notes to attach to check when registering it. + type: str + args: + description: + - Specifies command arguments to run to update the status of the check. + - Requires O(interval) to be provided. + - Mutually exclusive with O(ttl), O(tcp) and O(http). + type: list + elements: str + ttl: + description: + - Checks can be registered with a TTL instead of a O(args) and O(interval) + this means that the service will check in with the agent before the + TTL expires. If it doesn't the check will be considered failed. + Required if registering a check and the script an interval are missing + Similar to the interval this is a number with a V(s) or V(m) suffix to + signify the units of seconds or minutes, for example V(15s) or V(1m). + If no suffix is supplied V(s) will be used by default, for example V(10) will be V(10s). + - Mutually exclusive with O(args), O(tcp) and O(http). + type: str + tcp: + description: + - Checks can be registered with a TCP port. This means that consul + will check if the connection attempt to that port is successful (that is, the port is currently accepting connections). + The format is V(host:port), for example V(localhost:80). + - Requires O(interval) to be provided. + - Mutually exclusive with O(args), O(ttl) and O(http). + type: str + version_added: '1.3.0' + http: + description: + - Checks can be registered with an HTTP endpoint. This means that consul + will check that the http endpoint returns a successful HTTP status. + - Requires O(interval) to be provided. + - Mutually exclusive with O(args), O(ttl) and O(tcp). + type: str + timeout: + description: + - A custom HTTP check timeout. The consul default is 10 seconds. + Similar to the interval this is a number with a V(s) or V(m) suffix to + signify the units of seconds or minutes, for example V(15s) or V(1m). + If no suffix is supplied V(s) will be used by default, for example V(10) will be V(10s). + type: str + service_id: + description: + - The ID for the service, must be unique per node. If O(state=absent), + defaults to the service name if supplied. + type: str +''' + +EXAMPLES = ''' +- name: Register tcp check for service 'nginx' + community.general.consul_agent_check: + name: nginx_tcp_check + service_id: nginx + interval: 60s + tcp: localhost:80 + notes: "Nginx Check" + +- name: Register http check for service 'nginx' + community.general.consul_agent_check: + name: nginx_http_check + service_id: nginx + interval: 60s + http: http://localhost:80/status + notes: "Nginx Check" + +- name: Remove check for service 'nginx' + community.general.consul_agent_check: + state: absent + id: nginx_http_check + service_id: "{{ nginx_service.ID }}" +''' + +RETURN = """ +check: + description: The check as returned by the consul HTTP API. + returned: always + type: dict + sample: + CheckID: nginx_check + ServiceID: nginx + Interval: 30s + Type: http + Notes: Nginx Check +operation: + description: The operation performed. + returned: changed + type: str + sample: update +""" + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils.consul import ( + AUTH_ARGUMENTS_SPEC, + OPERATION_CREATE, + OPERATION_UPDATE, + OPERATION_DELETE, + OPERATION_READ, + _ConsulModule, + validate_check, +) + +_ARGUMENT_SPEC = { + "state": dict(default="present", choices=["present", "absent"]), + "name": dict(type='str'), + "id": dict(type='str'), + "interval": dict(type='str'), + "notes": dict(type='str'), + "args": dict(type='list', elements='str'), + "http": dict(type='str'), + "tcp": dict(type='str'), + "ttl": dict(type='str'), + "timeout": dict(type='str'), + "service_id": dict(type='str'), +} + +_MUTUALLY_EXCLUSIVE = [ + ('args', 'ttl', 'tcp', 'http'), +] + +_REQUIRED_IF = [ + ('state', 'present', ['name']), + ('state', 'absent', ('id', 'name'), True), +] + +_REQUIRED_BY = { + 'args': 'interval', + 'http': 'interval', + 'tcp': 'interval', +} + +_ARGUMENT_SPEC.update(AUTH_ARGUMENTS_SPEC) + + +class ConsulAgentCheckModule(_ConsulModule): + api_endpoint = "agent/check" + result_key = "check" + unique_identifiers = ["id", "name"] + operational_attributes = {"Node", "CheckID", "Output", "ServiceName", "ServiceTags", + "Status", "Type", "ExposedPort", "Definition"} + + def endpoint_url(self, operation, identifier=None): + if operation == OPERATION_READ: + return "agent/checks" + if operation in [OPERATION_CREATE, OPERATION_UPDATE]: + return "/".join([self.api_endpoint, "register"]) + if operation == OPERATION_DELETE: + return "/".join([self.api_endpoint, "deregister", identifier]) + + return super(ConsulAgentCheckModule, self).endpoint_url(operation, identifier) + + def read_object(self): + url = self.endpoint_url(OPERATION_READ) + checks = self.get(url) + identifier = self.id_from_obj(self.params) + if identifier in checks: + return checks[identifier] + return None + + def prepare_object(self, existing, obj): + existing = super(ConsulAgentCheckModule, self).prepare_object(existing, obj) + validate_check(existing) + return existing + + def delete_object(self, obj): + if not self._module.check_mode: + self.put(self.endpoint_url(OPERATION_DELETE, obj.get("CheckID"))) + return {} + + +def main(): + module = AnsibleModule( + _ARGUMENT_SPEC, + mutually_exclusive=_MUTUALLY_EXCLUSIVE, + required_if=_REQUIRED_IF, + required_by=_REQUIRED_BY, + supports_check_mode=True, + ) + + consul_module = ConsulAgentCheckModule(module) + consul_module.execute() + + +if __name__ == "__main__": + main() diff --git a/ansible_collections/community/general/plugins/modules/consul_agent_service.py b/ansible_collections/community/general/plugins/modules/consul_agent_service.py new file mode 100644 index 000000000..a8ef09897 --- /dev/null +++ b/ansible_collections/community/general/plugins/modules/consul_agent_service.py @@ -0,0 +1,289 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright (c) 2024, Michael Ilg +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = ''' +module: consul_agent_service +short_description: Add, modify and delete services within a consul cluster +version_added: 9.1.0 +description: + - Allows the addition, modification and deletion of services in a consul + cluster via the agent. + - There are currently no plans to create services and checks in one. + This is because the Consul API does not provide checks for a service and + the checks themselves do not match the module parameters. + Therefore, only a service without checks can be created in this module. +author: + - Michael Ilg (@Ilgmi) +extends_documentation_fragment: + - community.general.consul + - community.general.consul.actiongroup_consul + - community.general.consul.token + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: partial + details: + - In check mode the diff will miss operational attributes. +options: + state: + description: + - Whether the service should be present or absent. + choices: ['present', 'absent'] + default: present + type: str + name: + description: + - Unique name for the service on a node, must be unique per node, + required if registering a service. + type: str + id: + description: + - Specifies a unique ID for this service. This must be unique per agent. This defaults to the O(name) parameter if not provided. + If O(state=absent), defaults to the service name if supplied. + type: str + tags: + description: + - Tags that will be attached to the service registration. + type: list + elements: str + address: + description: + - The address to advertise that the service will be listening on. + This value will be passed as the C(address) parameter to Consul's + C(/v1/agent/service/register) API method, so refer to the Consul API + documentation for further details. + type: str + meta: + description: + - Optional meta data used for filtering. + For keys, the characters C(A-Z), C(a-z), C(0-9), C(_), C(-) are allowed. + Not allowed characters are replaced with underscores. + type: dict + service_port: + description: + - The port on which the service is listening. Can optionally be supplied for + registration of a service, that is if O(name) or O(id) is set. + type: int + enable_tag_override: + description: + - Specifies to disable the anti-entropy feature for this service's tags. + If EnableTagOverride is set to true then external agents can update this service in the catalog and modify the tags. + type: bool + default: False + weights: + description: + - Specifies weights for the service + type: dict + suboptions: + passing: + description: + - Weights for passing. + type: int + default: 1 + warning: + description: + - Weights for warning. + type: int + default: 1 + default: {"passing": 1, "warning": 1} +''' + +EXAMPLES = ''' +- name: Register nginx service with the local consul agent + community.general.consul_agent_service: + host: consul1.example.com + token: some_management_acl + name: nginx + service_port: 80 + +- name: Register nginx with a tcp check + community.general.consul_agent_service: + host: consul1.example.com + token: some_management_acl + name: nginx + service_port: 80 + +- name: Register nginx with an http check + community.general.consul_agent_service: + host: consul1.example.com + token: some_management_acl + name: nginx + service_port: 80 + +- name: Register external service nginx available at 10.1.5.23 + community.general.consul_agent_service: + host: consul1.example.com + token: some_management_acl + name: nginx + service_port: 80 + address: 10.1.5.23 + +- name: Register nginx with some service tags + community.general.consul_agent_service: + host: consul1.example.com + token: some_management_acl + name: nginx + service_port: 80 + tags: + - prod + - webservers + +- name: Register nginx with some service meta + community.general.consul_agent_service: + host: consul1.example.com + token: some_management_acl + name: nginx + service_port: 80 + meta: + nginx_version: 1.25.3 + +- name: Remove nginx service + community.general.consul_agent_service: + host: consul1.example.com + token: some_management_acl + service_id: nginx + state: absent + +- name: Register celery worker service + community.general.consul_agent_service: + host: consul1.example.com + token: some_management_acl + name: celery-worker + tags: + - prod + - worker +''' + +RETURN = """ +service: + description: The service as returned by the consul HTTP API. + returned: always + type: dict + sample: + ID: nginx + Service: nginx + Address: localhost + Port: 80 + Tags: + - http + Meta: + - nginx_version: 1.23.3 + Datacenter: dc1 + Weights: + Passing: 1 + Warning: 1 + ContentHash: 61a245cd985261ac + EnableTagOverride: false +operation: + description: The operation performed. + returned: changed + type: str + sample: update +""" + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.general.plugins.module_utils.consul import ( + AUTH_ARGUMENTS_SPEC, + OPERATION_CREATE, + OPERATION_UPDATE, + OPERATION_DELETE, + _ConsulModule +) + +_CHECK_MUTUALLY_EXCLUSIVE = [('args', 'ttl', 'tcp', 'http')] +_CHECK_REQUIRED_BY = { + 'args': 'interval', + 'http': 'interval', + 'tcp': 'interval', +} + +_ARGUMENT_SPEC = { + "state": dict(default="present", choices=["present", "absent"]), + "name": dict(type='str'), + "id": dict(type='str'), + "tags": dict(type='list', elements='str'), + "address": dict(type='str'), + "meta": dict(type='dict'), + "service_port": dict(type='int'), + "enable_tag_override": dict(type='bool', default=False), + "weights": dict(type='dict', options=dict( + passing=dict(type='int', default=1, no_log=False), + warning=dict(type='int', default=1) + ), default={"passing": 1, "warning": 1}) +} + +_REQUIRED_IF = [ + ('state', 'present', ['name']), + ('state', 'absent', ('id', 'name'), True), +] + +_ARGUMENT_SPEC.update(AUTH_ARGUMENTS_SPEC) + + +class ConsulAgentServiceModule(_ConsulModule): + api_endpoint = "agent/service" + result_key = "service" + unique_identifiers = ["id", "name"] + operational_attributes = {"Service", "ContentHash", "Datacenter"} + + def endpoint_url(self, operation, identifier=None): + if operation in [OPERATION_CREATE, OPERATION_UPDATE]: + return "/".join([self.api_endpoint, "register"]) + if operation == OPERATION_DELETE: + return "/".join([self.api_endpoint, "deregister", identifier]) + + return super(ConsulAgentServiceModule, self).endpoint_url(operation, identifier) + + def prepare_object(self, existing, obj): + existing = super(ConsulAgentServiceModule, self).prepare_object(existing, obj) + if "ServicePort" in existing: + existing["Port"] = existing.pop("ServicePort") + + if "ID" not in existing: + existing["ID"] = existing["Name"] + + return existing + + def needs_update(self, api_obj, module_obj): + obj = {} + if "Service" in api_obj: + obj["Service"] = api_obj["Service"] + api_obj = self.prepare_object(api_obj, obj) + + if "Name" in module_obj: + module_obj["Service"] = module_obj.pop("Name") + if "ServicePort" in module_obj: + module_obj["Port"] = module_obj.pop("ServicePort") + + return super(ConsulAgentServiceModule, self).needs_update(api_obj, module_obj) + + def delete_object(self, obj): + if not self._module.check_mode: + url = self.endpoint_url(OPERATION_DELETE, self.id_from_obj(obj, camel_case=True)) + self.put(url) + return {} + + +def main(): + module = AnsibleModule( + _ARGUMENT_SPEC, + required_if=_REQUIRED_IF, + supports_check_mode=True, + ) + + consul_module = ConsulAgentServiceModule(module) + consul_module.execute() + + +if __name__ == "__main__": + main() diff --git a/ansible_collections/community/general/plugins/modules/consul_auth_method.py b/ansible_collections/community/general/plugins/modules/consul_auth_method.py index afe549f6e..e28474c31 100644 --- a/ansible_collections/community/general/plugins/modules/consul_auth_method.py +++ b/ansible_collections/community/general/plugins/modules/consul_auth_method.py @@ -168,7 +168,7 @@ def normalize_ttl(ttl): class ConsulAuthMethodModule(_ConsulModule): api_endpoint = "acl/auth-method" result_key = "auth_method" - unique_identifier = "name" + unique_identifiers = ["name"] def map_param(self, k, v, is_update): if k == "config" and v: diff --git a/ansible_collections/community/general/plugins/modules/consul_binding_rule.py b/ansible_collections/community/general/plugins/modules/consul_binding_rule.py index 88496f867..6a2882cee 100644 --- a/ansible_collections/community/general/plugins/modules/consul_binding_rule.py +++ b/ansible_collections/community/general/plugins/modules/consul_binding_rule.py @@ -124,7 +124,7 @@ from ansible_collections.community.general.plugins.module_utils.consul import ( class ConsulBindingRuleModule(_ConsulModule): api_endpoint = "acl/binding-rule" result_key = "binding_rule" - unique_identifier = "id" + unique_identifiers = ["id"] def read_object(self): url = "acl/binding-rules?authmethod={0}".format(self.params["auth_method"]) diff --git a/ansible_collections/community/general/plugins/modules/consul_policy.py b/ansible_collections/community/general/plugins/modules/consul_policy.py index 2ed6021b0..36139ac09 100644 --- a/ansible_collections/community/general/plugins/modules/consul_policy.py +++ b/ansible_collections/community/general/plugins/modules/consul_policy.py @@ -145,7 +145,7 @@ _ARGUMENT_SPEC.update(AUTH_ARGUMENTS_SPEC) class ConsulPolicyModule(_ConsulModule): api_endpoint = "acl/policy" result_key = "policy" - unique_identifier = "id" + unique_identifiers = ["id"] def endpoint_url(self, operation, identifier=None): if operation == OPERATION_READ: diff --git a/ansible_collections/community/general/plugins/modules/consul_role.py b/ansible_collections/community/general/plugins/modules/consul_role.py index e07e2036f..d6c4e4dd9 100644 --- a/ansible_collections/community/general/plugins/modules/consul_role.py +++ b/ansible_collections/community/general/plugins/modules/consul_role.py @@ -212,7 +212,7 @@ from ansible_collections.community.general.plugins.module_utils.consul import ( class ConsulRoleModule(_ConsulModule): api_endpoint = "acl/role" result_key = "role" - unique_identifier = "id" + unique_identifiers = ["id"] def endpoint_url(self, operation, identifier=None): if operation == OPERATION_READ: diff --git a/ansible_collections/community/general/plugins/modules/consul_token.py b/ansible_collections/community/general/plugins/modules/consul_token.py index 02bc544da..c8bc8bc27 100644 --- a/ansible_collections/community/general/plugins/modules/consul_token.py +++ b/ansible_collections/community/general/plugins/modules/consul_token.py @@ -235,13 +235,13 @@ def normalize_link_obj(api_obj, module_obj, key): class ConsulTokenModule(_ConsulModule): api_endpoint = "acl/token" result_key = "token" - unique_identifier = "accessor_id" + unique_identifiers = ["accessor_id"] create_only_fields = {"expiration_ttl"} def read_object(self): # if `accessor_id` is not supplied we can only create objects and are not idempotent - if not self.params.get(self.unique_identifier): + if not self.id_from_obj(self.params): return None return super(ConsulTokenModule, self).read_object() diff --git a/ansible_collections/community/general/plugins/modules/django_check.py b/ansible_collections/community/general/plugins/modules/django_check.py new file mode 100644 index 000000000..1553da7a3 --- /dev/null +++ b/ansible_collections/community/general/plugins/modules/django_check.py @@ -0,0 +1,113 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2024, Alexei Znamensky <russoz@gmail.com> +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = """ +module: django_check +author: + - Alexei Znamensky (@russoz) +short_description: Wrapper for C(django-admin check) +version_added: 9.1.0 +description: + - This module is a wrapper for the execution of C(django-admin check). +extends_documentation_fragment: + - community.general.attributes + - community.general.django +options: + database: + description: + - Specify databases to run checks against. + - If not specified, Django will not run database tests. + type: list + elements: str + deploy: + description: + - Include additional checks relevant in a deployment setting. + type: bool + default: false + fail_level: + description: + - Message level that will trigger failure. + - Default is the Django default value. Check the documentation for the version being used. + type: str + choices: [CRITICAL, ERROR, WARNING, INFO, DEBUG] + tags: + description: + - Restrict checks to specific tags. + type: list + elements: str + apps: + description: + - Restrict checks to specific applications. + - Default is to check all applications. + type: list + elements: str +notes: + - The outcome of the module is found in the common return values RV(ignore:stdout), RV(ignore:stderr), RV(ignore:rc). + - The module will fail if RV(ignore:rc) is not zero. +attributes: + check_mode: + support: full + diff_mode: + support: none +""" + +EXAMPLES = """ +- name: Check the entire project + community.general.django_check: + settings: myproject.settings + +- name: Create the project using specific databases + community.general.django_check: + database: + - somedb + - myotherdb + settings: fancysite.settings + pythonpath: /home/joedoe/project/fancysite + venv: /home/joedoe/project/fancysite/venv +""" + +RETURN = """ +run_info: + description: Command-line execution information. + type: dict + returned: success and C(verbosity) >= 3 +""" + +from ansible_collections.community.general.plugins.module_utils.django import DjangoModuleHelper +from ansible_collections.community.general.plugins.module_utils.cmd_runner import cmd_runner_fmt + + +class DjangoCheck(DjangoModuleHelper): + module = dict( + argument_spec=dict( + database=dict(type="list", elements="str"), + deploy=dict(type="bool", default=False), + fail_level=dict(type="str", choices=["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"]), + tags=dict(type="list", elements="str"), + apps=dict(type="list", elements="str"), + ), + supports_check_mode=True, + ) + arg_formats = dict( + database=cmd_runner_fmt.stack(cmd_runner_fmt.as_opt_val)("--database"), + deploy=cmd_runner_fmt.as_bool("--deploy"), + fail_level=cmd_runner_fmt.as_opt_val("--fail-level"), + tags=cmd_runner_fmt.stack(cmd_runner_fmt.as_opt_val)("--tag"), + apps=cmd_runner_fmt.as_list(), + ) + django_admin_cmd = "check" + django_admin_arg_order = "database deploy fail_level tags apps" + + +def main(): + DjangoCheck.execute() + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/community/general/plugins/modules/django_createcachetable.py b/ansible_collections/community/general/plugins/modules/django_createcachetable.py new file mode 100644 index 000000000..b038e0358 --- /dev/null +++ b/ansible_collections/community/general/plugins/modules/django_createcachetable.py @@ -0,0 +1,67 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2024, Alexei Znamensky <russoz@gmail.com> +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = """ +module: django_createcachetable +author: + - Alexei Znamensky (@russoz) +short_description: Wrapper for C(django-admin createcachetable) +version_added: 9.1.0 +description: + - This module is a wrapper for the execution of C(django-admin createcachetable). +extends_documentation_fragment: + - community.general.attributes + - community.general.django + - community.general.django.database +attributes: + check_mode: + support: full + diff_mode: + support: none +""" + +EXAMPLES = """ +- name: Create cache table in the default database + community.general.django_createcachetable: + settings: myproject.settings + +- name: Create cache table in the other database + community.general.django_createcachetable: + database: myotherdb + settings: fancysite.settings + pythonpath: /home/joedoe/project/fancysite + venv: /home/joedoe/project/fancysite/venv +""" + +RETURN = """ +run_info: + description: Command-line execution information. + type: dict + returned: success and O(verbosity) >= 3 +""" + +from ansible_collections.community.general.plugins.module_utils.django import DjangoModuleHelper + + +class DjangoCreateCacheTable(DjangoModuleHelper): + module = dict( + supports_check_mode=True, + ) + django_admin_cmd = "createcachetable" + django_admin_arg_order = "noinput database dry_run" + _django_args = ["noinput", "database", "dry_run"] + _check_mode_arg = "dry_run" + + +def main(): + DjangoCreateCacheTable.execute() + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/community/general/plugins/modules/git_config.py b/ansible_collections/community/general/plugins/modules/git_config.py index a8d2ebe97..95969c1b3 100644 --- a/ansible_collections/community/general/plugins/modules/git_config.py +++ b/ansible_collections/community/general/plugins/modules/git_config.py @@ -18,7 +18,7 @@ author: - Matthew Gamble (@djmattyg007) - Marius Gedminas (@mgedmin) requirements: ['git'] -short_description: Read and write git configuration +short_description: Update git configuration description: - The M(community.general.git_config) module changes git configuration by invoking C(git config). This is needed if you do not want to use M(ansible.builtin.template) for the entire git @@ -36,6 +36,8 @@ options: list_all: description: - List all settings (optionally limited to a given O(scope)). + - This option is B(deprecated) and will be removed from community.general 11.0.0. + Please use M(community.general.git_config_info) instead. type: bool default: false name: @@ -74,6 +76,8 @@ options: description: - When specifying the name of a single setting, supply a value to set that setting to the given value. + - From community.general 11.0.0 on, O(value) will be required if O(state=present). + To read values, use the M(community.general.git_config_info) module instead. type: str add_mode: description: @@ -143,29 +147,6 @@ EXAMPLES = ''' repo: /etc scope: local value: 'root@{{ ansible_fqdn }}' - -- name: Read individual values from git config - community.general.git_config: - name: alias.ci - scope: global - -- name: Scope system is also assumed when reading values, unless list_all=true - community.general.git_config: - name: alias.diffc - -- name: Read all values from git config - community.general.git_config: - list_all: true - scope: global - -- name: When list_all is yes and no scope is specified, you get configuration from all scopes - community.general.git_config: - list_all: true - -- name: Specify a repository to include local settings - community.general.git_config: - list_all: true - repo: /path/to/repo.git ''' RETURN = ''' @@ -193,7 +174,7 @@ from ansible.module_utils.basic import AnsibleModule def main(): module = AnsibleModule( argument_spec=dict( - list_all=dict(required=False, type='bool', default=False), + list_all=dict(required=False, type='bool', default=False, removed_in_version='11.0.0', removed_from_collection='community.general'), name=dict(type='str'), repo=dict(type='path'), file=dict(type='path'), @@ -222,6 +203,14 @@ def main(): new_value = params['value'] or '' add_mode = params['add_mode'] + if not unset and not new_value and not params['list_all']: + module.deprecate( + 'If state=present, a value must be specified from community.general 11.0.0 on.' + ' To read a config value, use the community.general.git_config_info module instead.', + version='11.0.0', + collection_name='community.general', + ) + scope = determine_scope(params) cwd = determine_cwd(scope, params) @@ -263,7 +252,7 @@ def main(): module.exit_json(changed=False, msg='', config_value=old_values[0] if old_values else '') elif unset and not out: module.exit_json(changed=False, msg='no setting to unset') - elif new_value in old_values and (len(old_values) == 1 or add_mode == "add"): + elif new_value in old_values and (len(old_values) == 1 or add_mode == "add") and not unset: module.exit_json(changed=False, msg="") # Until this point, the git config was just read and in case no change is needed, the module has already exited. diff --git a/ansible_collections/community/general/plugins/modules/homectl.py b/ansible_collections/community/general/plugins/modules/homectl.py index ca4c19a87..7751651c8 100644 --- a/ansible_collections/community/general/plugins/modules/homectl.py +++ b/ansible_collections/community/general/plugins/modules/homectl.py @@ -17,6 +17,12 @@ short_description: Manage user accounts with systemd-homed version_added: 4.4.0 description: - Manages a user's home directory managed by systemd-homed. +notes: + - This module does B(not) work with Python 3.13 or newer. It uses the deprecated L(crypt Python module, + https://docs.python.org/3.12/library/crypt.html) from the Python standard library, which was removed + from Python 3.13. +requirements: + - Python 3.12 or earlier extends_documentation_fragment: - community.general.attributes attributes: @@ -263,12 +269,21 @@ data: } ''' -import crypt import json -from ansible.module_utils.basic import AnsibleModule +import traceback +from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.basic import jsonify from ansible.module_utils.common.text.formatters import human_to_bytes +try: + import crypt +except ImportError: + HAS_CRYPT = False + CRYPT_IMPORT_ERROR = traceback.format_exc() +else: + HAS_CRYPT = True + CRYPT_IMPORT_ERROR = None + class Homectl(object): '''#TODO DOC STRINGS''' @@ -591,6 +606,12 @@ def main(): ] ) + if not HAS_CRYPT: + module.fail_json( + msg=missing_required_lib('crypt (part of Python 3.13 standard library)'), + exception=CRYPT_IMPORT_ERROR, + ) + homectl = Homectl(module) homectl.result['state'] = homectl.state diff --git a/ansible_collections/community/general/plugins/modules/ipa_dnsrecord.py b/ansible_collections/community/general/plugins/modules/ipa_dnsrecord.py index cb4ce03dd..59475a55b 100644 --- a/ansible_collections/community/general/plugins/modules/ipa_dnsrecord.py +++ b/ansible_collections/community/general/plugins/modules/ipa_dnsrecord.py @@ -35,13 +35,14 @@ options: record_type: description: - The type of DNS record name. - - Currently, 'A', 'AAAA', 'A6', 'CNAME', 'DNAME', 'NS', 'PTR', 'TXT', 'SRV' and 'MX' are supported. + - Currently, 'A', 'AAAA', 'A6', 'CNAME', 'DNAME', 'NS', 'PTR', 'TXT', 'SRV', 'MX' and 'SSHFP' are supported. - "'A6', 'CNAME', 'DNAME' and 'TXT' are added in version 2.5." - "'SRV' and 'MX' are added in version 2.8." - "'NS' are added in comunity.general 8.2.0." + - "'SSHFP' are added in community.general 9.1.0." required: false default: 'A' - choices: ['A', 'AAAA', 'A6', 'CNAME', 'DNAME', 'MX', 'NS', 'PTR', 'SRV', 'TXT'] + choices: ['A', 'AAAA', 'A6', 'CNAME', 'DNAME', 'MX', 'NS', 'PTR', 'SRV', 'TXT', 'SSHFP'] type: str record_value: description: @@ -57,6 +58,7 @@ options: - In the case of 'TXT' record type, this will be a text. - In the case of 'SRV' record type, this will be a service record. - In the case of 'MX' record type, this will be a mail exchanger record. + - In the case of 'SSHFP' record type, this will be an SSH fingerprint record. type: str record_values: description: @@ -71,6 +73,7 @@ options: - In the case of 'TXT' record type, this will be a text. - In the case of 'SRV' record type, this will be a service record. - In the case of 'MX' record type, this will be a mail exchanger record. + - In the case of 'SSHFP' record type, this will be an SSH fingerprint record. type: list elements: str record_ttl: @@ -175,6 +178,20 @@ EXAMPLES = r''' ipa_host: ipa.example.com ipa_user: admin ipa_pass: ChangeMe! + +- name: Retrieve the current sshfp fingerprints + ansible.builtin.command: ssh-keyscan -D localhost + register: ssh_hostkeys + +- name: Update the SSHFP records in DNS + community.general.ipa_dnsrecord: + name: "{{ inventory_hostname}}" + zone_name: example.com + record_type: 'SSHFP' + record_values: "{{ ssh_hostkeys.stdout.split('\n') | map('split', 'SSHFP ') | map('last') | list }}" + ipa_host: ipa.example.com + ipa_user: admin + ipa_pass: ChangeMe! ''' RETURN = r''' @@ -228,6 +245,8 @@ class DNSRecordIPAClient(IPAClient): item.update(srvrecord=value) elif details['record_type'] == 'MX': item.update(mxrecord=value) + elif details['record_type'] == 'SSHFP': + item.update(sshfprecord=value) self._post_json(method='dnsrecord_add', name=zone_name, item=item) @@ -266,6 +285,8 @@ def get_dnsrecord_dict(details=None): module_dnsrecord.update(srvrecord=details['record_values']) elif details['record_type'] == 'MX' and details['record_values']: module_dnsrecord.update(mxrecord=details['record_values']) + elif details['record_type'] == 'SSHFP' and details['record_values']: + module_dnsrecord.update(sshfprecord=details['record_values']) if details.get('record_ttl'): module_dnsrecord.update(dnsttl=details['record_ttl']) @@ -328,7 +349,7 @@ def ensure(module, client): def main(): - record_types = ['A', 'AAAA', 'A6', 'CNAME', 'DNAME', 'NS', 'PTR', 'TXT', 'SRV', 'MX'] + record_types = ['A', 'AAAA', 'A6', 'CNAME', 'DNAME', 'NS', 'PTR', 'TXT', 'SRV', 'MX', 'SSHFP'] argument_spec = ipa_argument_spec() argument_spec.update( zone_name=dict(type='str', required=True), diff --git a/ansible_collections/community/general/plugins/modules/keycloak_client.py b/ansible_collections/community/general/plugins/modules/keycloak_client.py index 3628e5a51..efaa66e26 100644 --- a/ansible_collections/community/general/plugins/modules/keycloak_client.py +++ b/ansible_collections/community/general/plugins/modules/keycloak_client.py @@ -340,6 +340,42 @@ options: description: - Override realm authentication flow bindings. type: dict + suboptions: + browser: + description: + - Flow ID of the browser authentication flow. + - O(authentication_flow_binding_overrides.browser) + and O(authentication_flow_binding_overrides.browser_name) are mutually exclusive. + type: str + + browser_name: + description: + - Flow name of the browser authentication flow. + - O(authentication_flow_binding_overrides.browser) + and O(authentication_flow_binding_overrides.browser_name) are mutually exclusive. + aliases: + - browserName + type: str + version_added: 9.1.0 + + direct_grant: + description: + - Flow ID of the direct grant authentication flow. + - O(authentication_flow_binding_overrides.direct_grant) + and O(authentication_flow_binding_overrides.direct_grant_name) are mutually exclusive. + aliases: + - directGrant + type: str + + direct_grant_name: + description: + - Flow name of the direct grant authentication flow. + - O(authentication_flow_binding_overrides.direct_grant) + and O(authentication_flow_binding_overrides.direct_grant_name) are mutually exclusive. + aliases: + - directGrantName + type: str + version_added: 9.1.0 aliases: - authenticationFlowBindingOverrides version_added: 3.4.0 @@ -781,6 +817,64 @@ def sanitize_cr(clientrep): return normalise_cr(result) +def get_authentication_flow_id(flow_name, realm, kc): + """ Get the authentication flow ID based on the flow name, realm, and Keycloak client. + + Args: + flow_name (str): The name of the authentication flow. + realm (str): The name of the realm. + kc (KeycloakClient): The Keycloak client instance. + + Returns: + str: The ID of the authentication flow. + + Raises: + KeycloakAPIException: If the authentication flow with the given name is not found in the realm. + """ + flow = kc.get_authentication_flow_by_alias(flow_name, realm) + if flow: + return flow["id"] + kc.module.fail_json(msg='Authentification flow %s not found in realm %s' % (flow_name, realm)) + + +def flow_binding_from_dict_to_model(newClientFlowBinding, realm, kc): + """ Convert a dictionary representing client flow bindings to a model representation. + + Args: + newClientFlowBinding (dict): A dictionary containing client flow bindings. + realm (str): The name of the realm. + kc (KeycloakClient): An instance of the KeycloakClient class. + + Returns: + dict: A dictionary representing the model flow bindings. The dictionary has two keys: + - "browser" (str or None): The ID of the browser authentication flow binding, or None if not provided. + - "direct_grant" (str or None): The ID of the direct grant authentication flow binding, or None if not provided. + + Raises: + KeycloakAPIException: If the authentication flow with the given name is not found in the realm. + + """ + + modelFlow = { + "browser": None, + "direct_grant": None + } + + for k, v in newClientFlowBinding.items(): + if not v: + continue + if k == "browser": + modelFlow["browser"] = v + elif k == "browser_name": + modelFlow["browser"] = get_authentication_flow_id(v, realm, kc) + elif k == "direct_grant": + modelFlow["direct_grant"] = v + elif k == "direct_grant_name": + modelFlow["direct_grant"] = get_authentication_flow_id(v, realm, kc) + + return modelFlow + + def main(): """ Module execution @@ -799,6 +893,13 @@ def main(): config=dict(type='dict'), ) + authentication_flow_spec = dict( + browser=dict(type='str'), + browser_name=dict(type='str', aliases=['browserName']), + direct_grant=dict(type='str', aliases=['directGrant']), + direct_grant_name=dict(type='str', aliases=['directGrantName']), + ) + meta_args = dict( state=dict(default='present', choices=['present', 'absent']), realm=dict(type='str', default='master'), @@ -838,7 +939,13 @@ def main(): use_template_scope=dict(type='bool', aliases=['useTemplateScope']), use_template_mappers=dict(type='bool', aliases=['useTemplateMappers']), always_display_in_console=dict(type='bool', aliases=['alwaysDisplayInConsole']), - authentication_flow_binding_overrides=dict(type='dict', aliases=['authenticationFlowBindingOverrides']), + authentication_flow_binding_overrides=dict( + type='dict', + aliases=['authenticationFlowBindingOverrides'], + options=authentication_flow_spec, + required_one_of=[['browser', 'direct_grant', 'browser_name', 'direct_grant_name']], + mutually_exclusive=[['browser', 'browser_name'], ['direct_grant', 'direct_grant_name']], + ), protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec, aliases=['protocolMappers']), authorization_settings=dict(type='dict', aliases=['authorizationSettings']), default_client_scopes=dict(type='list', elements='str', aliases=['defaultClientScopes']), @@ -900,6 +1007,8 @@ def main(): # they are not specified if client_param == 'protocol_mappers': new_param_value = [dict((k, v) for k, v in x.items() if x[k] is not None) for x in new_param_value] + elif client_param == 'authentication_flow_binding_overrides': + new_param_value = flow_binding_from_dict_to_model(new_param_value, realm, kc) changeset[camel(client_param)] = new_param_value diff --git a/ansible_collections/community/general/plugins/modules/keycloak_clientscope.py b/ansible_collections/community/general/plugins/modules/keycloak_clientscope.py index d24e0f1f2..b962b932c 100644 --- a/ansible_collections/community/general/plugins/modules/keycloak_clientscope.py +++ b/ansible_collections/community/general/plugins/modules/keycloak_clientscope.py @@ -301,10 +301,37 @@ end_state: ''' from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \ - keycloak_argument_spec, get_token, KeycloakError + keycloak_argument_spec, get_token, KeycloakError, is_struct_included from ansible.module_utils.basic import AnsibleModule +def normalise_cr(clientscoperep, remove_ids=False): + """ Re-sorts any properties where the order so that diff's is minimised, and adds default values where appropriate so that the + the change detection is more effective. + + :param clientscoperep: the clientscoperep dict to be sanitized + :param remove_ids: If set to true, then the unique ID's of objects is removed to make the diff and checks for changed + not alert when the ID's of objects are not usually known, (e.g. for protocol_mappers) + :return: normalised clientscoperep dict + """ + # Avoid the dict passed in to be modified + clientscoperep = clientscoperep.copy() + + if 'attributes' in clientscoperep: + clientscoperep['attributes'] = list(sorted(clientscoperep['attributes'])) + + if 'protocolMappers' in clientscoperep: + clientscoperep['protocolMappers'] = sorted(clientscoperep['protocolMappers'], key=lambda x: (x.get('name'), x.get('protocol'), x.get('protocolMapper'))) + for mapper in clientscoperep['protocolMappers']: + if remove_ids: + mapper.pop('id', None) + + # Set to a default value. + mapper['consentRequired'] = mapper.get('consentRequired', False) + + return clientscoperep + + def sanitize_cr(clientscoperep): """ Removes probably sensitive details from a clientscoperep representation. @@ -317,7 +344,7 @@ def sanitize_cr(clientscoperep): if 'attributes' in result: if 'saml.signing.private.key' in result['attributes']: result['attributes']['saml.signing.private.key'] = 'no_log' - return result + return normalise_cr(result) def main(): @@ -458,6 +485,13 @@ def main(): result['diff'] = dict(before=sanitize_cr(before_clientscope), after=sanitize_cr(desired_clientscope)) if module.check_mode: + # We can only compare the current clientscope with the proposed updates we have + before_norm = normalise_cr(before_clientscope, remove_ids=True) + desired_norm = normalise_cr(desired_clientscope, remove_ids=True) + if module._diff: + result['diff'] = dict(before=sanitize_cr(before_norm), + after=sanitize_cr(desired_norm)) + result['changed'] = not is_struct_included(desired_norm, before_norm) module.exit_json(**result) # do the update diff --git a/ansible_collections/community/general/plugins/modules/launchd.py b/ansible_collections/community/general/plugins/modules/launchd.py index e5942ea7c..a6427bdb2 100644 --- a/ansible_collections/community/general/plugins/modules/launchd.py +++ b/ansible_collections/community/general/plugins/modules/launchd.py @@ -514,7 +514,8 @@ def main(): result['status']['current_pid'] != result['status']['previous_pid']): result['changed'] = True if module.check_mode: - result['changed'] = True + if result['status']['current_state'] != action: + result['changed'] = True module.exit_json(**result) diff --git a/ansible_collections/community/general/plugins/modules/openbsd_pkg.py b/ansible_collections/community/general/plugins/modules/openbsd_pkg.py index c83113611..69ac7bff8 100644 --- a/ansible_collections/community/general/plugins/modules/openbsd_pkg.py +++ b/ansible_collections/community/general/plugins/modules/openbsd_pkg.py @@ -24,7 +24,10 @@ attributes: check_mode: support: full diff_mode: - support: none + support: partial + version_added: 9.1.0 + details: + - Only works when check mode is not enabled. options: name: description: @@ -159,6 +162,20 @@ def execute_command(cmd, module): return module.run_command(cmd_args, environ_update={'TERM': 'dumb'}) +def get_all_installed(module): + """ + Get all installed packaged. Used to support diff mode + """ + command = 'pkg_info -Iq' + + rc, stdout, stderr = execute_command(command, module) + + if stderr: + module.fail_json(msg="failed in get_all_installed(): %s" % stderr) + + return stdout + + # Function used to find out if a package is currently installed. def get_package_state(names, pkg_spec, module): info_cmd = 'pkg_info -Iq' @@ -573,10 +590,13 @@ def main(): result['name'] = name result['state'] = state result['build'] = build + result['diff'] = {} # The data structure used to keep track of package information. pkg_spec = {} + new_package_list = original_package_list = get_all_installed(module) + if build is True: if not os.path.isdir(ports_dir): module.fail_json(msg="the ports source directory %s does not exist" % (ports_dir)) @@ -661,6 +681,10 @@ def main(): result['changed'] = combined_changed + if result['changed'] and not module.check_mode: + new_package_list = get_all_installed(module) + result['diff'] = dict(before=original_package_list, after=new_package_list) + module.exit_json(**result) diff --git a/ansible_collections/community/general/plugins/modules/pacman.py b/ansible_collections/community/general/plugins/modules/pacman.py index 7f67b9103..f13bde317 100644 --- a/ansible_collections/community/general/plugins/modules/pacman.py +++ b/ansible_collections/community/general/plugins/modules/pacman.py @@ -367,8 +367,9 @@ class Pacman(object): self.install_packages(pkgs) self.success() - # This shouldn't happen... - self.fail("This is a bug") + # This happens if an empty list has been provided for name + self.add_exit_infos(msg='Nothing to do') + self.success() def install_packages(self, pkgs): pkgs_to_install = [] diff --git a/ansible_collections/community/general/plugins/modules/proxmox_kvm.py b/ansible_collections/community/general/plugins/modules/proxmox_kvm.py index 9fe805c7a..71cbb51fc 100644 --- a/ansible_collections/community/general/plugins/modules/proxmox_kvm.py +++ b/ansible_collections/community/general/plugins/modules/proxmox_kvm.py @@ -174,6 +174,7 @@ options: - Allow to force stop VM. - Can be used with states V(stopped), V(restarted), and V(absent). - This option has no default unless O(proxmox_default_behavior) is set to V(compatibility); then the default is V(false). + - Requires parameter O(archive). type: bool format: description: diff --git a/ansible_collections/community/general/plugins/modules/proxmox_vm_info.py b/ansible_collections/community/general/plugins/modules/proxmox_vm_info.py index 39d8307a4..e10b9dff6 100644 --- a/ansible_collections/community/general/plugins/modules/proxmox_vm_info.py +++ b/ansible_collections/community/general/plugins/modules/proxmox_vm_info.py @@ -57,6 +57,13 @@ options: - pending default: none version_added: 8.1.0 + network: + description: + - Whether to retrieve the current network status. + - Requires enabled/running qemu-guest-agent on qemu VMs. + type: bool + default: false + version_added: 9.1.0 extends_documentation_fragment: - community.general.proxmox.actiongroup_proxmox - community.general.proxmox.documentation @@ -172,7 +179,7 @@ class ProxmoxVmInfoAnsible(ProxmoxAnsible): msg="Failed to retrieve VMs information from cluster resources: %s" % e ) - def get_vms_from_nodes(self, cluster_machines, type, vmid=None, name=None, node=None, config=None): + def get_vms_from_nodes(self, cluster_machines, type, vmid=None, name=None, node=None, config=None, network=False): # Leave in dict only machines that user wants to know about filtered_vms = { vm: info for vm, info in cluster_machines.items() if not ( @@ -201,17 +208,23 @@ class ProxmoxVmInfoAnsible(ProxmoxAnsible): config_type = 0 if config == "pending" else 1 # GET /nodes/{node}/qemu/{vmid}/config current=[0/1] desired_vm["config"] = call_vm_getter(this_vm_id).config().get(current=config_type) + if network: + if type == "qemu": + desired_vm["network"] = call_vm_getter(this_vm_id).agent("network-get-interfaces").get()['result'] + elif type == "lxc": + desired_vm["network"] = call_vm_getter(this_vm_id).interfaces.get() + return filtered_vms - def get_qemu_vms(self, cluster_machines, vmid=None, name=None, node=None, config=None): + def get_qemu_vms(self, cluster_machines, vmid=None, name=None, node=None, config=None, network=False): try: - return self.get_vms_from_nodes(cluster_machines, "qemu", vmid, name, node, config) + return self.get_vms_from_nodes(cluster_machines, "qemu", vmid, name, node, config, network) except Exception as e: self.module.fail_json(msg="Failed to retrieve QEMU VMs information: %s" % e) - def get_lxc_vms(self, cluster_machines, vmid=None, name=None, node=None, config=None): + def get_lxc_vms(self, cluster_machines, vmid=None, name=None, node=None, config=None, network=False): try: - return self.get_vms_from_nodes(cluster_machines, "lxc", vmid, name, node, config) + return self.get_vms_from_nodes(cluster_machines, "lxc", vmid, name, node, config, network) except Exception as e: self.module.fail_json(msg="Failed to retrieve LXC VMs information: %s" % e) @@ -229,6 +242,7 @@ def main(): type="str", choices=["none", "current", "pending"], default="none", required=False ), + network=dict(type="bool", default=False, required=False), ) module_args.update(vm_info_args) @@ -245,6 +259,7 @@ def main(): vmid = module.params["vmid"] name = module.params["name"] config = module.params["config"] + network = module.params["network"] result = dict(changed=False) @@ -256,12 +271,12 @@ def main(): vms = {} if type == "lxc": - vms = proxmox.get_lxc_vms(cluster_machines, vmid, name, node, config) + vms = proxmox.get_lxc_vms(cluster_machines, vmid, name, node, config, network) elif type == "qemu": - vms = proxmox.get_qemu_vms(cluster_machines, vmid, name, node, config) + vms = proxmox.get_qemu_vms(cluster_machines, vmid, name, node, config, network) else: - vms = proxmox.get_qemu_vms(cluster_machines, vmid, name, node, config) - vms.update(proxmox.get_lxc_vms(cluster_machines, vmid, name, node, config)) + vms = proxmox.get_qemu_vms(cluster_machines, vmid, name, node, config, network) + vms.update(proxmox.get_lxc_vms(cluster_machines, vmid, name, node, config, network)) result["proxmox_vms"] = [info for vm, info in sorted(vms.items())] module.exit_json(**result) diff --git a/ansible_collections/community/general/plugins/modules/redfish_command.py b/ansible_collections/community/general/plugins/modules/redfish_command.py index d351e7c1d..0f7a64b81 100644 --- a/ansible_collections/community/general/plugins/modules/redfish_command.py +++ b/ansible_collections/community/general/plugins/modules/redfish_command.py @@ -288,6 +288,20 @@ options: type: str choices: [ ResetAll, PreserveNetworkAndUsers, PreserveNetwork ] version_added: 8.6.0 + wait: + required: false + description: + - Block until the service is ready again. + type: bool + default: false + version_added: 9.1.0 + wait_timeout: + required: false + description: + - How long to block until the service is ready again before giving up. + type: int + default: 120 + version_added: 9.1.0 author: - "Jose Delarosa (@jose-delarosa)" @@ -685,6 +699,16 @@ EXAMPLES = ''' username: "{{ username }}" password: "{{ password }}" + - name: Restart manager power gracefully and wait for it to be available + community.general.redfish_command: + category: Manager + command: GracefulRestart + resource_id: BMC + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + wait: True + - name: Restart manager power gracefully community.general.redfish_command: category: Manager @@ -841,7 +865,9 @@ def main(): ), strip_etag_quotes=dict(type='bool', default=False), reset_to_defaults_mode=dict(choices=['ResetAll', 'PreserveNetworkAndUsers', 'PreserveNetwork']), - bios_attributes=dict(type="dict") + bios_attributes=dict(type="dict"), + wait=dict(type='bool', default=False), + wait_timeout=dict(type='int', default=120), ), required_together=[ ('username', 'password'), @@ -1016,7 +1042,7 @@ def main(): command = 'PowerGracefulRestart' if command.startswith('Power'): - result = rf_utils.manage_manager_power(command) + result = rf_utils.manage_manager_power(command, module.params['wait'], module.params['wait_timeout']) elif command == 'ClearLogs': result = rf_utils.clear_logs() elif command == 'VirtualMediaInsert': diff --git a/ansible_collections/community/general/plugins/modules/redfish_info.py b/ansible_collections/community/general/plugins/modules/redfish_info.py index 3b594b7a2..efcb34f01 100644 --- a/ansible_collections/community/general/plugins/modules/redfish_info.py +++ b/ansible_collections/community/general/plugins/modules/redfish_info.py @@ -359,6 +359,16 @@ EXAMPLES = ''' baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" + + - name: Check the availability of the service with a timeout of 5 seconds + community.general.redfish_info: + category: Service + command: CheckAvailability + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + timeout: 5 + register: result ''' RETURN = ''' @@ -385,6 +395,7 @@ CATEGORY_COMMANDS_ALL = { "GetUpdateStatus"], "Manager": ["GetManagerNicInventory", "GetVirtualMedia", "GetLogs", "GetNetworkProtocols", "GetHealthReport", "GetHostInterfaces", "GetManagerInventory", "GetServiceIdentification"], + "Service": ["CheckAvailability"], } CATEGORY_COMMANDS_DEFAULT = { @@ -393,7 +404,8 @@ CATEGORY_COMMANDS_DEFAULT = { "Accounts": "ListUsers", "Update": "GetFirmwareInventory", "Sessions": "GetSessions", - "Manager": "GetManagerNicInventory" + "Manager": "GetManagerNicInventory", + "Service": "CheckAvailability", } @@ -473,7 +485,13 @@ def main(): module.fail_json(msg="Invalid Category: %s" % category) # Organize by Categories / Commands - if category == "Systems": + if category == "Service": + # service-level commands are always available + for command in command_list: + if command == "CheckAvailability": + result["service"] = rf_utils.check_service_availability() + + elif category == "Systems": # execute only if we find a Systems resource resource = rf_utils._find_systems_resource() if resource['ret'] is False: diff --git a/ansible_collections/community/general/plugins/modules/redis_info.py b/ansible_collections/community/general/plugins/modules/redis_info.py index f352d53d7..c75abcf21 100644 --- a/ansible_collections/community/general/plugins/modules/redis_info.py +++ b/ansible_collections/community/general/plugins/modules/redis_info.py @@ -30,6 +30,11 @@ options: version_added: 7.5.0 ca_certs: version_added: 7.5.0 + cluster: + default: false + description: Get informations about cluster status as RV(cluster). + type: bool + version_added: 9.1.0 seealso: - module: community.general.redis author: "Pavlo Bashynskyi (@levonet)" @@ -43,6 +48,15 @@ EXAMPLES = r''' - name: Print server information ansible.builtin.debug: var: result.info + +- name: Get server cluster information + community.general.redis_info: + cluster: true + register: result + +- name: Print server cluster information + ansible.builtin.debug: + var: result.cluster_info ''' RETURN = r''' @@ -178,6 +192,25 @@ info: "used_memory_scripts_human": "0B", "used_memory_startup": 791264 } +cluster: + description: The default set of cluster information sections U(https://redis.io/commands/cluster-info). + returned: success if O(cluster=true) + version_added: 9.1.0 + type: dict + sample: { + "cluster_state": ok, + "cluster_slots_assigned": 16384, + "cluster_slots_ok": 16384, + "cluster_slots_pfail": 0, + "cluster_slots_fail": 0, + "cluster_known_nodes": 6, + "cluster_size": 3, + "cluster_current_epoch": 6, + "cluster_my_epoch": 2, + "cluster_stats_messages_sent": 1483972, + "cluster_stats_messages_received": 1483968, + "total_cluster_links_buffer_limit_exceeded": 0 + } ''' import traceback @@ -202,14 +235,19 @@ def redis_client(**client_params): # Module execution. def main(): + module_args = dict( + cluster=dict(type='bool', default=False), + ) + module_args.update(redis_auth_argument_spec(tls_default=False)) module = AnsibleModule( - argument_spec=redis_auth_argument_spec(tls_default=False), + argument_spec=module_args, supports_check_mode=True, ) fail_imports(module, module.params['tls']) redis_params = redis_auth_params(module) + cluster = module.params['cluster'] # Connect and check client = redis_client(**redis_params) @@ -219,7 +257,13 @@ def main(): module.fail_json(msg="unable to connect to database: %s" % to_native(e), exception=traceback.format_exc()) info = client.info() - module.exit_json(changed=False, info=info) + + result = dict(changed=False, info=info) + + if cluster: + result['cluster_info'] = client.execute_command('CLUSTER INFO') + + module.exit_json(**result) if __name__ == '__main__': diff --git a/ansible_collections/community/general/plugins/modules/udm_user.py b/ansible_collections/community/general/plugins/modules/udm_user.py index dcbf0ec85..5a2e09049 100644 --- a/ansible_collections/community/general/plugins/modules/udm_user.py +++ b/ansible_collections/community/general/plugins/modules/udm_user.py @@ -20,6 +20,12 @@ description: - "This module allows to manage posix users on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it." +notes: + - This module does B(not) work with Python 3.13 or newer. It uses the deprecated L(crypt Python module, + https://docs.python.org/3.12/library/crypt.html) from the Python standard library, which was removed + from Python 3.13. +requirements: + - Python 3.12 or earlier extends_documentation_fragment: - community.general.attributes attributes: @@ -324,10 +330,10 @@ EXAMPLES = ''' RETURN = '''# ''' -import crypt from datetime import date, timedelta +import traceback -from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible_collections.community.general.plugins.module_utils.univention_umc import ( umc_module_for_add, umc_module_for_edit, @@ -335,6 +341,15 @@ from ansible_collections.community.general.plugins.module_utils.univention_umc i base_dn, ) +try: + import crypt +except ImportError: + HAS_CRYPT = False + CRYPT_IMPORT_ERROR = traceback.format_exc() +else: + HAS_CRYPT = True + CRYPT_IMPORT_ERROR = None + def main(): expiry = date.strftime(date.today() + timedelta(days=365), "%Y-%m-%d") @@ -451,6 +466,13 @@ def main(): ('state', 'present', ['firstname', 'lastname', 'password']) ]) ) + + if not HAS_CRYPT: + module.fail_json( + msg=missing_required_lib('crypt (part of Python 3.13 standard library)'), + exception=CRYPT_IMPORT_ERROR, + ) + username = module.params['username'] position = module.params['position'] ou = module.params['ou'] diff --git a/ansible_collections/community/general/plugins/plugin_utils/keys_filter.py b/ansible_collections/community/general/plugins/plugin_utils/keys_filter.py new file mode 100644 index 000000000..94234a15d --- /dev/null +++ b/ansible_collections/community/general/plugins/plugin_utils/keys_filter.py @@ -0,0 +1,141 @@ +# Copyright (c) 2024 Vladimir Botka <vbotka@gmail.com> +# 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 + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import re + +from ansible.errors import AnsibleFilterError +from ansible.module_utils.six import string_types +from ansible.module_utils.common._collections_compat import Mapping, Sequence + + +def _keys_filter_params(data, matching_parameter): + """test parameters: + * data must be a list of dictionaries. All keys must be strings. + * matching_parameter is member of a list. + """ + + mp = matching_parameter + ml = ['equal', 'starts_with', 'ends_with', 'regex'] + + if not isinstance(data, Sequence): + msg = "First argument must be a list. %s is %s" + raise AnsibleFilterError(msg % (data, type(data))) + + for elem in data: + if not isinstance(elem, Mapping): + msg = "The data items must be dictionaries. %s is %s" + raise AnsibleFilterError(msg % (elem, type(elem))) + + for elem in data: + if not all(isinstance(item, string_types) for item in elem.keys()): + msg = "Top level keys must be strings. keys: %s" + raise AnsibleFilterError(msg % elem.keys()) + + if mp not in ml: + msg = "The matching_parameter must be one of %s. matching_parameter=%s" + raise AnsibleFilterError(msg % (ml, mp)) + + return + + +def _keys_filter_target_str(target, matching_parameter): + """ + Test: + * target is a non-empty string or list. + * If target is list all items are strings. + * target is a string or list with single string if matching_parameter=regex. + Convert target and return: + * tuple of unique target items, or + * tuple with single item, or + * compiled regex if matching_parameter=regex. + """ + + if not isinstance(target, Sequence): + msg = "The target must be a string or a list. target is %s." + raise AnsibleFilterError(msg % type(target)) + + if len(target) == 0: + msg = "The target can't be empty." + raise AnsibleFilterError(msg) + + if isinstance(target, list): + for elem in target: + if not isinstance(elem, string_types): + msg = "The target items must be strings. %s is %s" + raise AnsibleFilterError(msg % (elem, type(elem))) + + if matching_parameter == 'regex': + if isinstance(target, string_types): + r = target + else: + if len(target) > 1: + msg = "Single item is required in the target list if matching_parameter=regex." + raise AnsibleFilterError(msg) + else: + r = target[0] + try: + tt = re.compile(r) + except re.error: + msg = "The target must be a valid regex if matching_parameter=regex. target is %s" + raise AnsibleFilterError(msg % r) + elif isinstance(target, string_types): + tt = (target, ) + else: + tt = tuple(set(target)) + + return tt + + +def _keys_filter_target_dict(target, matching_parameter): + """ + Test: + * target is a list of dictionaries with attributes 'after' and 'before'. + * Attributes 'before' must be valid regex if matching_parameter=regex. + * Otherwise, the attributes 'before' must be strings. + Convert target and return: + * iterator that aggregates attributes 'before' and 'after', or + * iterator that aggregates compiled regex of attributes 'before' and 'after' if matching_parameter=regex. + """ + + if not isinstance(target, list): + msg = "The target must be a list. target is %s." + raise AnsibleFilterError(msg % (target, type(target))) + + if len(target) == 0: + msg = "The target can't be empty." + raise AnsibleFilterError(msg) + + for elem in target: + if not isinstance(elem, Mapping): + msg = "The target items must be dictionaries. %s is %s" + raise AnsibleFilterError(msg % (elem, type(elem))) + if not all(k in elem for k in ('before', 'after')): + msg = "All dictionaries in target must include attributes: after, before." + raise AnsibleFilterError(msg) + if not isinstance(elem['before'], string_types): + msg = "The attributes before must be strings. %s is %s" + raise AnsibleFilterError(msg % (elem['before'], type(elem['before']))) + if not isinstance(elem['after'], string_types): + msg = "The attributes after must be strings. %s is %s" + raise AnsibleFilterError(msg % (elem['after'], type(elem['after']))) + + before = [d['before'] for d in target] + after = [d['after'] for d in target] + + if matching_parameter == 'regex': + try: + tr = map(re.compile, before) + tz = list(zip(tr, after)) + except re.error: + msg = ("The attributes before must be valid regex if matching_parameter=regex." + " Not all items are valid regex in: %s") + raise AnsibleFilterError(msg % before) + else: + tz = list(zip(before, after)) + + return tz diff --git a/ansible_collections/community/general/tests/integration/targets/ansible_galaxy_install/tasks/main.yml b/ansible_collections/community/general/tests/integration/targets/ansible_galaxy_install/tasks/main.yml index 1ecd9980d..5c4af6d16 100644 --- a/ansible_collections/community/general/tests/integration/targets/ansible_galaxy_install/tasks/main.yml +++ b/ansible_collections/community/general/tests/integration/targets/ansible_galaxy_install/tasks/main.yml @@ -4,10 +4,16 @@ # SPDX-License-Identifier: GPL-3.0-or-later ################################################### +- name: Make directory install_c + ansible.builtin.file: + path: "{{ remote_tmp_dir }}/install_c" + state: directory + - name: Install collection netbox.netbox community.general.ansible_galaxy_install: type: collection name: netbox.netbox + dest: "{{ remote_tmp_dir }}/install_c" register: install_c0 - name: Assert collection netbox.netbox was installed @@ -20,6 +26,7 @@ community.general.ansible_galaxy_install: type: collection name: netbox.netbox + dest: "{{ remote_tmp_dir }}/install_c" register: install_c1 - name: Assert collection was not installed @@ -28,10 +35,16 @@ - install_c1 is not changed ################################################### +- name: Make directory install_r + ansible.builtin.file: + path: "{{ remote_tmp_dir }}/install_r" + state: directory + - name: Install role ansistrano.deploy community.general.ansible_galaxy_install: type: role name: ansistrano.deploy + dest: "{{ remote_tmp_dir }}/install_r" register: install_r0 - name: Assert collection ansistrano.deploy was installed @@ -44,6 +57,7 @@ community.general.ansible_galaxy_install: type: role name: ansistrano.deploy + dest: "{{ remote_tmp_dir }}/install_r" register: install_r1 - name: Assert role was not installed @@ -86,3 +100,44 @@ assert: that: - install_rq1 is not changed + +################################################### +- name: Make directory upgrade_c + ansible.builtin.file: + path: "{{ remote_tmp_dir }}/upgrade_c" + state: directory + +- name: Install collection netbox.netbox 3.17.0 + community.general.ansible_galaxy_install: + type: collection + name: netbox.netbox:3.17.0 + dest: "{{ remote_tmp_dir }}/upgrade_c" + register: upgrade_c0 + +- name: Assert collection netbox.netbox was installed + assert: + that: + - upgrade_c0 is changed + - '"netbox.netbox" in upgrade_c0.new_collections' + +- name: Upgrade collection netbox.netbox + community.general.ansible_galaxy_install: + state: latest + type: collection + name: netbox.netbox + dest: "{{ remote_tmp_dir }}/upgrade_c" + register: upgrade_c1 + +- name: Upgrade collection netbox.netbox (again) + community.general.ansible_galaxy_install: + state: latest + type: collection + name: netbox.netbox + dest: "{{ remote_tmp_dir }}/upgrade_c" + register: upgrade_c2 + +- name: Assert collection was not installed + assert: + that: + - upgrade_c1 is changed + - upgrade_c2 is not changed diff --git a/ansible_collections/community/general/tests/integration/targets/cargo/tasks/main.yml b/ansible_collections/community/general/tests/integration/targets/cargo/tasks/main.yml index 29f27c3fd..89f13960a 100644 --- a/ansible_collections/community/general/tests/integration/targets/cargo/tasks/main.yml +++ b/ansible_collections/community/general/tests/integration/targets/cargo/tasks/main.yml @@ -16,6 +16,7 @@ - block: - import_tasks: test_general.yml - import_tasks: test_version.yml + - import_tasks: test_directory.yml environment: "{{ cargo_environment }}" when: has_cargo | default(false) - import_tasks: test_rustup_cargo.yml diff --git a/ansible_collections/community/general/tests/integration/targets/cargo/tasks/test_directory.yml b/ansible_collections/community/general/tests/integration/targets/cargo/tasks/test_directory.yml new file mode 100644 index 000000000..f4275ede6 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/cargo/tasks/test_directory.yml @@ -0,0 +1,122 @@ +--- +# Copyright (c) 2024 Colin Nolan <cn580@alumni.york.ac.uk> +# 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: Create temp directory + tempfile: + state: directory + register: temp_directory + +- name: Test block + vars: + manifest_path: "{{ temp_directory.path }}/Cargo.toml" + package_name: hello-world-directory-test + block: + - name: Initialize package + ansible.builtin.command: + cmd: "cargo init --name {{ package_name }}" + args: + chdir: "{{ temp_directory.path }}" + + - name: Set package version (1.0.0) + ansible.builtin.lineinfile: + path: "{{ manifest_path }}" + regexp: '^version = ".*"$' + line: 'version = "1.0.0"' + + - name: Ensure package is uninstalled + community.general.cargo: + name: "{{ package_name }}" + state: absent + directory: "{{ temp_directory.path }}" + register: uninstall_absent + + - name: Install package + community.general.cargo: + name: "{{ package_name }}" + directory: "{{ temp_directory.path }}" + register: install_absent + + - name: Change package version (1.0.1) + ansible.builtin.lineinfile: + path: "{{ manifest_path }}" + regexp: '^version = ".*"$' + line: 'version = "1.0.1"' + + - name: Install package again (present) + community.general.cargo: + name: "{{ package_name }}" + state: present + directory: "{{ temp_directory.path }}" + register: install_present_state + + - name: Install package again (latest) + community.general.cargo: + name: "{{ package_name }}" + state: latest + directory: "{{ temp_directory.path }}" + register: install_latest_state + + - name: Change package version (2.0.0) + ansible.builtin.lineinfile: + path: "{{ manifest_path }}" + regexp: '^version = ".*"$' + line: 'version = "2.0.0"' + + - name: Install package with given version (matched) + community.general.cargo: + name: "{{ package_name }}" + version: "2.0.0" + directory: "{{ temp_directory.path }}" + register: install_given_version_matched + + - name: Install package with given version (unmatched) + community.general.cargo: + name: "{{ package_name }}" + version: "2.0.1" + directory: "{{ temp_directory.path }}" + register: install_given_version_unmatched + ignore_errors: true + + - name: Uninstall package + community.general.cargo: + name: "{{ package_name }}" + state: absent + directory: "{{ temp_directory.path }}" + register: uninstall_present + + - name: Install non-existant package + community.general.cargo: + name: "{{ package_name }}-non-existant" + state: present + directory: "{{ temp_directory.path }}" + register: install_non_existant + ignore_errors: true + + - name: Install non-existant source directory + community.general.cargo: + name: "{{ package_name }}" + state: present + directory: "{{ temp_directory.path }}/non-existant" + register: install_non_existant_source + ignore_errors: true + + always: + - name: Remove temp directory + file: + path: "{{ temp_directory.path }}" + state: absent + +- name: Check assertions + assert: + that: + - uninstall_absent is not changed + - install_absent is changed + - install_present_state is not changed + - install_latest_state is changed + - install_given_version_matched is changed + - install_given_version_unmatched is failed + - uninstall_present is changed + - install_non_existant is failed + - install_non_existant_source is failed diff --git a/ansible_collections/community/general/tests/integration/targets/consul/tasks/consul_agent_check.yml b/ansible_collections/community/general/tests/integration/targets/consul/tasks/consul_agent_check.yml new file mode 100644 index 000000000..e1229c794 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/consul/tasks/consul_agent_check.yml @@ -0,0 +1,114 @@ +--- +# Copyright (c) 2024, Michael Ilg (@Ilgmi) +# 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: Create a service + community.general.consul_agent_service: + name: nginx + service_port: 80 + address: localhost + tags: + - http + meta: + nginx_version: 1.25.3 + register: result + +- set_fact: + nginx_service: "{{result.service}}" + +- assert: + that: + - result is changed + - result.service.ID is defined + +- name: Add a check for service + community.general.consul_agent_check: + name: nginx_check + id: nginx_check + interval: 30s + http: http://localhost:80/morestatus + notes: "Nginx Check" + service_id: "{{ nginx_service.ID }}" + register: result + +- assert: + that: + - result is changed + - result.check is defined + - result.check.CheckID == 'nginx_check' + - result.check.ServiceID == 'nginx' + - result.check.Interval == '30s' + - result.check.Type == 'http' + - result.check.Notes == 'Nginx Check' + +- set_fact: + nginx_service_check: "{{ result.check }}" + +- name: Update check for service + community.general.consul_agent_check: + name: "{{ nginx_service_check.Name }}" + id: "{{ nginx_service_check.CheckID }}" + interval: 60s + http: http://localhost:80/morestatus + notes: "New Nginx Check" + service_id: "{{ nginx_service.ID }}" + register: result + +- assert: + that: + - result is changed + - result.check is defined + - result.check.CheckID == 'nginx_check' + - result.check.ServiceID == 'nginx' + - result.check.Interval == '1m0s' + - result.check.Type == 'http' + - result.check.Notes == 'New Nginx Check' + +- name: Remove check + community.general.consul_agent_check: + id: "{{ nginx_service_check.Name }}" + state: absent + service_id: "{{ nginx_service.ID }}" + register: result + +- assert: + that: + - result is changed + - result is not failed + - result.operation == 'remove' + +- name: Add a check + community.general.consul_agent_check: + name: check + id: check + interval: 30s + tcp: localhost:80 + notes: "check" + register: result + +- assert: + that: + - result is changed + - result.check is defined + +- name: Update a check + community.general.consul_agent_check: + name: check + id: check + interval: 60s + tcp: localhost:80 + notes: "check" + register: result + +- assert: + that: + - result is changed + - result.check is defined + - result.check.Interval == '1m0s' + +- name: Remove check + community.general.consul_agent_check: + id: check + state: absent + register: result
\ No newline at end of file diff --git a/ansible_collections/community/general/tests/integration/targets/consul/tasks/consul_agent_service.yml b/ansible_collections/community/general/tests/integration/targets/consul/tasks/consul_agent_service.yml new file mode 100644 index 000000000..95270f74b --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/consul/tasks/consul_agent_service.yml @@ -0,0 +1,89 @@ +--- +# Copyright (c) 2024, Michael Ilg (@Ilgmi) +# 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: Create a service + community.general.consul_agent_service: + name: nginx + service_port: 80 + address: localhost + tags: + - http + meta: + nginx_version: 1.25.3 + register: result + +- set_fact: + nginx_service: "{{result.service}}" + +- assert: + that: + - result is changed + - result.service.ID is defined + - result.service.Service == 'nginx' + - result.service.Address == 'localhost' + - result.service.Port == 80 + - result.service.Tags[0] == 'http' + - result.service.Meta.nginx_version is defined + - result.service.Meta.nginx_version == '1.25.3' + - result.service.ContentHash is defined + +- name: Update service + community.general.consul_agent_service: + id: "{{ nginx_service.ID }}" + name: "{{ nginx_service.Service }}" + service_port: 8080 + address: 127.0.0.1 + tags: + - http + - new_tag + meta: + nginx_version: 1.0.0 + nginx: 1.25.3 + register: result +- assert: + that: + - result is changed + - result.service.ID is defined + - result.service.Service == 'nginx' + - result.service.Address == '127.0.0.1' + - result.service.Port == 8080 + - result.service.Tags[0] == 'http' + - result.service.Tags[1] == 'new_tag' + - result.service.Meta.nginx_version is defined + - result.service.Meta.nginx_version == '1.0.0' + - result.service.Meta.nginx is defined + - result.service.Meta.nginx == '1.25.3' + - result.service.ContentHash is defined + +- name: Update service not changed when updating again without changes + community.general.consul_agent_service: + id: "{{ nginx_service.ID }}" + name: "{{ nginx_service.Service }}" + service_port: 8080 + address: 127.0.0.1 + tags: + - http + - new_tag + meta: + nginx_version: 1.0.0 + nginx: 1.25.3 + register: result + +- assert: + that: + - result is not changed + - result.operation is not defined + +- name: Remove service + community.general.consul_agent_service: + id: "{{ nginx_service.ID }}" + state: absent + register: result + +- assert: + that: + - result is changed + - result is not failed + - result.operation == 'remove'
\ No newline at end of file diff --git a/ansible_collections/community/general/tests/integration/targets/consul/tasks/main.yml b/ansible_collections/community/general/tests/integration/targets/consul/tasks/main.yml index 6fef2b998..0ac58fc40 100644 --- a/ansible_collections/community/general/tests/integration/targets/consul/tasks/main.yml +++ b/ansible_collections/community/general/tests/integration/targets/consul/tasks/main.yml @@ -97,6 +97,8 @@ - import_tasks: consul_token.yml - import_tasks: consul_auth_method.yml - import_tasks: consul_binding_rule.yml + - import_tasks: consul_agent_service.yml + - import_tasks: consul_agent_check.yml module_defaults: group/community.general.consul: token: "{{ consul_management_token }}" diff --git a/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/aliases b/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/aliases new file mode 100644 index 000000000..12d1d6617 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/aliases @@ -0,0 +1,5 @@ +# 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 + +azp/posix/2 diff --git a/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/tasks/keep_keys.yml b/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/tasks/keep_keys.yml new file mode 100644 index 000000000..94825c9d6 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/tasks/keep_keys.yml @@ -0,0 +1,79 @@ +--- +# 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: Debug ansible_version + ansible.builtin.debug: + var: ansible_version + when: not quite_test | d(true) | bool + tags: ansible_version + +- name: Test keep keys equal (default) + ansible.builtin.assert: + that: + - (rr | difference(result1) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + vars: + rr: "{{ list1 | community.general.keep_keys(target=tt) }}" + tt: [k0_x0, k1_x1] + tags: equal_default + +- name: Test keep keys regex string + ansible.builtin.assert: + that: + - (rr | difference(result1) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + vars: + rr: "{{ list1 | community.general.keep_keys(target=tt, matching_parameter=mp) }}" + mp: regex + tt: '^.*[01]_x.*$' + tags: regex_string + +- name: Test keep keys targets1 + ansible.builtin.assert: + that: + - (rr | difference(result1) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + loop: "{{ targets1 }}" + loop_control: + label: "{{ item.mp }}: {{ item.tt }}" + vars: + rr: "{{ list1 | community.general.keep_keys(target=item.tt, matching_parameter=item.mp) }}" + tags: targets1 + +- name: Test keep keys targets2 + ansible.builtin.assert: + that: + - (rr | difference(result2) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + loop: "{{ targets2 }}" + loop_control: + label: "{{ item.mp }}: {{ item.tt }}" + vars: + rr: "{{ list2 | community.general.keep_keys(target=item.tt, matching_parameter=item.mp) }}" + tags: targets2 diff --git a/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/tasks/main.yml b/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/tasks/main.yml new file mode 100644 index 000000000..23457d1e1 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/tasks/main.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 + +- name: Test keep_keys + import_tasks: keep_keys.yml diff --git a/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/vars/main.yml b/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/vars/main.yml new file mode 100644 index 000000000..b25325253 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_keep_keys/vars/main.yml @@ -0,0 +1,33 @@ +--- +# 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 + +targets1: + - {mp: equal, tt: [k0_x0, k1_x1]} + - {mp: starts_with, tt: [k0, k1]} + - {mp: ends_with, tt: [x0, x1]} + - {mp: regex, tt: ['^.*[01]_x.*$']} + - {mp: regex, tt: '^.*[01]_x.*$'} + +list1: + - {k0_x0: A0, k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar} + +result1: + - {k0_x0: A0, k1_x1: B0} + - {k0_x0: A1, k1_x1: B1} + +targets2: + - {mp: equal, tt: k0_x0} + - {mp: starts_with, tt: k0} + - {mp: ends_with, tt: x0} + - {mp: regex, tt: '^.*0_x.*$'} + +list2: + - {k0_x0: A0, k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar} + +result2: + - {k0_x0: A0} + - {k0_x0: A1} diff --git a/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/aliases b/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/aliases new file mode 100644 index 000000000..12d1d6617 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/aliases @@ -0,0 +1,5 @@ +# 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 + +azp/posix/2 diff --git a/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/tasks/main.yml b/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/tasks/main.yml new file mode 100644 index 000000000..d4215d8c5 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/tasks/main.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 + +- name: Test remove_keys + import_tasks: remove_keys.yml diff --git a/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/tasks/remove_keys.yml b/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/tasks/remove_keys.yml new file mode 100644 index 000000000..121cd88cf --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/tasks/remove_keys.yml @@ -0,0 +1,79 @@ +--- +# 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: Debug ansible_version + ansible.builtin.debug: + var: ansible_version + when: not quite_test | d(true) | bool + tags: ansible_version + +- name: Test remove keys equal (default) + ansible.builtin.assert: + that: + - (rr | difference(result1) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + vars: + rr: "{{ list1 | community.general.remove_keys(target=tt) }}" + tt: [k0_x0, k1_x1] + tags: equal_default + +- name: Test remove keys regex string + ansible.builtin.assert: + that: + - (rr | difference(result1) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + vars: + rr: "{{ list1 | community.general.remove_keys(target=tt, matching_parameter=mp) }}" + mp: regex + tt: '^.*[01]_x.*$' + tags: regex_string + +- name: Test remove keys targets1 + ansible.builtin.assert: + that: + - (rr | difference(result1) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + loop: "{{ targets1 }}" + loop_control: + label: "{{ item.mp }}: {{ item.tt }}" + vars: + rr: "{{ list1 | community.general.remove_keys(target=item.tt, matching_parameter=item.mp) }}" + tags: targets1 + +- name: Test remove keys targets2 + ansible.builtin.assert: + that: + - (rr | difference(result2) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + loop: "{{ targets2 }}" + loop_control: + label: "{{ item.mp }}: {{ item.tt }}" + vars: + rr: "{{ list2 | community.general.remove_keys(target=item.tt, matching_parameter=item.mp) }}" + tags: targets1 diff --git a/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/vars/main.yml b/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/vars/main.yml new file mode 100644 index 000000000..a52d09a34 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_remove_keys/vars/main.yml @@ -0,0 +1,33 @@ +--- +# 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 + +targets1: + - {mp: equal, tt: [k0_x0, k1_x1]} + - {mp: starts_with, tt: [k0, k1]} + - {mp: ends_with, tt: [x0, x1]} + - {mp: regex, tt: ['^.*[01]_x.*$']} + - {mp: regex, tt: '^.*[01]_x.*$'} + +list1: + - {k0_x0: A0, k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar} + +result1: + - {k2_x2: [C0], k3_x3: foo} + - {k2_x2: [C1], k3_x3: bar} + +targets2: + - {mp: equal, tt: k0_x0} + - {mp: starts_with, tt: k0} + - {mp: ends_with, tt: x0} + - {mp: regex, tt: '^.*0_x.*$'} + +list2: + - {k0_x0: A0, k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar} + +result2: + - {k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k1_x1: B1, k2_x2: [C1], k3_x3: bar} diff --git a/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/aliases b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/aliases new file mode 100644 index 000000000..12d1d6617 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/aliases @@ -0,0 +1,5 @@ +# 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 + +azp/posix/2 diff --git a/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/tasks/fn-test-replace_keys.yml b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/tasks/fn-test-replace_keys.yml new file mode 100644 index 000000000..e324376a5 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/tasks/fn-test-replace_keys.yml @@ -0,0 +1,21 @@ +--- +# 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 replace keys + ansible.builtin.assert: + that: + - (rr | difference(item.result) | length) == 0 + success_msg: | + [OK] {{ item.label }} + result: + {{ rr | to_nice_yaml(indent=2) | indent(2) }} + fail_msg: | + [ERR] {{ item.label }} + result: + {{ rr | to_nice_yaml(indent=2) | indent(2) }} + quiet: "{{ quiet_test | d(true) | bool }}" + vars: + rr: "{{ item.data | + community.general.replace_keys(target=item.target, matching_parameter=item.match) }}" diff --git a/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/tasks/main.yml b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/tasks/main.yml new file mode 100644 index 000000000..35addaf94 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/tasks/main.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 + +- name: Test replace_keys + import_tasks: replace_keys.yml diff --git a/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/tasks/replace_keys.yml b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/tasks/replace_keys.yml new file mode 100644 index 000000000..a57921b81 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/tasks/replace_keys.yml @@ -0,0 +1,56 @@ +--- +# 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: Debug ansible_version + ansible.builtin.debug: + var: ansible_version + when: not quiet_test | d(true) | bool + tags: ansible_version + +- name: Test replace keys equal (default) + ansible.builtin.assert: + that: + - (rr | difference(result1) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + vars: + rr: "{{ list1 | community.general.replace_keys(target=tt) }}" + tt: + - {before: k0_x0, after: a0} + - {before: k1_x1, after: a1} + tags: equal_default + +- name: Test replace keys targets1 + ansible.builtin.assert: + that: + - (rr | difference(result1) | length) == 0 + success_msg: | + [OK] result: + {{ rr | to_yaml }} + fail_msg: | + [ERR] result: + {{ rr | to_yaml }} + quiet: "{{ quiet_test | d(true) | bool }}" + loop: "{{ targets1 | dict2items }}" + loop_control: + label: "{{ item.key }}" + vars: + rr: "{{ list1 | community.general.replace_keys(target=item.value, matching_parameter=item.key) }}" + tags: targets1 + +- name: Test replace keys targets2 + include_tasks: + file: fn-test-replace_keys.yml + apply: + tags: targets2 + loop: "{{ targets2 }}" + loop_control: + label: "{{ item.label }}" + tags: targets2 diff --git a/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/vars/main.yml b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/vars/main.yml new file mode 100644 index 000000000..167e08396 --- /dev/null +++ b/ansible_collections/community/general/tests/integration/targets/filter_replace_keys/vars/main.yml @@ -0,0 +1,58 @@ +--- +# 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 + +list1: + - {k0_x0: A0, k1_x1: B0, k2_x2: [C0], k3_x3: foo} + - {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar} + +result1: + - {a0: A0, a1: B0, k2_x2: [C0], k3_x3: foo} + - {a0: A1, a1: B1, k2_x2: [C1], k3_x3: bar} + +targets1: + equal: + - {before: k0_x0, after: a0} + - {before: k1_x1, after: a1} + starts_with: + - {before: k0, after: a0} + - {before: k1, after: a1} + ends_with: + - {before: x0, after: a0} + - {before: x1, after: a1} + regex: + - {before: "^.*0_x.*$", after: a0} + - {before: "^.*1_x.*$", after: a1} + +list2: + - {aaa1: A, bbb1: B, ccc1: C} + - {aaa2: D, bbb2: E, ccc2: F} + +targets2: + - label: If more keys match the same attribute before the last one will be used. + match: regex + target: + - {before: "^.*_x.*$", after: X} + data: "{{ list1 }}" + result: + - X: foo + - X: bar + - label: If there are items with equal attribute before the first one will be used. + match: regex + target: + - {before: "^.*_x.*$", after: X} + - {before: "^.*_x.*$", after: Y} + data: "{{ list1 }}" + result: + - X: foo + - X: bar + - label: If there are more matches for a key the first one will be used. + match: starts_with + target: + - {before: a, after: X} + - {before: aa, after: Y} + data: "{{ list2 }}" + result: + - {X: A, bbb1: B, ccc1: C} + - {X: D, bbb2: E, ccc2: F} diff --git a/ansible_collections/community/general/tests/integration/targets/git_config/tasks/unset_value.yml b/ansible_collections/community/general/tests/integration/targets/git_config/tasks/unset_value.yml index dfa535a2d..5f8c52c96 100644 --- a/ansible_collections/community/general/tests/integration/targets/git_config/tasks/unset_value.yml +++ b/ansible_collections/community/general/tests/integration/targets/git_config/tasks/unset_value.yml @@ -25,4 +25,28 @@ - unset_result.diff.before == option_value + "\n" - unset_result.diff.after == "\n" - get_result.config_value == '' + +- import_tasks: setup_value.yml + +- name: unsetting value with value specified + git_config: + name: "{{ option_name }}" + scope: "{{ option_scope }}" + value: "{{ option_value }}" + state: absent + register: unset_result + +- name: getting value + git_config: + name: "{{ option_name }}" + scope: "{{ option_scope }}" + register: get_result + +- name: assert unset changed and deleted value + assert: + that: + - unset_result is changed + - unset_result.diff.before == option_value + "\n" + - unset_result.diff.after == "\n" + - get_result.config_value == '' ... diff --git a/ansible_collections/community/general/tests/integration/targets/keycloak_client/tasks/main.yml b/ansible_collections/community/general/tests/integration/targets/keycloak_client/tasks/main.yml index 5e7c7fae3..e1a7d2ebf 100644 --- a/ansible_collections/community/general/tests/integration/targets/keycloak_client/tasks/main.yml +++ b/ansible_collections/community/general/tests/integration/targets/keycloak_client/tasks/main.yml @@ -103,3 +103,131 @@ assert: that: - check_client_when_present_and_changed is changed + +- name: Desire client with flow binding overrides + community.general.keycloak_client: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + client_id: "{{ client_id }}" + state: present + redirect_uris: '{{redirect_uris1}}' + attributes: '{{client_attributes1}}' + protocol_mappers: '{{protocol_mappers1}}' + authentication_flow_binding_overrides: + browser_name: browser + direct_grant_name: direct grant + register: desire_client_with_flow_binding_overrides + +- name: Assert flows are set + assert: + that: + - desire_client_with_flow_binding_overrides is changed + - "'authenticationFlowBindingOverrides' in desire_client_with_flow_binding_overrides.end_state" + - desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides.browser | length > 0 + - desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides.direct_grant | length > 0 + +- name: Backup flow UUIDs + set_fact: + flow_browser_uuid: "{{ desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides.browser }}" + flow_direct_grant_uuid: "{{ desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides.direct_grant }}" + +- name: Desire client with flow binding overrides remove direct_grant_name + community.general.keycloak_client: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + client_id: "{{ client_id }}" + state: present + redirect_uris: '{{redirect_uris1}}' + attributes: '{{client_attributes1}}' + protocol_mappers: '{{protocol_mappers1}}' + authentication_flow_binding_overrides: + browser_name: browser + register: desire_client_with_flow_binding_overrides + +- name: Assert flows are updated + assert: + that: + - desire_client_with_flow_binding_overrides is changed + - "'authenticationFlowBindingOverrides' in desire_client_with_flow_binding_overrides.end_state" + - desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides.browser | length > 0 + - "'direct_grant' not in desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides" + +- name: Desire client with flow binding overrides remove browser add direct_grant + community.general.keycloak_client: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + client_id: "{{ client_id }}" + state: present + redirect_uris: '{{redirect_uris1}}' + attributes: '{{client_attributes1}}' + protocol_mappers: '{{protocol_mappers1}}' + authentication_flow_binding_overrides: + direct_grant_name: direct grant + register: desire_client_with_flow_binding_overrides + +- name: Assert flows are updated + assert: + that: + - desire_client_with_flow_binding_overrides is changed + - "'authenticationFlowBindingOverrides' in desire_client_with_flow_binding_overrides.end_state" + - "'browser' not in desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides" + - desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides.direct_grant | length > 0 + +- name: Desire client with flow binding overrides with UUIDs + community.general.keycloak_client: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + client_id: "{{ client_id }}" + state: present + redirect_uris: '{{redirect_uris1}}' + attributes: '{{client_attributes1}}' + protocol_mappers: '{{protocol_mappers1}}' + authentication_flow_binding_overrides: + browser: "{{ flow_browser_uuid }}" + direct_grant: "{{ flow_direct_grant_uuid }}" + register: desire_client_with_flow_binding_overrides + +- name: Assert flows are updated + assert: + that: + - desire_client_with_flow_binding_overrides is changed + - "'authenticationFlowBindingOverrides' in desire_client_with_flow_binding_overrides.end_state" + - desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides.browser == flow_browser_uuid + - desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides.direct_grant == flow_direct_grant_uuid + +- name: Unset flow binding overrides + community.general.keycloak_client: + auth_keycloak_url: "{{ url }}" + auth_realm: "{{ admin_realm }}" + auth_username: "{{ admin_user }}" + auth_password: "{{ admin_password }}" + realm: "{{ realm }}" + client_id: "{{ client_id }}" + state: present + redirect_uris: '{{redirect_uris1}}' + attributes: '{{client_attributes1}}' + protocol_mappers: '{{protocol_mappers1}}' + authentication_flow_binding_overrides: + browser: "{{ None }}" + direct_grant: null + register: desire_client_with_flow_binding_overrides + +- name: Assert flows are removed + assert: + that: + - desire_client_with_flow_binding_overrides is changed + - "'authenticationFlowBindingOverrides' in desire_client_with_flow_binding_overrides.end_state" + - "'browser' not in desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides" + - "'direct_grant' not in desire_client_with_flow_binding_overrides.end_state.authenticationFlowBindingOverrides"
\ No newline at end of file diff --git a/ansible_collections/community/general/tests/unit/plugins/module_utils/test_cmd_runner.py b/ansible_collections/community/general/tests/unit/plugins/module_utils/test_cmd_runner.py index 6816afb34..fcdffe7d2 100644 --- a/ansible_collections/community/general/tests/unit/plugins/module_utils/test_cmd_runner.py +++ b/ansible_collections/community/general/tests/unit/plugins/module_utils/test_cmd_runner.py @@ -47,6 +47,9 @@ TC_FORMATS = dict( simple_fixed_false=(partial(cmd_runner_fmt.as_fixed, ["--always-here", "--forever"]), False, ["--always-here", "--forever"], None), simple_fixed_none=(partial(cmd_runner_fmt.as_fixed, ["--always-here", "--forever"]), None, ["--always-here", "--forever"], None), simple_fixed_str=(partial(cmd_runner_fmt.as_fixed, ["--always-here", "--forever"]), "something", ["--always-here", "--forever"], None), + stack_optval__str=(partial(cmd_runner_fmt.stack(cmd_runner_fmt.as_optval), "-t"), ["potatoes", "bananas"], ["-tpotatoes", "-tbananas"], None), + stack_opt_val__str=(partial(cmd_runner_fmt.stack(cmd_runner_fmt.as_opt_val), "-t"), ["potatoes", "bananas"], ["-t", "potatoes", "-t", "bananas"], None), + stack_opt_eq_val__int=(partial(cmd_runner_fmt.stack(cmd_runner_fmt.as_opt_eq_val), "--answer"), [42, 17], ["--answer=42", "--answer=17"], None), ) if tuple(version_info) >= (3, 1): from collections import OrderedDict @@ -67,7 +70,7 @@ TC_FORMATS_IDS = sorted(TC_FORMATS.keys()) def test_arg_format(func, value, expected, exception): fmt_func = func() try: - actual = fmt_func(value, ctx_ignore_none=True) + actual = fmt_func(value) print("formatted string = {0}".format(actual)) assert actual == expected, "actual = {0}".format(actual) except Exception as e: diff --git a/ansible_collections/community/general/tests/unit/plugins/modules/test_django_check.py b/ansible_collections/community/general/tests/unit/plugins/modules/test_django_check.py new file mode 100644 index 000000000..8aec71900 --- /dev/null +++ b/ansible_collections/community/general/tests/unit/plugins/modules/test_django_check.py @@ -0,0 +1,13 @@ +# Copyright (c) Alexei Znamensky (russoz@gmail.com) +# 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_collections.community.general.plugins.modules import django_check +from .helper import Helper + + +Helper.from_module(django_check, __name__) diff --git a/ansible_collections/community/general/tests/unit/plugins/modules/test_django_check.yaml b/ansible_collections/community/general/tests/unit/plugins/modules/test_django_check.yaml new file mode 100644 index 000000000..6156aaa2c --- /dev/null +++ b/ansible_collections/community/general/tests/unit/plugins/modules/test_django_check.yaml @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Copyright (c) Alexei Znamensky (russoz@gmail.com) +# 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 + +--- +- id: success + input: + settings: whatever.settings + run_command_calls: + - command: [/testbin/python, -m, django, check, --no-color, --settings=whatever.settings] + environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true} + rc: 0 + out: "whatever\n" + err: "" +- id: multiple_databases + input: + settings: whatever.settings + database: + - abc + - def + run_command_calls: + - command: [/testbin/python, -m, django, check, --no-color, --settings=whatever.settings, --database, abc, --database, def] + environ: *env-def + rc: 0 + out: "whatever\n" + err: "" diff --git a/ansible_collections/community/general/tests/unit/plugins/modules/test_django_createcachetable.py b/ansible_collections/community/general/tests/unit/plugins/modules/test_django_createcachetable.py new file mode 100644 index 000000000..5a4b89c0c --- /dev/null +++ b/ansible_collections/community/general/tests/unit/plugins/modules/test_django_createcachetable.py @@ -0,0 +1,13 @@ +# Copyright (c) Alexei Znamensky (russoz@gmail.com) +# 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_collections.community.general.plugins.modules import django_createcachetable +from .helper import Helper + + +Helper.from_module(django_createcachetable, __name__) diff --git a/ansible_collections/community/general/tests/unit/plugins/modules/test_django_createcachetable.yaml b/ansible_collections/community/general/tests/unit/plugins/modules/test_django_createcachetable.yaml new file mode 100644 index 000000000..1808b163f --- /dev/null +++ b/ansible_collections/community/general/tests/unit/plugins/modules/test_django_createcachetable.yaml @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Copyright (c) Alexei Znamensky (russoz@gmail.com) +# 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 + +--- +- id: command_success + input: + settings: whatever.settings + run_command_calls: + - command: [/testbin/python, -m, django, createcachetable, --no-color, --settings=whatever.settings, --noinput, --database=default] + environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true} + rc: 0 + out: "whatever\n" + err: "" 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) diff --git a/ansible_collections/community/network/.azure-pipelines/azure-pipelines.yml b/ansible_collections/community/network/.azure-pipelines/azure-pipelines.yml index edff3f6c4..1ba74581c 100644 --- a/ansible_collections/community/network/.azure-pipelines/azure-pipelines.yml +++ b/ansible_collections/community/network/.azure-pipelines/azure-pipelines.yml @@ -64,14 +64,14 @@ stages: - test: 5 - test: extra - - stage: Sanity_2_16 - displayName: Sanity 2.16 + - stage: Sanity_2_17 + displayName: Sanity 2.17 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Test {0} - testFormat: 2.16/sanity/{0} + testFormat: 2.17/sanity/{0} targets: - test: 1 - test: 2 @@ -80,14 +80,14 @@ stages: - test: 5 - test: extra - - stage: Sanity_2_15 - displayName: Sanity 2.15 + - stage: Sanity_2_16 + displayName: Sanity 2.16 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Test {0} - testFormat: 2.15/sanity/{0} + testFormat: 2.16/sanity/{0} targets: - test: 1 - test: 2 @@ -96,35 +96,21 @@ stages: - test: 5 - test: extra - - stage: Sanity_2_14 - displayName: Sanity 2.14 - dependsOn: [] - jobs: - - template: templates/matrix.yml - parameters: - nameFormat: Test {0} - testFormat: 2.14/sanity/{0} - targets: - - test: 1 - - test: 2 - - test: 3 - - test: 4 - - test: 5 - - - stage: Sanity_2_13 - displayName: Sanity 2.13 + - stage: Sanity_2_15 + displayName: Sanity 2.15 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Test {0} - testFormat: 2.13/sanity/{0} + testFormat: 2.15/sanity/{0} targets: - test: 1 - test: 2 - test: 3 - test: 4 - test: 5 + - test: extra ### Units - stage: Units_devel @@ -138,63 +124,60 @@ stages: targets: - test: '3.10' - - stage: Units_2_16 - displayName: Units 2.16 + - stage: Units_2_17 + displayName: Units 2.17 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: 2.16/units/{0}/1 + testFormat: 2.17/units/{0}/1 targets: - test: '3.10' - - stage: Units_2_15 - displayName: Units 2.15 + - stage: Units_2_16 + displayName: Units 2.16 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: 2.15/units/{0}/1 + testFormat: 2.16/units/{0}/1 targets: - test: '3.10' - - stage: Units_2_14 - displayName: Units 2.14 + - stage: Units_2_15 + displayName: Units 2.15 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: 2.14/units/{0}/1 + testFormat: 2.15/units/{0}/1 targets: - test: '3.10' - - stage: Units_2_13 - displayName: Units 2.13 +### Cloud + - stage: Cloud_devel + displayName: Cloud devel dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: 2.13/units/{0}/1 + testFormat: devel/cloud/{0}/1 targets: - - test: 3.8 - - test: '3.10' + - test: "3.10" -### Cloud - - stage: Cloud_devel - displayName: Cloud devel + - stage: Cloud_2_17 + displayName: Cloud 2.17 dependsOn: [] jobs: - template: templates/matrix.yml parameters: nameFormat: Python {0} - testFormat: devel/cloud/{0}/1 + testFormat: 2.17/cloud/{0}/1 targets: - - test: 3.8 - - test: 3.9 - test: "3.10" - stage: Cloud_2_16 @@ -206,8 +189,6 @@ stages: nameFormat: Python {0} testFormat: 2.16/cloud/{0}/1 targets: - - test: 3.8 - - test: 3.9 - test: "3.10" - stage: Cloud_2_15 @@ -219,32 +200,6 @@ stages: nameFormat: Python {0} testFormat: 2.15/cloud/{0}/1 targets: - - test: 3.8 - - test: 3.9 - - test: "3.10" - - - stage: Cloud_2_14 - displayName: Cloud 2.14 - dependsOn: [] - jobs: - - template: templates/matrix.yml - parameters: - nameFormat: Python {0} - testFormat: 2.14/cloud/{0}/1 - targets: - - test: 3.8 - - test: 3.9 - - test: "3.10" - - - stage: Cloud_2_13 - displayName: Cloud 2.13 - dependsOn: [] - jobs: - - template: templates/matrix.yml - parameters: - nameFormat: Python {0} - testFormat: 2.13/cloud/{0}/1 - targets: - test: 3.9 - test: "3.10" @@ -253,19 +208,16 @@ stages: condition: succeededOrFailed() dependsOn: - Sanity_devel + - Sanity_2_17 - Sanity_2_16 - Sanity_2_15 - - Sanity_2_14 - - Sanity_2_13 - Units_devel + - Units_2_17 - Units_2_16 - Units_2_15 - - Units_2_14 - - Units_2_13 - Cloud_devel + - Cloud_2_17 - Cloud_2_16 - Cloud_2_15 - - Cloud_2_14 - - Cloud_2_13 jobs: - template: templates/coverage.yml diff --git a/ansible_collections/community/network/CHANGELOG.rst b/ansible_collections/community/network/CHANGELOG.rst index 6805773cf..a868cace0 100644 --- a/ansible_collections/community/network/CHANGELOG.rst +++ b/ansible_collections/community/network/CHANGELOG.rst @@ -6,6 +6,20 @@ Community Network Release Notes This changelog describes changes after version 4.0.0. +v5.0.3 +====== + +Release Summary +--------------- + +This is a patch release of the ``community.network`` collection. +This changelog contains changes made since the previous release. + +Bugfixes +-------- + +- exos - Add error handling of ``Permission denied`` errors (https://github.com/ansible-collections/community.network/pull/571). + v5.0.2 ====== diff --git a/ansible_collections/community/network/FILES.json b/ansible_collections/community/network/FILES.json index 48d500a30..de45f37db 100644 --- a/ansible_collections/community/network/FILES.json +++ b/ansible_collections/community/network/FILES.json @@ -109,7 +109,7 @@ "name": ".azure-pipelines/azure-pipelines.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f2112d8c5ddaca809f1d13953864b03b713590d7cb7805f0c16f62277a009484", + "chksum_sha256": "c9869ee28f0952e3c9461770c30f4a6e15db2f6a2933ac8d058950b1547eadd4", "format": 1 }, { @@ -172,7 +172,7 @@ "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9e2550ba9ca90e0d106b52fc04c136140485803b62db3f9e4fb12371b26c914b", + "chksum_sha256": "5f7fd05e3edfcbb231b556f6d3ad0e2831ea25668366a13569fcffb285cc607d", "format": 1 }, { @@ -3987,7 +3987,7 @@ "name": "plugins/terminal/exos.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cf743fa5c18ba7055eb87fad3c2948305479d9715adfb0e06ac1b4f45fa09f3f", + "chksum_sha256": "b2ffb423befb1c0341f9217687b3ef9ec48c5c3fd9539e5d7ec3935a791007af", "format": 1 }, { @@ -8362,7 +8362,14 @@ "name": "tests/sanity/ignore-2.17.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1c18bd4cb71e089a317436248584e1482a76baf50ed173c32ce45915118b575b", + "chksum_sha256": "98377bb2ecb77dedfa8c99ba5f870e935dda583cdae0f9578850a730bebee9cf", + "format": 1 + }, + { + "name": "tests/sanity/ignore-2.18.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "98377bb2ecb77dedfa8c99ba5f870e935dda583cdae0f9578850a730bebee9cf", "format": 1 }, { @@ -11701,7 +11708,7 @@ "name": "tests/utils/shippable/shippable.sh", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e5e1a79c1fc0598e35051b035c11ca862be55778c7b5cd79bdf0b3127a991208", + "chksum_sha256": "a522bc30e09d45274138a7ae30acfb23507f02d68cfa44aac8afc4419e4ea832", "format": 1 }, { @@ -11750,7 +11757,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f75120a830b09fe02ee6342d7e5e2f9ce03992ddfa862bdb1538f7b08d9014a0", + "chksum_sha256": "1cf3de4a3c421e2ad4ec0334566bd424f4d40c94b7c4296a32a9adad332c828b", "format": 1 }, { @@ -11778,7 +11785,7 @@ "name": "README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5db1e1a06abb9ba8c8c63f78cfc20827eedb55817e3fb58dd41ee48c5373e903", + "chksum_sha256": "67bed77efdd430b14dd24ca26da27646dc25d76979f5a6025ed8af7e56467736", "format": 1 }, { diff --git a/ansible_collections/community/network/MANIFEST.json b/ansible_collections/community/network/MANIFEST.json index 82b457808..5a934c5dd 100644 --- a/ansible_collections/community/network/MANIFEST.json +++ b/ansible_collections/community/network/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "network", - "version": "5.0.2", + "version": "5.0.3", "authors": [ "Ansible (https://github.com/ansible)" ], @@ -26,7 +26,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e1c51f77033732d00f7c6000f269e730bdde56f0ff50e22c7be1f81f3d59cfc1", + "chksum_sha256": "6d5b9f8a9bb56811ea84c47aa7f8a70d59ecc434486c83635f4bed458c7fe3ff", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/network/README.md b/ansible_collections/community/network/README.md index 5e94a32cf..382f0050d 100644 --- a/ansible_collections/community/network/README.md +++ b/ansible_collections/community/network/README.md @@ -63,7 +63,7 @@ Click the `Content` button to see the list of content included in this collectio This collection is shipped with the `ansible` package. So if you have it installed, no more action is required. -If you have a minimal installation (only Ansible Core installed) or you want to use the latest version of the collection along with the whole `ansible` package, you need to install the collection from [Ansible Galaxy](https://galaxy.ansible.com/community/network) manually with the `ansible-galaxy` command-line tool: +If you have a minimal installation (only Ansible Core installed) or you want to use the latest version of the collection along with the whole `ansible` package, you need to install the collection from [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/community/network/) manually with the `ansible-galaxy` command-line tool: ansible-galaxy collection install community.network @@ -83,7 +83,7 @@ Note that if you install the collection manually, it will not be upgraded automa ansible-galaxy collection install community.network --upgrade ``` -You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where `X.Y.Z` can be any [available version](https://galaxy.ansible.com/community/network): +You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where `X.Y.Z` can be any [available version](https://galaxy.ansible.com/ui/repo/published/community/network/): ```bash ansible-galaxy collection install community.network:==X.Y.Z diff --git a/ansible_collections/community/network/changelogs/changelog.yaml b/ansible_collections/community/network/changelogs/changelog.yaml index 36d66e2a3..f1045ba5a 100644 --- a/ansible_collections/community/network/changelogs/changelog.yaml +++ b/ansible_collections/community/network/changelogs/changelog.yaml @@ -116,3 +116,14 @@ releases: fragments: - 5.0.2.yml release_date: '2023-10-25' + 5.0.3: + changes: + bugfixes: + - exos - Add error handling of ``Permission denied`` errors (https://github.com/ansible-collections/community.network/pull/571). + release_summary: 'This is a patch release of the ``community.network`` collection. + + This changelog contains changes made since the previous release.' + fragments: + - 5.0.3.yml + - 571-permission-denied-error-handling.yml + release_date: '2024-06-13' diff --git a/ansible_collections/community/network/plugins/terminal/exos.py b/ansible_collections/community/network/plugins/terminal/exos.py index 6836cdb8f..a2f39415b 100644 --- a/ansible_collections/community/network/plugins/terminal/exos.py +++ b/ansible_collections/community/network/plugins/terminal/exos.py @@ -45,6 +45,7 @@ class TerminalModule(TerminalBase): re.compile(br"[%\S] ?Error: ?[\s]+", re.I), re.compile(br"[%\S] ?Informational: ?[\s]+", re.I), re.compile(br"%% Invalid .* at '\^' marker.", re.I), + re.compile(br"Permission denied", re.I), ] def on_open_shell(self): diff --git a/ansible_collections/community/network/tests/sanity/ignore-2.17.txt b/ansible_collections/community/network/tests/sanity/ignore-2.17.txt index f19cd8d79..597bcf203 100644 --- a/ansible_collections/community/network/tests/sanity/ignore-2.17.txt +++ b/ansible_collections/community/network/tests/sanity/ignore-2.17.txt @@ -382,38 +382,30 @@ plugins/modules/cnos_backup.py validate-modules:doc-missing-type plugins/modules/cnos_backup.py validate-modules:doc-required-mismatch plugins/modules/cnos_backup.py validate-modules:nonexistent-parameter-documented plugins/modules/cnos_backup.py validate-modules:undocumented-parameter -plugins/modules/cnos_backup.py yamllint:unparsable-with-libyaml plugins/modules/cnos_banner.py validate-modules:doc-missing-type plugins/modules/cnos_bgp.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_bgp.py validate-modules:doc-missing-type plugins/modules/cnos_bgp.py validate-modules:doc-required-mismatch -plugins/modules/cnos_bgp.py yamllint:unparsable-with-libyaml plugins/modules/cnos_command.py validate-modules:doc-missing-type plugins/modules/cnos_command.py validate-modules:parameter-list-no-elements plugins/modules/cnos_command.py validate-modules:parameter-type-not-in-doc plugins/modules/cnos_conditional_command.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_conditional_command.py validate-modules:doc-missing-type plugins/modules/cnos_conditional_command.py validate-modules:doc-required-mismatch -plugins/modules/cnos_conditional_command.py yamllint:unparsable-with-libyaml plugins/modules/cnos_conditional_template.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_conditional_template.py validate-modules:doc-missing-type plugins/modules/cnos_conditional_template.py validate-modules:doc-required-mismatch -plugins/modules/cnos_conditional_template.py yamllint:unparsable-with-libyaml plugins/modules/cnos_config.py validate-modules:doc-missing-type plugins/modules/cnos_config.py validate-modules:parameter-list-no-elements plugins/modules/cnos_config.py validate-modules:parameter-type-not-in-doc -plugins/modules/cnos_config.py yamllint:unparsable-with-libyaml plugins/modules/cnos_factory.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_factory.py validate-modules:doc-required-mismatch -plugins/modules/cnos_factory.py yamllint:unparsable-with-libyaml plugins/modules/cnos_facts.py validate-modules:nonexistent-parameter-documented plugins/modules/cnos_facts.py validate-modules:parameter-list-no-elements plugins/modules/cnos_facts.py validate-modules:parameter-type-not-in-doc -plugins/modules/cnos_facts.py yamllint:unparsable-with-libyaml plugins/modules/cnos_image.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_image.py validate-modules:doc-missing-type plugins/modules/cnos_image.py validate-modules:doc-required-mismatch -plugins/modules/cnos_image.py yamllint:unparsable-with-libyaml plugins/modules/cnos_interface.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_interface.py validate-modules:doc-elements-mismatch plugins/modules/cnos_interface.py validate-modules:doc-missing-type @@ -452,19 +444,15 @@ plugins/modules/cnos_logging.py validate-modules:parameter-type-not-in-doc plugins/modules/cnos_logging.py validate-modules:undocumented-parameter plugins/modules/cnos_reload.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_reload.py validate-modules:doc-required-mismatch -plugins/modules/cnos_reload.py yamllint:unparsable-with-libyaml plugins/modules/cnos_rollback.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_rollback.py validate-modules:doc-missing-type plugins/modules/cnos_rollback.py validate-modules:doc-required-mismatch plugins/modules/cnos_rollback.py validate-modules:nonexistent-parameter-documented plugins/modules/cnos_rollback.py validate-modules:undocumented-parameter -plugins/modules/cnos_rollback.py yamllint:unparsable-with-libyaml plugins/modules/cnos_save.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_save.py validate-modules:doc-required-mismatch -plugins/modules/cnos_save.py yamllint:unparsable-with-libyaml plugins/modules/cnos_showrun.py validate-modules:doc-required-mismatch plugins/modules/cnos_showrun.py validate-modules:nonexistent-parameter-documented -plugins/modules/cnos_showrun.py yamllint:unparsable-with-libyaml plugins/modules/cnos_static_route.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_static_route.py validate-modules:doc-elements-mismatch plugins/modules/cnos_static_route.py validate-modules:doc-missing-type @@ -478,7 +466,6 @@ plugins/modules/cnos_system.py validate-modules:parameter-type-not-in-doc plugins/modules/cnos_template.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_template.py validate-modules:doc-missing-type plugins/modules/cnos_template.py validate-modules:doc-required-mismatch -plugins/modules/cnos_template.py yamllint:unparsable-with-libyaml plugins/modules/cnos_user.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_user.py validate-modules:doc-elements-mismatch plugins/modules/cnos_user.py validate-modules:doc-missing-type @@ -489,7 +476,6 @@ plugins/modules/cnos_user.py validate-modules:undocumented-parameter plugins/modules/cnos_vlag.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_vlag.py validate-modules:doc-missing-type plugins/modules/cnos_vlag.py validate-modules:doc-required-mismatch -plugins/modules/cnos_vlag.py yamllint:unparsable-with-libyaml plugins/modules/cnos_vlan.py validate-modules:doc-choices-do-not-match-spec plugins/modules/cnos_vlan.py validate-modules:doc-elements-mismatch plugins/modules/cnos_vlan.py validate-modules:doc-missing-type @@ -536,7 +522,6 @@ plugins/modules/enos_config.py validate-modules:parameter-type-not-in-doc plugins/modules/enos_facts.py validate-modules:nonexistent-parameter-documented plugins/modules/enos_facts.py validate-modules:parameter-list-no-elements plugins/modules/enos_facts.py validate-modules:parameter-type-not-in-doc -plugins/modules/enos_facts.py yamllint:unparsable-with-libyaml plugins/modules/eric_eccli_command.py validate-modules:parameter-list-no-elements plugins/modules/exos_command.py validate-modules:doc-missing-type plugins/modules/exos_command.py validate-modules:parameter-list-no-elements @@ -720,7 +705,6 @@ plugins/modules/ordnance_config.py validate-modules:invalid-ansiblemodule-schema plugins/modules/ordnance_config.py validate-modules:parameter-list-no-elements plugins/modules/ordnance_config.py validate-modules:parameter-type-not-in-doc plugins/modules/ordnance_config.py validate-modules:undocumented-parameter -plugins/modules/ordnance_config.py yamllint:unparsable-with-libyaml plugins/modules/ordnance_facts.py validate-modules:doc-default-does-not-match-spec plugins/modules/ordnance_facts.py validate-modules:doc-missing-type plugins/modules/ordnance_facts.py validate-modules:doc-required-mismatch @@ -728,7 +712,6 @@ plugins/modules/ordnance_facts.py validate-modules:invalid-ansiblemodule-schema plugins/modules/ordnance_facts.py validate-modules:parameter-list-no-elements plugins/modules/ordnance_facts.py validate-modules:parameter-type-not-in-doc plugins/modules/ordnance_facts.py validate-modules:undocumented-parameter -plugins/modules/ordnance_facts.py yamllint:unparsable-with-libyaml plugins/modules/vdirect_commit.py validate-modules:doc-missing-type plugins/modules/vdirect_commit.py validate-modules:parameter-list-no-elements plugins/modules/vdirect_commit.py validate-modules:parameter-type-not-in-doc @@ -839,7 +822,9 @@ plugins/cliconf/weos4.py pylint:unused-import plugins/lookup/avi.py pylint:unused-import plugins/module_utils/network/aos/aos.py pylint:unused-import plugins/module_utils/network/avi/ansible_utils.py pylint:unused-import +plugins/module_utils/network/avi/ansible_utils.py pylint:unidiomatic-typecheck plugins/module_utils/network/avi/avi.py pylint:unused-import +plugins/module_utils/network/avi/avi_api.py pylint:unidiomatic-typecheck plugins/module_utils/network/cloudengine/ce.py pylint:unused-import plugins/module_utils/network/cnos/cnos.py pylint:unused-import plugins/module_utils/network/eric_eccli/eric_eccli.py pylint:unused-import @@ -851,6 +836,8 @@ plugins/module_utils/network/exos/facts/legacy/base.py pylint:unused-import plugins/module_utils/network/exos/facts/lldp_global/lldp_global.py pylint:unused-import plugins/module_utils/network/exos/facts/lldp_interfaces/lldp_interfaces.py pylint:unused-import plugins/module_utils/network/exos/facts/vlans/vlans.py pylint:unused-import +plugins/module_utils/network/ftd/common.py pylint:unidiomatic-typecheck +plugins/module_utils/network/ftd/configuration.py pylint:use-yield-from plugins/module_utils/network/icx/icx.py pylint:unused-import plugins/module_utils/network/ironware/ironware.py pylint:unused-import plugins/module_utils/network/netscaler/netscaler.py pylint:unused-import @@ -923,6 +910,9 @@ plugins/terminal/netvisor.py pylint:unused-import plugins/terminal/weos4.py pylint:unused-import tests/sanity/extra/botmeta.py pylint:unused-import tests/unit/compat/builtins.py pylint:unused-import +tests/unit/compat/mock.py pylint:use-yield-from +tests/unit/mock/loader.py pylint:unidiomatic-typecheck +tests/unit/plugins/httpapi/test_ftd.py pylint:unidiomatic-typecheck tests/unit/plugins/modules/test_apconos_command.py pylint:unused-import tests/unit/plugins/modules/test_icx_logging.py pylint:unused-import tests/unit/plugins/modules/test_icx_system.py pylint:unused-import diff --git a/ansible_collections/community/network/tests/sanity/ignore-2.18.txt b/ansible_collections/community/network/tests/sanity/ignore-2.18.txt new file mode 100644 index 000000000..597bcf203 --- /dev/null +++ b/ansible_collections/community/network/tests/sanity/ignore-2.18.txt @@ -0,0 +1,920 @@ +plugins/action/aireos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` +plugins/action/aruba.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` +plugins/action/ce.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` +plugins/action/ce_template.py action-plugin-docs # undocumented action plugin to fix, existed before sanity test was added +plugins/action/cnos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` +plugins/action/enos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` +plugins/action/exos.py action-plugin-docs # undocumented action plugin to fix +plugins/action/ironware.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` +plugins/action/slxos.py action-plugin-docs # undocumented action plugin to fix +plugins/action/sros.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` +plugins/action/voss.py action-plugin-docs # undocumented action plugin to fix +plugins/module_utils/network/edgeswitch/edgeswitch_interface.py pylint:duplicate-string-formatting-argument +plugins/modules/a10_server.py validate-modules:parameter-list-no-elements +plugins/modules/a10_server.py validate-modules:parameter-type-not-in-doc +plugins/modules/a10_server_axapi3.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/a10_server_axapi3.py validate-modules:parameter-list-no-elements +plugins/modules/a10_server_axapi3.py validate-modules:parameter-type-not-in-doc +plugins/modules/a10_service_group.py validate-modules:parameter-list-no-elements +plugins/modules/a10_service_group.py validate-modules:parameter-type-not-in-doc +plugins/modules/a10_virtual_server.py validate-modules:doc-default-does-not-match-spec +plugins/modules/a10_virtual_server.py validate-modules:doc-required-mismatch +plugins/modules/a10_virtual_server.py validate-modules:parameter-list-no-elements +plugins/modules/a10_virtual_server.py validate-modules:parameter-type-not-in-doc +plugins/modules/aireos_command.py validate-modules:collection-deprecated-version +plugins/modules/aireos_command.py validate-modules:doc-missing-type +plugins/modules/aireos_command.py validate-modules:parameter-list-no-elements +plugins/modules/aireos_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/aireos_config.py validate-modules:collection-deprecated-version +plugins/modules/aireos_config.py validate-modules:doc-missing-type +plugins/modules/aireos_config.py validate-modules:parameter-list-no-elements +plugins/modules/aireos_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/apconos_command.py validate-modules:parameter-list-no-elements +plugins/modules/aruba_command.py validate-modules:collection-deprecated-version +plugins/modules/aruba_command.py validate-modules:doc-missing-type +plugins/modules/aruba_command.py validate-modules:parameter-list-no-elements +plugins/modules/aruba_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/aruba_config.py validate-modules:collection-deprecated-version +plugins/modules/aruba_config.py validate-modules:doc-missing-type +plugins/modules/aruba_config.py validate-modules:parameter-list-no-elements +plugins/modules/aruba_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_actiongroupconfig.py validate-modules:doc-missing-type +plugins/modules/avi_actiongroupconfig.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_alertconfig.py validate-modules:doc-missing-type +plugins/modules/avi_alertconfig.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_alertemailconfig.py validate-modules:doc-missing-type +plugins/modules/avi_alertemailconfig.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_alertscriptconfig.py validate-modules:doc-missing-type +plugins/modules/avi_alertscriptconfig.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_alertsyslogconfig.py validate-modules:doc-missing-type +plugins/modules/avi_alertsyslogconfig.py validate-modules:parameter-list-no-elements +plugins/modules/avi_alertsyslogconfig.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_analyticsprofile.py validate-modules:doc-missing-type +plugins/modules/avi_analyticsprofile.py validate-modules:parameter-list-no-elements +plugins/modules/avi_analyticsprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_api_session.py validate-modules:doc-missing-type +plugins/modules/avi_api_session.py validate-modules:doc-required-mismatch +plugins/modules/avi_api_session.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_api_version.py validate-modules:doc-missing-type +plugins/modules/avi_api_version.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_applicationpersistenceprofile.py validate-modules:doc-missing-type +plugins/modules/avi_applicationpersistenceprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_applicationprofile.py validate-modules:doc-missing-type +plugins/modules/avi_applicationprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_authprofile.py validate-modules:doc-missing-type +plugins/modules/avi_authprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_autoscalelaunchconfig.py validate-modules:doc-missing-type +plugins/modules/avi_autoscalelaunchconfig.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_backup.py validate-modules:doc-missing-type +plugins/modules/avi_backup.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_backupconfiguration.py validate-modules:doc-missing-type +plugins/modules/avi_backupconfiguration.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_certificatemanagementprofile.py validate-modules:doc-missing-type +plugins/modules/avi_certificatemanagementprofile.py validate-modules:parameter-list-no-elements +plugins/modules/avi_certificatemanagementprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_cloud.py validate-modules:doc-missing-type +plugins/modules/avi_cloud.py validate-modules:parameter-list-no-elements +plugins/modules/avi_cloud.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_cloudconnectoruser.py validate-modules:doc-missing-type +plugins/modules/avi_cloudconnectoruser.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_cloudproperties.py validate-modules:doc-missing-type +plugins/modules/avi_cloudproperties.py validate-modules:parameter-list-no-elements +plugins/modules/avi_cloudproperties.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_cluster.py validate-modules:doc-missing-type +plugins/modules/avi_cluster.py validate-modules:parameter-list-no-elements +plugins/modules/avi_cluster.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_clusterclouddetails.py validate-modules:doc-missing-type +plugins/modules/avi_clusterclouddetails.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_controllerproperties.py validate-modules:doc-missing-type +plugins/modules/avi_controllerproperties.py validate-modules:parameter-list-no-elements +plugins/modules/avi_controllerproperties.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_customipamdnsprofile.py validate-modules:doc-missing-type +plugins/modules/avi_customipamdnsprofile.py validate-modules:parameter-list-no-elements +plugins/modules/avi_customipamdnsprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_dnspolicy.py validate-modules:doc-missing-type +plugins/modules/avi_dnspolicy.py validate-modules:parameter-list-no-elements +plugins/modules/avi_dnspolicy.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_errorpagebody.py validate-modules:doc-missing-type +plugins/modules/avi_errorpagebody.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_errorpageprofile.py validate-modules:doc-missing-type +plugins/modules/avi_errorpageprofile.py validate-modules:parameter-list-no-elements +plugins/modules/avi_errorpageprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_gslb.py validate-modules:doc-missing-type +plugins/modules/avi_gslb.py validate-modules:parameter-list-no-elements +plugins/modules/avi_gslb.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_gslbgeodbprofile.py validate-modules:doc-missing-type +plugins/modules/avi_gslbgeodbprofile.py validate-modules:parameter-list-no-elements +plugins/modules/avi_gslbgeodbprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_gslbservice.py validate-modules:doc-missing-type +plugins/modules/avi_gslbservice.py validate-modules:parameter-list-no-elements +plugins/modules/avi_gslbservice.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_gslbservice_patch_member.py pylint:use-a-generator +plugins/modules/avi_gslbservice_patch_member.py validate-modules:doc-missing-type +plugins/modules/avi_gslbservice_patch_member.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_hardwaresecuritymodulegroup.py validate-modules:doc-missing-type +plugins/modules/avi_hardwaresecuritymodulegroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_healthmonitor.py validate-modules:doc-missing-type +plugins/modules/avi_healthmonitor.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_httppolicyset.py validate-modules:doc-missing-type +plugins/modules/avi_httppolicyset.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_ipaddrgroup.py validate-modules:doc-missing-type +plugins/modules/avi_ipaddrgroup.py validate-modules:parameter-list-no-elements +plugins/modules/avi_ipaddrgroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_ipamdnsproviderprofile.py validate-modules:doc-missing-type +plugins/modules/avi_ipamdnsproviderprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_l4policyset.py validate-modules:doc-missing-type +plugins/modules/avi_l4policyset.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_microservicegroup.py validate-modules:doc-missing-type +plugins/modules/avi_microservicegroup.py validate-modules:parameter-list-no-elements +plugins/modules/avi_microservicegroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_network.py validate-modules:doc-missing-type +plugins/modules/avi_network.py validate-modules:parameter-list-no-elements +plugins/modules/avi_network.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_networkprofile.py validate-modules:doc-missing-type +plugins/modules/avi_networkprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_networksecuritypolicy.py validate-modules:doc-missing-type +plugins/modules/avi_networksecuritypolicy.py validate-modules:parameter-list-no-elements +plugins/modules/avi_networksecuritypolicy.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_pkiprofile.py validate-modules:doc-missing-type +plugins/modules/avi_pkiprofile.py validate-modules:parameter-list-no-elements +plugins/modules/avi_pkiprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_pool.py validate-modules:doc-missing-type +plugins/modules/avi_pool.py validate-modules:parameter-list-no-elements +plugins/modules/avi_pool.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_poolgroup.py validate-modules:doc-missing-type +plugins/modules/avi_poolgroup.py validate-modules:parameter-list-no-elements +plugins/modules/avi_poolgroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_poolgroupdeploymentpolicy.py validate-modules:doc-missing-type +plugins/modules/avi_poolgroupdeploymentpolicy.py validate-modules:parameter-list-no-elements +plugins/modules/avi_poolgroupdeploymentpolicy.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_prioritylabels.py validate-modules:doc-missing-type +plugins/modules/avi_prioritylabels.py validate-modules:parameter-list-no-elements +plugins/modules/avi_prioritylabels.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_role.py validate-modules:doc-missing-type +plugins/modules/avi_role.py validate-modules:parameter-list-no-elements +plugins/modules/avi_role.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_scheduler.py validate-modules:doc-missing-type +plugins/modules/avi_scheduler.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_seproperties.py validate-modules:doc-missing-type +plugins/modules/avi_seproperties.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_serverautoscalepolicy.py validate-modules:doc-missing-type +plugins/modules/avi_serverautoscalepolicy.py validate-modules:parameter-list-no-elements +plugins/modules/avi_serverautoscalepolicy.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_serviceengine.py validate-modules:doc-missing-type +plugins/modules/avi_serviceengine.py validate-modules:parameter-list-no-elements +plugins/modules/avi_serviceengine.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_serviceenginegroup.py validate-modules:doc-missing-type +plugins/modules/avi_serviceenginegroup.py validate-modules:parameter-list-no-elements +plugins/modules/avi_serviceenginegroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_snmptrapprofile.py validate-modules:doc-missing-type +plugins/modules/avi_snmptrapprofile.py validate-modules:parameter-list-no-elements +plugins/modules/avi_snmptrapprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_sslkeyandcertificate.py validate-modules:doc-missing-type +plugins/modules/avi_sslkeyandcertificate.py validate-modules:parameter-list-no-elements +plugins/modules/avi_sslkeyandcertificate.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_sslprofile.py validate-modules:doc-missing-type +plugins/modules/avi_sslprofile.py validate-modules:parameter-list-no-elements +plugins/modules/avi_sslprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_stringgroup.py validate-modules:doc-missing-type +plugins/modules/avi_stringgroup.py validate-modules:parameter-list-no-elements +plugins/modules/avi_stringgroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_systemconfiguration.py validate-modules:doc-missing-type +plugins/modules/avi_systemconfiguration.py validate-modules:parameter-list-no-elements +plugins/modules/avi_systemconfiguration.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_tenant.py validate-modules:doc-missing-type +plugins/modules/avi_tenant.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_trafficcloneprofile.py validate-modules:doc-missing-type +plugins/modules/avi_trafficcloneprofile.py validate-modules:parameter-list-no-elements +plugins/modules/avi_trafficcloneprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_user.py validate-modules:doc-missing-type +plugins/modules/avi_user.py validate-modules:parameter-list-no-elements +plugins/modules/avi_user.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_useraccount.py validate-modules:doc-missing-type +plugins/modules/avi_useraccount.py validate-modules:doc-required-mismatch +plugins/modules/avi_useraccount.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_useraccountprofile.py validate-modules:doc-missing-type +plugins/modules/avi_useraccountprofile.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_virtualservice.py validate-modules:doc-missing-type +plugins/modules/avi_virtualservice.py validate-modules:parameter-list-no-elements +plugins/modules/avi_virtualservice.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_vrfcontext.py validate-modules:doc-missing-type +plugins/modules/avi_vrfcontext.py validate-modules:parameter-list-no-elements +plugins/modules/avi_vrfcontext.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_vsdatascriptset.py validate-modules:doc-missing-type +plugins/modules/avi_vsdatascriptset.py validate-modules:parameter-list-no-elements +plugins/modules/avi_vsdatascriptset.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_vsvip.py validate-modules:doc-missing-type +plugins/modules/avi_vsvip.py validate-modules:parameter-list-no-elements +plugins/modules/avi_vsvip.py validate-modules:parameter-type-not-in-doc +plugins/modules/avi_webhook.py validate-modules:doc-missing-type +plugins/modules/avi_webhook.py validate-modules:parameter-type-not-in-doc +plugins/modules/bcf_switch.py validate-modules:doc-missing-type +plugins/modules/bcf_switch.py validate-modules:parameter-type-not-in-doc +plugins/modules/bigmon_chain.py validate-modules:doc-missing-type +plugins/modules/bigmon_chain.py validate-modules:parameter-type-not-in-doc +plugins/modules/bigmon_policy.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/bigmon_policy.py validate-modules:doc-default-does-not-match-spec +plugins/modules/bigmon_policy.py validate-modules:doc-missing-type +plugins/modules/bigmon_policy.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_aaa_server_host.py validate-modules:doc-missing-type +plugins/modules/ce_aaa_server_host.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_acl.py validate-modules:doc-missing-type +plugins/modules/ce_acl.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_acl_advance.py validate-modules:doc-missing-type +plugins/modules/ce_acl_advance.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_acl_interface.py validate-modules:doc-missing-type +plugins/modules/ce_acl_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_bfd_global.py validate-modules:doc-missing-type +plugins/modules/ce_bfd_global.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_bfd_session.py validate-modules:doc-missing-type +plugins/modules/ce_bfd_session.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_bfd_view.py validate-modules:doc-missing-type +plugins/modules/ce_bfd_view.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_bgp.py validate-modules:doc-missing-type +plugins/modules/ce_bgp.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_bgp_af.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_bgp_af.py validate-modules:doc-missing-type +plugins/modules/ce_bgp_af.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_bgp_neighbor.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/ce_bgp_neighbor.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_bgp_neighbor.py validate-modules:doc-missing-type +plugins/modules/ce_bgp_neighbor.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_bgp_neighbor.py validate-modules:undocumented-parameter +plugins/modules/ce_bgp_neighbor_af.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/ce_bgp_neighbor_af.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_bgp_neighbor_af.py validate-modules:doc-missing-type +plugins/modules/ce_bgp_neighbor_af.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_bgp_neighbor_af.py validate-modules:undocumented-parameter +plugins/modules/ce_command.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/ce_command.py validate-modules:doc-missing-type +plugins/modules/ce_command.py validate-modules:parameter-list-no-elements +plugins/modules/ce_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_config.py validate-modules:doc-missing-type +plugins/modules/ce_config.py validate-modules:parameter-list-no-elements +plugins/modules/ce_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_config.py validate-modules:undocumented-parameter +plugins/modules/ce_dldp.py validate-modules:nonexistent-parameter-documented +plugins/modules/ce_dldp.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_dldp.py validate-modules:undocumented-parameter +plugins/modules/ce_dldp_interface.py validate-modules:doc-missing-type +plugins/modules/ce_dldp_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_eth_trunk.py validate-modules:doc-missing-type +plugins/modules/ce_eth_trunk.py validate-modules:parameter-list-no-elements +plugins/modules/ce_eth_trunk.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_evpn_bd_vni.py validate-modules:doc-missing-type +plugins/modules/ce_evpn_bd_vni.py validate-modules:doc-required-mismatch +plugins/modules/ce_evpn_bd_vni.py validate-modules:parameter-list-no-elements +plugins/modules/ce_evpn_bd_vni.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_evpn_bgp.py validate-modules:doc-missing-type +plugins/modules/ce_evpn_bgp.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_evpn_bgp_rr.py validate-modules:doc-missing-type +plugins/modules/ce_evpn_bgp_rr.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_evpn_global.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_facts.py validate-modules:parameter-list-no-elements +plugins/modules/ce_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_file_copy.py validate-modules:doc-missing-type +plugins/modules/ce_info_center_debug.py validate-modules:doc-missing-type +plugins/modules/ce_info_center_debug.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_info_center_global.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_info_center_global.py validate-modules:doc-missing-type +plugins/modules/ce_info_center_global.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_info_center_log.py validate-modules:doc-missing-type +plugins/modules/ce_info_center_log.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_info_center_trap.py validate-modules:doc-missing-type +plugins/modules/ce_info_center_trap.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/ce_interface.py validate-modules:doc-missing-type +plugins/modules/ce_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_interface_ospf.py validate-modules:doc-missing-type +plugins/modules/ce_interface_ospf.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_ip_interface.py validate-modules:doc-missing-type +plugins/modules/ce_ip_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_is_is_view.py validate-modules:doc-required-mismatch +plugins/modules/ce_link_status.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_mlag_config.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_mlag_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_mlag_interface.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_mlag_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_mtu.py validate-modules:doc-missing-type +plugins/modules/ce_mtu.py validate-modules:doc-required-mismatch +plugins/modules/ce_mtu.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_netconf.py validate-modules:doc-missing-type +plugins/modules/ce_netstream_aging.py validate-modules:doc-missing-type +plugins/modules/ce_netstream_aging.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_netstream_export.py validate-modules:doc-missing-type +plugins/modules/ce_netstream_export.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_netstream_global.py validate-modules:doc-missing-type +plugins/modules/ce_netstream_global.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_netstream_template.py validate-modules:doc-missing-type +plugins/modules/ce_netstream_template.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_ntp.py validate-modules:doc-missing-type +plugins/modules/ce_ntp.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_ntp_auth.py validate-modules:doc-missing-type +plugins/modules/ce_ntp_auth.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_ospf.py validate-modules:doc-missing-type +plugins/modules/ce_ospf.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_ospf_vrf.py validate-modules:doc-missing-type +plugins/modules/ce_ospf_vrf.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_rollback.py validate-modules:doc-missing-type +plugins/modules/ce_rollback.py validate-modules:doc-required-mismatch +plugins/modules/ce_rollback.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_sflow.py validate-modules:doc-missing-type +plugins/modules/ce_sflow.py validate-modules:parameter-list-no-elements +plugins/modules/ce_sflow.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_snmp_community.py validate-modules:doc-missing-type +plugins/modules/ce_snmp_community.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_snmp_contact.py validate-modules:doc-missing-type +plugins/modules/ce_snmp_contact.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_snmp_location.py validate-modules:doc-missing-type +plugins/modules/ce_snmp_location.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_snmp_target_host.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/ce_snmp_target_host.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_snmp_target_host.py validate-modules:doc-missing-type +plugins/modules/ce_snmp_target_host.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_snmp_target_host.py validate-modules:undocumented-parameter +plugins/modules/ce_snmp_traps.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/ce_snmp_traps.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_snmp_traps.py validate-modules:doc-missing-type +plugins/modules/ce_snmp_traps.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_snmp_traps.py validate-modules:undocumented-parameter +plugins/modules/ce_snmp_user.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/ce_snmp_user.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_snmp_user.py validate-modules:doc-missing-type +plugins/modules/ce_snmp_user.py validate-modules:mutually_exclusive-unknown +plugins/modules/ce_snmp_user.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_snmp_user.py validate-modules:undocumented-parameter +plugins/modules/ce_startup.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_startup.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_static_route.py validate-modules:doc-missing-type +plugins/modules/ce_static_route.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_static_route_bfd.py validate-modules:doc-required-mismatch +plugins/modules/ce_static_route_bfd.py validate-modules:parameter-list-no-elements +plugins/modules/ce_stp.py validate-modules:doc-missing-type +plugins/modules/ce_stp.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_switchport.py validate-modules:doc-missing-type +plugins/modules/ce_switchport.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vlan.py validate-modules:doc-missing-type +plugins/modules/ce_vlan.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vrf.py validate-modules:doc-missing-type +plugins/modules/ce_vrf.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vrf_af.py validate-modules:doc-missing-type +plugins/modules/ce_vrf_af.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vrf_interface.py validate-modules:doc-missing-type +plugins/modules/ce_vrf_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vrrp.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ce_vrrp.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vxlan_arp.py validate-modules:doc-missing-type +plugins/modules/ce_vxlan_arp.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vxlan_gateway.py validate-modules:doc-missing-type +plugins/modules/ce_vxlan_gateway.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vxlan_global.py validate-modules:doc-missing-type +plugins/modules/ce_vxlan_global.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vxlan_tunnel.py validate-modules:doc-missing-type +plugins/modules/ce_vxlan_tunnel.py validate-modules:parameter-list-no-elements +plugins/modules/ce_vxlan_tunnel.py validate-modules:parameter-type-not-in-doc +plugins/modules/ce_vxlan_vap.py validate-modules:doc-missing-type +plugins/modules/ce_vxlan_vap.py validate-modules:parameter-type-not-in-doc +plugins/modules/cv_server_provision.py validate-modules:doc-missing-type +plugins/modules/cv_server_provision.py validate-modules:doc-required-mismatch +plugins/modules/cv_server_provision.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/cnos_backup.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_backup.py validate-modules:doc-missing-type +plugins/modules/cnos_backup.py validate-modules:doc-required-mismatch +plugins/modules/cnos_backup.py validate-modules:nonexistent-parameter-documented +plugins/modules/cnos_backup.py validate-modules:undocumented-parameter +plugins/modules/cnos_banner.py validate-modules:doc-missing-type +plugins/modules/cnos_bgp.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_bgp.py validate-modules:doc-missing-type +plugins/modules/cnos_bgp.py validate-modules:doc-required-mismatch +plugins/modules/cnos_command.py validate-modules:doc-missing-type +plugins/modules/cnos_command.py validate-modules:parameter-list-no-elements +plugins/modules/cnos_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_conditional_command.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_conditional_command.py validate-modules:doc-missing-type +plugins/modules/cnos_conditional_command.py validate-modules:doc-required-mismatch +plugins/modules/cnos_conditional_template.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_conditional_template.py validate-modules:doc-missing-type +plugins/modules/cnos_conditional_template.py validate-modules:doc-required-mismatch +plugins/modules/cnos_config.py validate-modules:doc-missing-type +plugins/modules/cnos_config.py validate-modules:parameter-list-no-elements +plugins/modules/cnos_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_factory.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_factory.py validate-modules:doc-required-mismatch +plugins/modules/cnos_facts.py validate-modules:nonexistent-parameter-documented +plugins/modules/cnos_facts.py validate-modules:parameter-list-no-elements +plugins/modules/cnos_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_image.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_image.py validate-modules:doc-missing-type +plugins/modules/cnos_image.py validate-modules:doc-required-mismatch +plugins/modules/cnos_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_interface.py validate-modules:doc-elements-mismatch +plugins/modules/cnos_interface.py validate-modules:doc-missing-type +plugins/modules/cnos_interface.py validate-modules:doc-required-mismatch +plugins/modules/cnos_interface.py validate-modules:missing-suboption-docs +plugins/modules/cnos_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_interface.py validate-modules:undocumented-parameter +plugins/modules/cnos_l2_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_l2_interface.py validate-modules:doc-elements-mismatch +plugins/modules/cnos_l2_interface.py validate-modules:doc-missing-type +plugins/modules/cnos_l2_interface.py validate-modules:doc-required-mismatch +plugins/modules/cnos_l2_interface.py validate-modules:missing-suboption-docs +plugins/modules/cnos_l2_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_l2_interface.py validate-modules:undocumented-parameter +plugins/modules/cnos_l3_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_l3_interface.py validate-modules:doc-elements-mismatch +plugins/modules/cnos_l3_interface.py validate-modules:doc-missing-type +plugins/modules/cnos_l3_interface.py validate-modules:doc-required-mismatch +plugins/modules/cnos_l3_interface.py validate-modules:missing-suboption-docs +plugins/modules/cnos_l3_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_l3_interface.py validate-modules:undocumented-parameter +plugins/modules/cnos_linkagg.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_linkagg.py validate-modules:doc-elements-mismatch +plugins/modules/cnos_linkagg.py validate-modules:doc-missing-type +plugins/modules/cnos_linkagg.py validate-modules:doc-required-mismatch +plugins/modules/cnos_linkagg.py validate-modules:missing-suboption-docs +plugins/modules/cnos_linkagg.py validate-modules:parameter-list-no-elements +plugins/modules/cnos_linkagg.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_linkagg.py validate-modules:undocumented-parameter +plugins/modules/cnos_lldp.py validate-modules:doc-missing-type +plugins/modules/cnos_logging.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_logging.py validate-modules:doc-elements-mismatch +plugins/modules/cnos_logging.py validate-modules:doc-missing-type +plugins/modules/cnos_logging.py validate-modules:missing-suboption-docs +plugins/modules/cnos_logging.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_logging.py validate-modules:undocumented-parameter +plugins/modules/cnos_reload.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_reload.py validate-modules:doc-required-mismatch +plugins/modules/cnos_rollback.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_rollback.py validate-modules:doc-missing-type +plugins/modules/cnos_rollback.py validate-modules:doc-required-mismatch +plugins/modules/cnos_rollback.py validate-modules:nonexistent-parameter-documented +plugins/modules/cnos_rollback.py validate-modules:undocumented-parameter +plugins/modules/cnos_save.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_save.py validate-modules:doc-required-mismatch +plugins/modules/cnos_showrun.py validate-modules:doc-required-mismatch +plugins/modules/cnos_showrun.py validate-modules:nonexistent-parameter-documented +plugins/modules/cnos_static_route.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_static_route.py validate-modules:doc-elements-mismatch +plugins/modules/cnos_static_route.py validate-modules:doc-missing-type +plugins/modules/cnos_static_route.py validate-modules:doc-required-mismatch +plugins/modules/cnos_static_route.py validate-modules:missing-suboption-docs +plugins/modules/cnos_static_route.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_static_route.py validate-modules:undocumented-parameter +plugins/modules/cnos_system.py validate-modules:doc-missing-type +plugins/modules/cnos_system.py validate-modules:parameter-list-no-elements +plugins/modules/cnos_system.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_template.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_template.py validate-modules:doc-missing-type +plugins/modules/cnos_template.py validate-modules:doc-required-mismatch +plugins/modules/cnos_user.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_user.py validate-modules:doc-elements-mismatch +plugins/modules/cnos_user.py validate-modules:doc-missing-type +plugins/modules/cnos_user.py validate-modules:missing-suboption-docs +plugins/modules/cnos_user.py validate-modules:parameter-list-no-elements +plugins/modules/cnos_user.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_user.py validate-modules:undocumented-parameter +plugins/modules/cnos_vlag.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_vlag.py validate-modules:doc-missing-type +plugins/modules/cnos_vlag.py validate-modules:doc-required-mismatch +plugins/modules/cnos_vlan.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_vlan.py validate-modules:doc-elements-mismatch +plugins/modules/cnos_vlan.py validate-modules:doc-missing-type +plugins/modules/cnos_vlan.py validate-modules:doc-required-mismatch +plugins/modules/cnos_vlan.py validate-modules:missing-suboption-docs +plugins/modules/cnos_vlan.py validate-modules:parameter-list-no-elements +plugins/modules/cnos_vlan.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_vlan.py validate-modules:undocumented-parameter +plugins/modules/cnos_vrf.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/cnos_vrf.py validate-modules:doc-elements-mismatch +plugins/modules/cnos_vrf.py validate-modules:doc-missing-type +plugins/modules/cnos_vrf.py validate-modules:doc-required-mismatch +plugins/modules/cnos_vrf.py validate-modules:missing-suboption-docs +plugins/modules/cnos_vrf.py validate-modules:parameter-list-no-elements +plugins/modules/cnos_vrf.py validate-modules:parameter-type-not-in-doc +plugins/modules/cnos_vrf.py validate-modules:undocumented-parameter +plugins/modules/nclu.py validate-modules:parameter-list-no-elements +plugins/modules/nclu.py validate-modules:parameter-type-not-in-doc +plugins/modules/edgeos_command.py validate-modules:doc-missing-type +plugins/modules/edgeos_command.py validate-modules:parameter-list-no-elements +plugins/modules/edgeos_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/edgeos_config.py validate-modules:doc-missing-type +plugins/modules/edgeos_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/edgeos_facts.py validate-modules:parameter-list-no-elements +plugins/modules/edgeos_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/edgeswitch_facts.py validate-modules:parameter-list-no-elements +plugins/modules/edgeswitch_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/edgeswitch_vlan.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/edgeswitch_vlan.py validate-modules:doc-elements-mismatch +plugins/modules/edgeswitch_vlan.py validate-modules:doc-missing-type +plugins/modules/edgeswitch_vlan.py validate-modules:doc-required-mismatch +plugins/modules/edgeswitch_vlan.py validate-modules:missing-suboption-docs +plugins/modules/edgeswitch_vlan.py validate-modules:parameter-list-no-elements +plugins/modules/edgeswitch_vlan.py validate-modules:parameter-type-not-in-doc +plugins/modules/edgeswitch_vlan.py validate-modules:undocumented-parameter +plugins/modules/enos_command.py validate-modules:doc-missing-type +plugins/modules/enos_command.py validate-modules:nonexistent-parameter-documented +plugins/modules/enos_command.py validate-modules:parameter-list-no-elements +plugins/modules/enos_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/enos_config.py validate-modules:doc-missing-type +plugins/modules/enos_config.py validate-modules:nonexistent-parameter-documented +plugins/modules/enos_config.py validate-modules:parameter-list-no-elements +plugins/modules/enos_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/enos_facts.py validate-modules:nonexistent-parameter-documented +plugins/modules/enos_facts.py validate-modules:parameter-list-no-elements +plugins/modules/enos_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/eric_eccli_command.py validate-modules:parameter-list-no-elements +plugins/modules/exos_command.py validate-modules:doc-missing-type +plugins/modules/exos_command.py validate-modules:parameter-list-no-elements +plugins/modules/exos_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/exos_config.py validate-modules:doc-missing-type +plugins/modules/exos_config.py validate-modules:parameter-list-no-elements +plugins/modules/exos_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/exos_facts.py validate-modules:parameter-list-no-elements +plugins/modules/exos_l2_interfaces.py validate-modules:parameter-list-no-elements +plugins/modules/icx_command.py validate-modules:parameter-list-no-elements +plugins/modules/icx_config.py validate-modules:parameter-list-no-elements +plugins/modules/icx_facts.py validate-modules:parameter-list-no-elements +plugins/modules/icx_interface.py validate-modules:doc-required-mismatch +plugins/modules/icx_l3_interface.py validate-modules:doc-required-mismatch +plugins/modules/icx_linkagg.py validate-modules:doc-elements-mismatch +plugins/modules/icx_linkagg.py validate-modules:doc-required-mismatch +plugins/modules/icx_linkagg.py validate-modules:parameter-list-no-elements +plugins/modules/icx_lldp.py validate-modules:doc-elements-mismatch +plugins/modules/icx_lldp.py validate-modules:parameter-list-no-elements +plugins/modules/icx_logging.py validate-modules:doc-elements-mismatch +plugins/modules/icx_logging.py validate-modules:parameter-list-no-elements +plugins/modules/icx_static_route.py validate-modules:doc-required-mismatch +plugins/modules/icx_system.py validate-modules:doc-elements-mismatch +plugins/modules/icx_system.py validate-modules:parameter-list-no-elements +plugins/modules/icx_user.py validate-modules:doc-required-mismatch +plugins/modules/icx_vlan.py validate-modules:doc-elements-mismatch +plugins/modules/icx_vlan.py validate-modules:doc-required-mismatch +plugins/modules/icx_vlan.py validate-modules:parameter-list-no-elements +plugins/modules/dladm_etherstub.py validate-modules:doc-missing-type +plugins/modules/dladm_iptun.py validate-modules:doc-missing-type +plugins/modules/dladm_iptun.py validate-modules:parameter-type-not-in-doc +plugins/modules/dladm_linkprop.py validate-modules:doc-missing-type +plugins/modules/dladm_linkprop.py validate-modules:no-default-for-required-parameter +plugins/modules/dladm_linkprop.py validate-modules:parameter-type-not-in-doc +plugins/modules/dladm_vlan.py validate-modules:doc-default-does-not-match-spec +plugins/modules/dladm_vlan.py validate-modules:doc-missing-type +plugins/modules/dladm_vlan.py validate-modules:doc-required-mismatch +plugins/modules/dladm_vlan.py validate-modules:parameter-type-not-in-doc +plugins/modules/dladm_vnic.py validate-modules:doc-default-does-not-match-spec +plugins/modules/flowadm.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/flowadm.py validate-modules:doc-missing-type +plugins/modules/ipadm_addr.py validate-modules:doc-missing-type +plugins/modules/ipadm_addr.py validate-modules:parameter-type-not-in-doc +plugins/modules/ipadm_addrprop.py validate-modules:doc-missing-type +plugins/modules/ipadm_addrprop.py validate-modules:no-default-for-required-parameter +plugins/modules/ipadm_if.py validate-modules:doc-missing-type +plugins/modules/ipadm_ifprop.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/ipadm_ifprop.py validate-modules:doc-missing-type +plugins/modules/ipadm_ifprop.py validate-modules:no-default-for-required-parameter +plugins/modules/ipadm_prop.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/ipadm_prop.py validate-modules:doc-missing-type +plugins/modules/ig_config.py validate-modules:doc-missing-type +plugins/modules/ig_config.py validate-modules:doc-required-mismatch +plugins/modules/ig_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/ig_config.py validate-modules:return-syntax-error +plugins/modules/ig_unit_information.py validate-modules:doc-required-mismatch +plugins/modules/ig_unit_information.py validate-modules:parameter-type-not-in-doc +plugins/modules/ironware_command.py validate-modules:doc-missing-type +plugins/modules/ironware_command.py validate-modules:nonexistent-parameter-documented +plugins/modules/ironware_command.py validate-modules:parameter-list-no-elements +plugins/modules/ironware_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/ironware_config.py validate-modules:doc-missing-type +plugins/modules/ironware_config.py validate-modules:nonexistent-parameter-documented +plugins/modules/ironware_config.py validate-modules:parameter-list-no-elements +plugins/modules/ironware_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/ironware_facts.py validate-modules:nonexistent-parameter-documented +plugins/modules/ironware_facts.py validate-modules:parameter-list-no-elements +plugins/modules/ironware_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/iap_start_workflow.py validate-modules:doc-required-mismatch +plugins/modules/iap_token.py validate-modules:parameter-type-not-in-doc +plugins/modules/netact_cm_command.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/netact_cm_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_cs_action.py pylint:condition-evals-to-constant # Should be fixed +plugins/modules/netscaler_cs_action.py validate-modules:nonexistent-parameter-documented +plugins/modules/netscaler_cs_action.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_cs_policy.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_cs_vserver.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/netscaler_cs_vserver.py validate-modules:nonexistent-parameter-documented +plugins/modules/netscaler_cs_vserver.py validate-modules:parameter-list-no-elements +plugins/modules/netscaler_cs_vserver.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_cs_vserver.py validate-modules:undocumented-parameter +plugins/modules/netscaler_gslb_service.py validate-modules:parameter-list-no-elements +plugins/modules/netscaler_gslb_service.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_gslb_site.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_gslb_vserver.py validate-modules:parameter-list-no-elements +plugins/modules/netscaler_gslb_vserver.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_gslb_vserver.py validate-modules:undocumented-parameter +plugins/modules/netscaler_lb_monitor.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/netscaler_lb_monitor.py validate-modules:nonexistent-parameter-documented +plugins/modules/netscaler_lb_monitor.py validate-modules:parameter-list-no-elements +plugins/modules/netscaler_lb_monitor.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_lb_vserver.py validate-modules:nonexistent-parameter-documented +plugins/modules/netscaler_lb_vserver.py validate-modules:parameter-list-no-elements +plugins/modules/netscaler_lb_vserver.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_nitro_request.py pylint:ansible-bad-function +plugins/modules/netscaler_nitro_request.py validate-modules:doc-missing-type +plugins/modules/netscaler_nitro_request.py validate-modules:doc-required-mismatch +plugins/modules/netscaler_nitro_request.py validate-modules:parameter-list-no-elements +plugins/modules/netscaler_nitro_request.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_save_config.py validate-modules:doc-missing-type +plugins/modules/netscaler_save_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_server.py validate-modules:doc-default-does-not-match-spec +plugins/modules/netscaler_server.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_service.py validate-modules:nonexistent-parameter-documented +plugins/modules/netscaler_service.py validate-modules:parameter-list-no-elements +plugins/modules/netscaler_service.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_servicegroup.py validate-modules:parameter-list-no-elements +plugins/modules/netscaler_servicegroup.py validate-modules:parameter-type-not-in-doc +plugins/modules/netscaler_ssl_certkey.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_access_list.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_access_list.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_access_list_ip.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_access_list_ip.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_admin_service.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_admin_session_timeout.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_admin_syslog.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_connection_stats_settings.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_cpu_class.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_cpu_class.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_cpu_mgmt_class.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_dhcp_filter.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_dscp_map.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_dscp_map.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_dscp_map_pri_map.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_fabric_local.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_fabric_local.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_igmp_snooping.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_igmp_snooping.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_ipv6security_raguard.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_ipv6security_raguard_port.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_ipv6security_raguard_vlan.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_log_audit_exception.py validate-modules:doc-required-mismatch +plugins/modules/pn_log_audit_exception.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_port_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_port_config.py validate-modules:required_one_of-unknown +plugins/modules/pn_port_cos_bw.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_port_cos_rate_setting.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_prefix_list.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_prefix_list_network.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_role.py validate-modules:doc-required-mismatch +plugins/modules/pn_role.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_snmp_community.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_snmp_community.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_snmp_trap_sink.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_snmp_vacm.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_stp.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_stp_port.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_switch_setup.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_user.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vflow_table_profile.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vrouter_bgp.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vrouter_bgp.py validate-modules:parameter-type-not-in-doc +plugins/modules/pn_vrouter_bgp_network.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vrouter_interface_ip.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vrouter_loopback_interface.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vrouter_ospf.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vrouter_ospf6.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vrouter_packet_relay.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vrouter_pim_config.py validate-modules:doc-required-mismatch +plugins/modules/pn_vrouter_pim_config.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/pn_vtep.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/nos_command.py validate-modules:doc-missing-type +plugins/modules/nos_command.py validate-modules:parameter-list-no-elements +plugins/modules/nos_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/nos_config.py validate-modules:doc-missing-type +plugins/modules/nos_config.py validate-modules:parameter-list-no-elements +plugins/modules/nos_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/nos_facts.py validate-modules:parameter-list-no-elements +plugins/modules/nos_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/nuage_vspk.py validate-modules:doc-required-mismatch +plugins/modules/nuage_vspk.py validate-modules:missing-suboption-docs +plugins/modules/nuage_vspk.py validate-modules:parameter-list-no-elements +plugins/modules/nuage_vspk.py validate-modules:parameter-type-not-in-doc +plugins/modules/nuage_vspk.py validate-modules:undocumented-parameter +plugins/modules/opx_cps.py validate-modules:doc-required-mismatch +plugins/modules/opx_cps.py validate-modules:parameter-type-not-in-doc +plugins/modules/ordnance_config.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ordnance_config.py validate-modules:doc-missing-type +plugins/modules/ordnance_config.py validate-modules:doc-required-mismatch +plugins/modules/ordnance_config.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/ordnance_config.py validate-modules:parameter-list-no-elements +plugins/modules/ordnance_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/ordnance_config.py validate-modules:undocumented-parameter +plugins/modules/ordnance_facts.py validate-modules:doc-default-does-not-match-spec +plugins/modules/ordnance_facts.py validate-modules:doc-missing-type +plugins/modules/ordnance_facts.py validate-modules:doc-required-mismatch +plugins/modules/ordnance_facts.py validate-modules:invalid-ansiblemodule-schema +plugins/modules/ordnance_facts.py validate-modules:parameter-list-no-elements +plugins/modules/ordnance_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/ordnance_facts.py validate-modules:undocumented-parameter +plugins/modules/vdirect_commit.py validate-modules:doc-missing-type +plugins/modules/vdirect_commit.py validate-modules:parameter-list-no-elements +plugins/modules/vdirect_commit.py validate-modules:parameter-type-not-in-doc +plugins/modules/vdirect_file.py validate-modules:doc-missing-type +plugins/modules/vdirect_file.py validate-modules:parameter-type-not-in-doc +plugins/modules/vdirect_runnable.py validate-modules:doc-missing-type +plugins/modules/vdirect_runnable.py validate-modules:parameter-type-not-in-doc +plugins/modules/slxos_command.py validate-modules:doc-missing-type +plugins/modules/slxos_command.py validate-modules:parameter-list-no-elements +plugins/modules/slxos_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/slxos_config.py validate-modules:doc-missing-type +plugins/modules/slxos_config.py validate-modules:parameter-list-no-elements +plugins/modules/slxos_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/slxos_facts.py validate-modules:parameter-list-no-elements +plugins/modules/slxos_facts.py validate-modules:parameter-type-not-in-doc +plugins/modules/slxos_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/slxos_interface.py validate-modules:doc-elements-mismatch +plugins/modules/slxos_interface.py validate-modules:doc-missing-type +plugins/modules/slxos_interface.py validate-modules:doc-required-mismatch +plugins/modules/slxos_interface.py validate-modules:missing-suboption-docs +plugins/modules/slxos_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/slxos_interface.py validate-modules:undocumented-parameter +plugins/modules/slxos_l2_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/slxos_l2_interface.py validate-modules:doc-elements-mismatch +plugins/modules/slxos_l2_interface.py validate-modules:doc-missing-type +plugins/modules/slxos_l2_interface.py validate-modules:doc-required-mismatch +plugins/modules/slxos_l2_interface.py validate-modules:missing-suboption-docs +plugins/modules/slxos_l2_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/slxos_l2_interface.py validate-modules:undocumented-parameter +plugins/modules/slxos_l3_interface.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/slxos_l3_interface.py validate-modules:doc-elements-mismatch +plugins/modules/slxos_l3_interface.py validate-modules:doc-missing-type +plugins/modules/slxos_l3_interface.py validate-modules:doc-required-mismatch +plugins/modules/slxos_l3_interface.py validate-modules:missing-suboption-docs +plugins/modules/slxos_l3_interface.py validate-modules:parameter-type-not-in-doc +plugins/modules/slxos_l3_interface.py validate-modules:undocumented-parameter +plugins/modules/slxos_linkagg.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/slxos_linkagg.py validate-modules:doc-elements-mismatch +plugins/modules/slxos_linkagg.py validate-modules:doc-missing-type +plugins/modules/slxos_linkagg.py validate-modules:doc-required-mismatch +plugins/modules/slxos_linkagg.py validate-modules:missing-suboption-docs +plugins/modules/slxos_linkagg.py validate-modules:parameter-list-no-elements +plugins/modules/slxos_linkagg.py validate-modules:parameter-type-not-in-doc +plugins/modules/slxos_linkagg.py validate-modules:undocumented-parameter +plugins/modules/slxos_lldp.py validate-modules:doc-missing-type +plugins/modules/slxos_vlan.py validate-modules:doc-choices-do-not-match-spec +plugins/modules/slxos_vlan.py validate-modules:doc-elements-mismatch +plugins/modules/slxos_vlan.py validate-modules:doc-missing-type +plugins/modules/slxos_vlan.py validate-modules:doc-required-mismatch +plugins/modules/slxos_vlan.py validate-modules:missing-suboption-docs +plugins/modules/slxos_vlan.py validate-modules:parameter-list-no-elements +plugins/modules/slxos_vlan.py validate-modules:parameter-type-not-in-doc +plugins/modules/slxos_vlan.py validate-modules:undocumented-parameter +plugins/modules/sros_command.py validate-modules:collection-deprecated-version +plugins/modules/sros_command.py validate-modules:doc-missing-type +plugins/modules/sros_command.py validate-modules:parameter-list-no-elements +plugins/modules/sros_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/sros_config.py validate-modules:collection-deprecated-version +plugins/modules/sros_config.py validate-modules:doc-missing-type +plugins/modules/sros_config.py validate-modules:nonexistent-parameter-documented +plugins/modules/sros_config.py validate-modules:parameter-list-no-elements +plugins/modules/sros_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/sros_rollback.py validate-modules:collection-deprecated-version +plugins/modules/sros_rollback.py validate-modules:doc-missing-type +plugins/modules/sros_rollback.py validate-modules:parameter-type-not-in-doc +plugins/modules/voss_command.py validate-modules:doc-missing-type +plugins/modules/voss_command.py validate-modules:parameter-list-no-elements +plugins/modules/voss_command.py validate-modules:parameter-type-not-in-doc +plugins/modules/voss_config.py validate-modules:doc-missing-type +plugins/modules/voss_config.py validate-modules:parameter-list-no-elements +plugins/modules/voss_config.py validate-modules:parameter-type-not-in-doc +plugins/modules/voss_facts.py validate-modules:parameter-list-no-elements +plugins/modules/voss_facts.py validate-modules:parameter-type-not-in-doc +tests/unit/plugins/modules/test_edgeswitch_facts.py pylint:use-maxsplit-arg +tests/unit/plugins/modules/test_edgeswitch_vlan.py pylint:use-maxsplit-arg +tests/unit/plugins/modules/test_icx_ping.py pylint:use-maxsplit-arg +tests/unit/plugins/modules/test_ironware_config.py pylint:arguments-renamed +tests/unit/plugins/modules/test_ironware_facts.py pylint:use-maxsplit-arg +tests/unit/plugins/modules/test_netscaler_cs_action.py pylint:invalid-class-object +tests/unit/plugins/modules/test_netscaler_cs_vserver.py pylint:invalid-class-object +tests/unit/plugins/modules/test_netscaler_lb_vserver.py pylint:invalid-class-object +tests/unit/plugins/modules/test_netscaler_server.py pylint:invalid-class-object +tests/unit/plugins/modules/test_netscaler_service.py pylint:invalid-class-object +tests/unit/plugins/modules/test_netscaler_servicegroup.py pylint:invalid-class-object +tests/unit/plugins/modules/test_netscaler_ssl_certkey.py pylint:invalid-class-object +tests/unit/plugins/modules/test_nos_facts.py pylint:use-maxsplit-arg +tests/unit/plugins/modules/test_slxos_facts.py pylint:use-maxsplit-arg +tests/unit/plugins/modules/test_voss_facts.py pylint:use-maxsplit-arg +plugins/action/aireos.py pylint:unused-import +plugins/action/aruba.py pylint:unused-import +plugins/action/ce.py pylint:unused-import +plugins/action/cnos.py pylint:unused-import +plugins/action/enos.py pylint:unused-import +plugins/action/ironware.py pylint:unused-import +plugins/action/sros.py pylint:unused-import +plugins/cliconf/aireos.py pylint:unused-import +plugins/cliconf/apconos.py pylint:unused-import +plugins/cliconf/aruba.py pylint:unused-import +plugins/cliconf/cnos.py pylint:unused-import +plugins/cliconf/edgeswitch.py pylint:unused-import +plugins/cliconf/eric_eccli.py pylint:unused-import +plugins/cliconf/exos.py pylint:unused-import +plugins/cliconf/icx.py pylint:unused-import +plugins/cliconf/ironware.py pylint:unused-import +plugins/cliconf/slxos.py pylint:unused-import +plugins/cliconf/voss.py pylint:unused-import +plugins/cliconf/weos4.py pylint:unused-import +plugins/lookup/avi.py pylint:unused-import +plugins/module_utils/network/aos/aos.py pylint:unused-import +plugins/module_utils/network/avi/ansible_utils.py pylint:unused-import +plugins/module_utils/network/avi/ansible_utils.py pylint:unidiomatic-typecheck +plugins/module_utils/network/avi/avi.py pylint:unused-import +plugins/module_utils/network/avi/avi_api.py pylint:unidiomatic-typecheck +plugins/module_utils/network/cloudengine/ce.py pylint:unused-import +plugins/module_utils/network/cnos/cnos.py pylint:unused-import +plugins/module_utils/network/eric_eccli/eric_eccli.py pylint:unused-import +plugins/module_utils/network/exos/config/lldp_interfaces/lldp_interfaces.py pylint:unused-import +plugins/module_utils/network/exos/exos.py pylint:unused-import +plugins/module_utils/network/exos/facts/facts.py pylint:unused-import +plugins/module_utils/network/exos/facts/l2_interfaces/l2_interfaces.py pylint:unused-import +plugins/module_utils/network/exos/facts/legacy/base.py pylint:unused-import +plugins/module_utils/network/exos/facts/lldp_global/lldp_global.py pylint:unused-import +plugins/module_utils/network/exos/facts/lldp_interfaces/lldp_interfaces.py pylint:unused-import +plugins/module_utils/network/exos/facts/vlans/vlans.py pylint:unused-import +plugins/module_utils/network/ftd/common.py pylint:unidiomatic-typecheck +plugins/module_utils/network/ftd/configuration.py pylint:use-yield-from +plugins/module_utils/network/icx/icx.py pylint:unused-import +plugins/module_utils/network/ironware/ironware.py pylint:unused-import +plugins/module_utils/network/netscaler/netscaler.py pylint:unused-import +plugins/module_utils/network/slxos/slxos.py pylint:unused-import +plugins/module_utils/network/sros/sros.py pylint:unused-import +plugins/module_utils/version.py pylint:unused-import +plugins/modules/avi_api_version.py pylint:unused-import +plugins/modules/avi_gslbservice_patch_member.py pylint:unused-import +plugins/modules/avi_user.py pylint:unused-import +plugins/modules/avi_useraccount.py pylint:unused-import +plugins/modules/ce_acl_interface.py pylint:unused-import +plugins/modules/ce_bfd_global.py pylint:unused-import +plugins/modules/ce_bfd_session.py pylint:unused-import +plugins/modules/ce_bfd_view.py pylint:unused-import +plugins/modules/ce_config.py pylint:unused-import +plugins/modules/ce_file_copy.py pylint:unused-import +plugins/modules/ce_interface.py pylint:unused-import +plugins/modules/ce_lldp.py pylint:unused-import +plugins/modules/ce_lldp_interface.py pylint:unused-import +plugins/modules/ce_mdn_interface.py pylint:unused-import +plugins/modules/ce_rollback.py pylint:unused-import +plugins/modules/ce_sflow.py pylint:unused-import +plugins/modules/ce_switchport.py pylint:unused-import +plugins/modules/cnos_backup.py pylint:unused-import +plugins/modules/cnos_banner.py pylint:unused-import +plugins/modules/cnos_bgp.py pylint:unused-import +plugins/modules/cnos_command.py pylint:unused-import +plugins/modules/cnos_conditional_command.py pylint:unused-import +plugins/modules/cnos_conditional_template.py pylint:unused-import +plugins/modules/cnos_factory.py pylint:unused-import +plugins/modules/cnos_image.py pylint:unused-import +plugins/modules/cnos_interface.py pylint:unused-import +plugins/modules/cnos_l2_interface.py pylint:unused-import +plugins/modules/cnos_lldp.py pylint:unused-import +plugins/modules/cnos_logging.py pylint:unused-import +plugins/modules/cnos_reload.py pylint:unused-import +plugins/modules/cnos_rollback.py pylint:unused-import +plugins/modules/cnos_save.py pylint:unused-import +plugins/modules/cnos_showrun.py pylint:unused-import +plugins/modules/cnos_static_route.py pylint:unused-import +plugins/modules/cnos_system.py pylint:unused-import +plugins/modules/cnos_template.py pylint:unused-import +plugins/modules/cnos_user.py pylint:unused-import +plugins/modules/cnos_vlag.py pylint:unused-import +plugins/modules/cnos_vlan.py pylint:unused-import +plugins/modules/cnos_vrf.py pylint:unused-import +plugins/modules/enos_command.py pylint:unused-import +plugins/modules/eric_eccli_command.py pylint:unused-import +plugins/modules/icx_banner.py pylint:unused-import +plugins/modules/icx_command.py pylint:unused-import +plugins/modules/icx_config.py pylint:unused-import +plugins/modules/icx_facts.py pylint:unused-import +plugins/modules/icx_interface.py pylint:unused-import +plugins/modules/icx_linkagg.py pylint:unused-import +plugins/modules/icx_logging.py pylint:unused-import +plugins/modules/icx_ping.py pylint:unused-import +plugins/modules/icx_static_route.py pylint:unused-import +plugins/modules/icx_system.py pylint:unused-import +plugins/modules/icx_user.py pylint:unused-import +plugins/modules/icx_vlan.py pylint:unused-import +plugins/modules/ordnance_config.py pylint:unused-import +plugins/modules/slxos_l3_interface.py pylint:unused-import +plugins/modules/sros_rollback.py pylint:unused-import +plugins/netconf/ce.py pylint:unused-import +plugins/terminal/aireos.py pylint:unused-import +plugins/terminal/apconos.py pylint:unused-import +plugins/terminal/aruba.py pylint:unused-import +plugins/terminal/eric_eccli.py pylint:unused-import +plugins/terminal/netvisor.py pylint:unused-import +plugins/terminal/weos4.py pylint:unused-import +tests/sanity/extra/botmeta.py pylint:unused-import +tests/unit/compat/builtins.py pylint:unused-import +tests/unit/compat/mock.py pylint:use-yield-from +tests/unit/mock/loader.py pylint:unidiomatic-typecheck +tests/unit/plugins/httpapi/test_ftd.py pylint:unidiomatic-typecheck +tests/unit/plugins/modules/test_apconos_command.py pylint:unused-import +tests/unit/plugins/modules/test_icx_logging.py pylint:unused-import +tests/unit/plugins/modules/test_icx_system.py pylint:unused-import +tests/unit/plugins/modules/test_pn_log_audit_exception.py pylint:unused-import +tests/unit/plugins/modules/test_pn_vtep.py pylint:unused-import diff --git a/ansible_collections/community/network/tests/utils/shippable/shippable.sh b/ansible_collections/community/network/tests/utils/shippable/shippable.sh index ad0bf940d..afe46650a 100755 --- a/ansible_collections/community/network/tests/utils/shippable/shippable.sh +++ b/ansible_collections/community/network/tests/utils/shippable/shippable.sh @@ -62,6 +62,7 @@ else retry pip install "https://github.com/ansible/ansible/archive/stable-${ansible_version}.tar.gz" --disable-pip-version-check fi +# shellcheck disable=SC2153 if [ "${SHIPPABLE_BUILD_ID:-}" ]; then export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible" SHIPPABLE_RESULT_DIR="$(pwd)/shippable" diff --git a/ansible_collections/community/routeros/.github/workflows/ansible-test.yml b/ansible_collections/community/routeros/.github/workflows/ansible-test.yml index f743ae51a..fa6241963 100644 --- a/ansible_collections/community/routeros/.github/workflows/ansible-test.yml +++ b/ansible_collections/community/routeros/.github/workflows/ansible-test.yml @@ -49,7 +49,9 @@ jobs: - name: Perform sanity testing uses: felixfontein/ansible-test-gh-action@main with: + ansible-core-github-repository-slug: ${{ contains(fromJson('["stable-2.9", "stable-2.10", "stable-2.11"]'), matrix.ansible) && 'ansible-community/eol-ansible' || 'ansible/ansible' }} ansible-core-version: ${{ matrix.ansible }} + codecov-token: ${{ secrets.CODECOV_TOKEN }} testing-type: sanity # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429) pre-test-cmd: |- @@ -89,7 +91,9 @@ jobs: Ansible version ${{ matrix.ansible }} uses: felixfontein/ansible-test-gh-action@main with: + ansible-core-github-repository-slug: ${{ contains(fromJson('["stable-2.9", "stable-2.10", "stable-2.11"]'), matrix.ansible) && 'ansible-community/eol-ansible' || 'ansible/ansible' }} ansible-core-version: ${{ matrix.ansible }} + codecov-token: ${{ secrets.CODECOV_TOKEN }} testing-type: units # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429) pre-test-cmd: |- @@ -156,7 +160,9 @@ jobs: under Python ${{ matrix.python }} uses: felixfontein/ansible-test-gh-action@main with: + ansible-core-github-repository-slug: ${{ contains(fromJson('["stable-2.9", "stable-2.10", "stable-2.11"]'), matrix.ansible) && 'ansible-community/eol-ansible' || 'ansible/ansible' }} ansible-core-version: ${{ matrix.ansible }} + codecov-token: ${{ secrets.CODECOV_TOKEN }} integration-continue-on-error: 'false' integration-diff: 'false' integration-retry-on-error: 'true' diff --git a/ansible_collections/community/routeros/.github/workflows/ee.yml b/ansible_collections/community/routeros/.github/workflows/ee.yml index 523efaf58..67735c394 100644 --- a/ansible_collections/community/routeros/.github/workflows/ee.yml +++ b/ansible_collections/community/routeros/.github/workflows/ee.yml @@ -70,14 +70,6 @@ jobs: package_system: python39 python39-pip python39-wheel python39-cryptography base_image: docker.io/redhat/ubi8:latest pre_base: '"#"' - - name: ansible-core 2.12 @ CentOS Stream 8 - ansible_core: https://github.com/ansible/ansible/archive/stable-2.12.tar.gz - ansible_runner: ansible-runner - other_deps: |2 - python_interpreter: - package_system: python39 python39-pip python39-wheel python39-cryptography - base_image: quay.io/centos/centos:stream8 - pre_base: '"#"' runs-on: ubuntu-latest steps: - name: Check out code diff --git a/ansible_collections/community/routeros/CHANGELOG.md b/ansible_collections/community/routeros/CHANGELOG.md index adb4f7420..a17b8fcb8 100644 --- a/ansible_collections/community/routeros/CHANGELOG.md +++ b/ansible_collections/community/routeros/CHANGELOG.md @@ -2,109 +2,112 @@ **Topics** -- <a href="#v2-15-0">v2\.15\.0</a> +- <a href="#v2-16-0">v2\.16\.0</a> - <a href="#release-summary">Release Summary</a> - <a href="#minor-changes">Minor Changes</a> -- <a href="#v2-14-0">v2\.14\.0</a> +- <a href="#v2-15-0">v2\.15\.0</a> - <a href="#release-summary-1">Release Summary</a> - <a href="#minor-changes-1">Minor Changes</a> -- <a href="#v2-13-0">v2\.13\.0</a> +- <a href="#v2-14-0">v2\.14\.0</a> - <a href="#release-summary-2">Release Summary</a> - <a href="#minor-changes-2">Minor Changes</a> - - <a href="#bugfixes">Bugfixes</a> -- <a href="#v2-12-0">v2\.12\.0</a> +- <a href="#v2-13-0">v2\.13\.0</a> - <a href="#release-summary-3">Release Summary</a> - <a href="#minor-changes-3">Minor Changes</a> -- <a href="#v2-11-0">v2\.11\.0</a> + - <a href="#bugfixes">Bugfixes</a> +- <a href="#v2-12-0">v2\.12\.0</a> - <a href="#release-summary-4">Release Summary</a> - <a href="#minor-changes-4">Minor Changes</a> -- <a href="#v2-10-0">v2\.10\.0</a> +- <a href="#v2-11-0">v2\.11\.0</a> - <a href="#release-summary-5">Release Summary</a> - <a href="#minor-changes-5">Minor Changes</a> - - <a href="#bugfixes-1">Bugfixes</a> -- <a href="#v2-9-0">v2\.9\.0</a> +- <a href="#v2-10-0">v2\.10\.0</a> - <a href="#release-summary-6">Release Summary</a> - <a href="#minor-changes-6">Minor Changes</a> + - <a href="#bugfixes-1">Bugfixes</a> +- <a href="#v2-9-0">v2\.9\.0</a> + - <a href="#release-summary-7">Release Summary</a> + - <a href="#minor-changes-7">Minor Changes</a> - <a href="#bugfixes-2">Bugfixes</a> - <a href="#v2-8-3">v2\.8\.3</a> - - <a href="#release-summary-7">Release Summary</a> + - <a href="#release-summary-8">Release Summary</a> - <a href="#known-issues">Known Issues</a> - <a href="#v2-8-2">v2\.8\.2</a> - - <a href="#release-summary-8">Release Summary</a> + - <a href="#release-summary-9">Release Summary</a> - <a href="#bugfixes-3">Bugfixes</a> - <a href="#v2-8-1">v2\.8\.1</a> - - <a href="#release-summary-9">Release Summary</a> + - <a href="#release-summary-10">Release Summary</a> - <a href="#bugfixes-4">Bugfixes</a> - <a href="#v2-8-0">v2\.8\.0</a> - - <a href="#release-summary-10">Release Summary</a> - - <a href="#minor-changes-7">Minor Changes</a> - - <a href="#bugfixes-5">Bugfixes</a> -- <a href="#v2-7-0">v2\.7\.0</a> - <a href="#release-summary-11">Release Summary</a> - <a href="#minor-changes-8">Minor Changes</a> - - <a href="#bugfixes-6">Bugfixes</a> -- <a href="#v2-6-0">v2\.6\.0</a> + - <a href="#bugfixes-5">Bugfixes</a> +- <a href="#v2-7-0">v2\.7\.0</a> - <a href="#release-summary-12">Release Summary</a> - <a href="#minor-changes-9">Minor Changes</a> - - <a href="#bugfixes-7">Bugfixes</a> -- <a href="#v2-5-0">v2\.5\.0</a> + - <a href="#bugfixes-6">Bugfixes</a> +- <a href="#v2-6-0">v2\.6\.0</a> - <a href="#release-summary-13">Release Summary</a> - <a href="#minor-changes-10">Minor Changes</a> - - <a href="#bugfixes-8">Bugfixes</a> -- <a href="#v2-4-0">v2\.4\.0</a> + - <a href="#bugfixes-7">Bugfixes</a> +- <a href="#v2-5-0">v2\.5\.0</a> - <a href="#release-summary-14">Release Summary</a> - <a href="#minor-changes-11">Minor Changes</a> + - <a href="#bugfixes-8">Bugfixes</a> +- <a href="#v2-4-0">v2\.4\.0</a> + - <a href="#release-summary-15">Release Summary</a> + - <a href="#minor-changes-12">Minor Changes</a> - <a href="#bugfixes-9">Bugfixes</a> - <a href="#known-issues-1">Known Issues</a> - <a href="#v2-3-1">v2\.3\.1</a> - - <a href="#release-summary-15">Release Summary</a> + - <a href="#release-summary-16">Release Summary</a> - <a href="#known-issues-2">Known Issues</a> - <a href="#v2-3-0">v2\.3\.0</a> - - <a href="#release-summary-16">Release Summary</a> - - <a href="#minor-changes-12">Minor Changes</a> + - <a href="#release-summary-17">Release Summary</a> + - <a href="#minor-changes-13">Minor Changes</a> - <a href="#bugfixes-10">Bugfixes</a> - <a href="#v2-2-1">v2\.2\.1</a> - - <a href="#release-summary-17">Release Summary</a> + - <a href="#release-summary-18">Release Summary</a> - <a href="#bugfixes-11">Bugfixes</a> - <a href="#v2-2-0">v2\.2\.0</a> - - <a href="#release-summary-18">Release Summary</a> - - <a href="#minor-changes-13">Minor Changes</a> + - <a href="#release-summary-19">Release Summary</a> + - <a href="#minor-changes-14">Minor Changes</a> - <a href="#bugfixes-12">Bugfixes</a> - <a href="#new-modules">New Modules</a> - <a href="#v2-1-0">v2\.1\.0</a> - - <a href="#release-summary-19">Release Summary</a> - - <a href="#minor-changes-14">Minor Changes</a> + - <a href="#release-summary-20">Release Summary</a> + - <a href="#minor-changes-15">Minor Changes</a> - <a href="#bugfixes-13">Bugfixes</a> - <a href="#new-modules-1">New Modules</a> - <a href="#v2-0-0">v2\.0\.0</a> - - <a href="#release-summary-20">Release Summary</a> - - <a href="#minor-changes-15">Minor Changes</a> + - <a href="#release-summary-21">Release Summary</a> + - <a href="#minor-changes-16">Minor Changes</a> - <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a> - <a href="#bugfixes-14">Bugfixes</a> - <a href="#new-plugins">New Plugins</a> - <a href="#filter">Filter</a> - <a href="#v1-2-0">v1\.2\.0</a> - - <a href="#release-summary-21">Release Summary</a> - - <a href="#minor-changes-16">Minor Changes</a> - - <a href="#bugfixes-15">Bugfixes</a> -- <a href="#v1-1-0">v1\.1\.0</a> - <a href="#release-summary-22">Release Summary</a> - <a href="#minor-changes-17">Minor Changes</a> -- <a href="#v1-0-1">v1\.0\.1</a> + - <a href="#bugfixes-15">Bugfixes</a> +- <a href="#v1-1-0">v1\.1\.0</a> - <a href="#release-summary-23">Release Summary</a> + - <a href="#minor-changes-18">Minor Changes</a> +- <a href="#v1-0-1">v1\.0\.1</a> + - <a href="#release-summary-24">Release Summary</a> - <a href="#bugfixes-16">Bugfixes</a> - <a href="#v1-0-0">v1\.0\.0</a> - - <a href="#release-summary-24">Release Summary</a> + - <a href="#release-summary-25">Release Summary</a> - <a href="#bugfixes-17">Bugfixes</a> - <a href="#v0-1-1">v0\.1\.1</a> - - <a href="#release-summary-25">Release Summary</a> + - <a href="#release-summary-26">Release Summary</a> - <a href="#bugfixes-18">Bugfixes</a> - <a href="#v0-1-0">v0\.1\.0</a> - - <a href="#release-summary-26">Release Summary</a> - - <a href="#minor-changes-18">Minor Changes</a> + - <a href="#release-summary-27">Release Summary</a> + - <a href="#minor-changes-19">Minor Changes</a> -<a id="v2-15-0"></a> -## v2\.15\.0 +<a id="v2-16-0"></a> +## v2\.16\.0 <a id="release-summary"></a> ### Release Summary @@ -114,6 +117,20 @@ Feature release\. <a id="minor-changes"></a> ### Minor Changes +* api\_info\, api\_modify \- add missing path <code>/ppp secret</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/286](https\://github\.com/ansible\-collections/community\.routeros/pull/286)\)\. +* api\_info\, api\_modify \- minor changes <code>/interface ethernet</code> path fields \([https\://github\.com/ansible\-collections/community\.routeros/pull/288](https\://github\.com/ansible\-collections/community\.routeros/pull/288)\)\. + +<a id="v2-15-0"></a> +## v2\.15\.0 + +<a id="release-summary-1"></a> +### Release Summary + +Feature release\. + +<a id="minor-changes-1"></a> +### Minor Changes + * api\_info\, api\_modify \- Add RouterOS 7\.x support to <code>/mpls ldp</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/271](https\://github\.com/ansible\-collections/community\.routeros/pull/271)\)\. * api\_info\, api\_modify \- add <code>/ip route rule</code> path for RouterOS 6\.x \([https\://github\.com/ansible\-collections/community\.routeros/pull/278](https\://github\.com/ansible\-collections/community\.routeros/pull/278)\)\. * api\_info\, api\_modify \- add <code>/routing filter</code> path for RouterOS 6\.x \([https\://github\.com/ansible\-collections/community\.routeros/pull/279](https\://github\.com/ansible\-collections/community\.routeros/pull/279)\)\. @@ -128,12 +145,12 @@ Feature release\. <a id="v2-14-0"></a> ## v2\.14\.0 -<a id="release-summary-1"></a> +<a id="release-summary-2"></a> ### Release Summary Feature release\. -<a id="minor-changes-1"></a> +<a id="minor-changes-2"></a> ### Minor Changes * api\_info\, api\_modify \- add read\-only fields <code>installed\-version</code>\, <code>latest\-version</code> and <code>status</code> in <code>system package update</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/263](https\://github\.com/ansible\-collections/community\.routeros/pull/263)\)\. @@ -143,12 +160,12 @@ Feature release\. <a id="v2-13-0"></a> ## v2\.13\.0 -<a id="release-summary-2"></a> +<a id="release-summary-3"></a> ### Release Summary Bugfix and feature release\. -<a id="minor-changes-2"></a> +<a id="minor-changes-3"></a> ### Minor Changes * api\_info\, api\_modify \- make path <code>user group</code> modifiable and add <code>comment</code> attribute \([https\://github\.com/ansible\-collections/community\.routeros/issues/256](https\://github\.com/ansible\-collections/community\.routeros/issues/256)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/257](https\://github\.com/ansible\-collections/community\.routeros/pull/257)\)\. @@ -162,12 +179,12 @@ Bugfix and feature release\. <a id="v2-12-0"></a> ## v2\.12\.0 -<a id="release-summary-3"></a> +<a id="release-summary-4"></a> ### Release Summary Feature release\. -<a id="minor-changes-3"></a> +<a id="minor-changes-4"></a> ### Minor Changes * api\_info\, api\_modify \- add <code>interface ovpn\-client</code> path \([https\://github\.com/ansible\-collections/community\.routeros/issues/242](https\://github\.com/ansible\-collections/community\.routeros/issues/242)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/244](https\://github\.com/ansible\-collections/community\.routeros/pull/244)\)\. @@ -181,12 +198,12 @@ Feature release\. <a id="v2-11-0"></a> ## v2\.11\.0 -<a id="release-summary-4"></a> +<a id="release-summary-5"></a> ### Release Summary Feature and bugfix release\. -<a id="minor-changes-4"></a> +<a id="minor-changes-5"></a> ### Minor Changes * api\_info\, api\_modify \- add missing DoH parameters <code>doh\-max\-concurrent\-queries</code>\, <code>doh\-max\-server\-connections</code>\, and <code>doh\-timeout</code> to the <code>ip dns</code> path \([https\://github\.com/ansible\-collections/community\.routeros/issues/230](https\://github\.com/ansible\-collections/community\.routeros/issues/230)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/235](https\://github\.com/ansible\-collections/community\.routeros/pull/235)\) @@ -201,12 +218,12 @@ Feature and bugfix release\. <a id="v2-10-0"></a> ## v2\.10\.0 -<a id="release-summary-5"></a> +<a id="release-summary-6"></a> ### Release Summary Bugfix and feature release\. -<a id="minor-changes-5"></a> +<a id="minor-changes-6"></a> ### Minor Changes * api\_info \- add new <code>include\_read\_only</code> option to select behavior for read\-only values\. By default these are not returned \([https\://github\.com/ansible\-collections/community\.routeros/pull/213](https\://github\.com/ansible\-collections/community\.routeros/pull/213)\)\. @@ -238,12 +255,12 @@ Bugfix and feature release\. <a id="v2-9-0"></a> ## v2\.9\.0 -<a id="release-summary-6"></a> +<a id="release-summary-7"></a> ### Release Summary Bugfix and feature release\. -<a id="minor-changes-6"></a> +<a id="minor-changes-7"></a> ### Minor Changes * api\_info\, api\_modify \- add path <code>caps\-man channel</code> and enable path <code>caps\-man manager interface</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/193](https\://github\.com/ansible\-collections/community\.routeros/issues/193)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/194](https\://github\.com/ansible\-collections/community\.routeros/pull/194)\)\. @@ -257,7 +274,7 @@ Bugfix and feature release\. <a id="v2-8-3"></a> ## v2\.8\.3 -<a id="release-summary-7"></a> +<a id="release-summary-8"></a> ### Release Summary Maintenance release with updated documentation\. @@ -278,7 +295,7 @@ for the rendered HTML version of the documentation of the latest release\. <a id="v2-8-2"></a> ## v2\.8\.2 -<a id="release-summary-8"></a> +<a id="release-summary-9"></a> ### Release Summary Bugfix release\. @@ -291,7 +308,7 @@ Bugfix release\. <a id="v2-8-1"></a> ## v2\.8\.1 -<a id="release-summary-9"></a> +<a id="release-summary-10"></a> ### Release Summary Bugfix release\. @@ -304,12 +321,12 @@ Bugfix release\. <a id="v2-8-0"></a> ## v2\.8\.0 -<a id="release-summary-10"></a> +<a id="release-summary-11"></a> ### Release Summary Bugfix and feature release\. -<a id="minor-changes-7"></a> +<a id="minor-changes-8"></a> ### Minor Changes * api\_modify \- adapt data for API paths <code>ip dhcp\-server network</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/156](https\://github\.com/ansible\-collections/community\.routeros/pull/156)\)\. @@ -329,12 +346,12 @@ Bugfix and feature release\. <a id="v2-7-0"></a> ## v2\.7\.0 -<a id="release-summary-11"></a> +<a id="release-summary-12"></a> ### Release Summary Bugfix and feature release\. -<a id="minor-changes-8"></a> +<a id="minor-changes-9"></a> ### Minor Changes * api\_modify\, api\_info \- support API paths <code>ip arp</code>\, <code>ip firewall raw</code>\, <code>ipv6 firewall raw</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/144](https\://github\.com/ansible\-collections/community\.routeros/pull/144)\)\. @@ -347,12 +364,12 @@ Bugfix and feature release\. <a id="v2-6-0"></a> ## v2\.6\.0 -<a id="release-summary-12"></a> +<a id="release-summary-13"></a> ### Release Summary Regular bugfix and feature release\. -<a id="minor-changes-9"></a> +<a id="minor-changes-10"></a> ### Minor Changes * api\_modify\, api\_info \- add field <code>regexp</code> to <code>ip dns static</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/141](https\://github\.com/ansible\-collections/community\.routeros/issues/141)\)\. @@ -367,12 +384,12 @@ Regular bugfix and feature release\. <a id="v2-5-0"></a> ## v2\.5\.0 -<a id="release-summary-13"></a> +<a id="release-summary-14"></a> ### Release Summary Feature and bugfix release\. -<a id="minor-changes-10"></a> +<a id="minor-changes-11"></a> ### Minor Changes * api\_info\, api\_modify \- support API paths <code>interface ethernet poe</code>\, <code>interface gre6</code>\, <code>interface vrrp</code> and also support all previously missing fields of entries in <code>ip dhcp\-server</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/137](https\://github\.com/ansible\-collections/community\.routeros/pull/137)\)\. @@ -385,12 +402,12 @@ Feature and bugfix release\. <a id="v2-4-0"></a> ## v2\.4\.0 -<a id="release-summary-14"></a> +<a id="release-summary-15"></a> ### Release Summary Feature release improving the <code>api\*</code> modules\. -<a id="minor-changes-11"></a> +<a id="minor-changes-12"></a> ### Minor Changes * api\* modules \- Add new option <code>force\_no\_cert</code> to connect with ADH ciphers \([https\://github\.com/ansible\-collections/community\.routeros/pull/124](https\://github\.com/ansible\-collections/community\.routeros/pull/124)\)\. @@ -429,7 +446,7 @@ Feature release improving the <code>api\*</code> modules\. <a id="v2-3-1"></a> ## v2\.3\.1 -<a id="release-summary-15"></a> +<a id="release-summary-16"></a> ### Release Summary Maintenance release with improved documentation\. @@ -442,12 +459,12 @@ Maintenance release with improved documentation\. <a id="v2-3-0"></a> ## v2\.3\.0 -<a id="release-summary-16"></a> +<a id="release-summary-17"></a> ### Release Summary Feature and bugfix release\. -<a id="minor-changes-12"></a> +<a id="minor-changes-13"></a> ### Minor Changes * The collection repository conforms to the [REUSE specification](https\://reuse\.software/spec/) except for the changelog fragments \([https\://github\.com/ansible\-collections/community\.routeros/pull/108](https\://github\.com/ansible\-collections/community\.routeros/pull/108)\)\. @@ -462,7 +479,7 @@ Feature and bugfix release\. <a id="v2-2-1"></a> ## v2\.2\.1 -<a id="release-summary-17"></a> +<a id="release-summary-18"></a> ### Release Summary Bugfix release\. @@ -476,12 +493,12 @@ Bugfix release\. <a id="v2-2-0"></a> ## v2\.2\.0 -<a id="release-summary-18"></a> +<a id="release-summary-19"></a> ### Release Summary New feature release\. -<a id="minor-changes-13"></a> +<a id="minor-changes-14"></a> ### Minor Changes * 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\.routeros/pull/101](https\://github\.com/ansible\-collections/community\.routeros/pull/101)\)\. @@ -494,18 +511,18 @@ New feature release\. <a id="new-modules"></a> ### New Modules -* api\_info \- Retrieve information from API -* api\_modify \- Modify data at paths with API +* community\.routeros\.api\_info \- Retrieve information from API +* community\.routeros\.api\_modify \- Modify data at paths with API <a id="v2-1-0"></a> ## v2\.1\.0 -<a id="release-summary-19"></a> +<a id="release-summary-20"></a> ### Release Summary Feature and bugfix release with new modules\. -<a id="minor-changes-14"></a> +<a id="minor-changes-15"></a> ### Minor Changes * Added a <code>community\.routeros\.api</code> module defaults group\. Use with <code>group/community\.routeros\.api</code> to provide options for all API\-based modules \([https\://github\.com/ansible\-collections/community\.routeros/pull/89](https\://github\.com/ansible\-collections/community\.routeros/pull/89)\)\. @@ -523,18 +540,18 @@ Feature and bugfix release with new modules\. <a id="new-modules-1"></a> ### New Modules -* api\_facts \- Collect facts from remote devices running MikroTik RouterOS using the API -* api\_find\_and\_modify \- Find and modify information using the API +* community\.routeros\.api\_facts \- Collect facts from remote devices running MikroTik RouterOS using the API +* community\.routeros\.api\_find\_and\_modify \- Find and modify information using the API <a id="v2-0-0"></a> ## v2\.0\.0 -<a id="release-summary-20"></a> +<a id="release-summary-21"></a> ### Release Summary A new major release with breaking changes in the behavior of <code>community\.routeros\.api</code> and <code>community\.routeros\.command</code>\. -<a id="minor-changes-15"></a> +<a id="minor-changes-16"></a> ### Minor Changes * api \- make validation of <code>WHERE</code> for <code>query</code> more strict \([https\://github\.com/ansible\-collections/community\.routeros/pull/53](https\://github\.com/ansible\-collections/community\.routeros/pull/53)\)\. @@ -561,21 +578,21 @@ A new major release with breaking changes in the behavior of <code>community\.ro <a id="filter"></a> #### Filter -* join \- Join a list of arguments to a command -* list\_to\_dict \- Convert a list of arguments to a list of dictionary -* quote\_argument \- Quote an argument -* quote\_argument\_value \- Quote an argument value -* split \- Split a command into arguments +* community\.routeros\.join \- Join a list of arguments to a command +* community\.routeros\.list\_to\_dict \- Convert a list of arguments to a list of dictionary +* community\.routeros\.quote\_argument \- Quote an argument +* community\.routeros\.quote\_argument\_value \- Quote an argument value +* community\.routeros\.split \- Split a command into arguments <a id="v1-2-0"></a> ## v1\.2\.0 -<a id="release-summary-21"></a> +<a id="release-summary-22"></a> ### Release Summary Bugfix and feature release\. -<a id="minor-changes-16"></a> +<a id="minor-changes-17"></a> ### Minor Changes * 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\.routeros/pull/38](https\://github\.com/ansible\-collections/community\.routeros/pull/38)\)\. @@ -591,12 +608,12 @@ Bugfix and feature release\. <a id="v1-1-0"></a> ## v1\.1\.0 -<a id="release-summary-22"></a> +<a id="release-summary-23"></a> ### Release Summary This release allow dashes in usernames for SSH\-based modules\. -<a id="minor-changes-17"></a> +<a id="minor-changes-18"></a> ### Minor Changes * command \- added support for a dash \(<code>\-</code>\) in username \([https\://github\.com/ansible\-collections/community\.routeros/pull/18](https\://github\.com/ansible\-collections/community\.routeros/pull/18)\)\. @@ -605,7 +622,7 @@ This release allow dashes in usernames for SSH\-based modules\. <a id="v1-0-1"></a> ## v1\.0\.1 -<a id="release-summary-23"></a> +<a id="release-summary-24"></a> ### Release Summary Maintenance release with a bugfix for <code>api</code>\. @@ -618,7 +635,7 @@ Maintenance release with a bugfix for <code>api</code>\. <a id="v1-0-0"></a> ## v1\.0\.0 -<a id="release-summary-24"></a> +<a id="release-summary-25"></a> ### Release Summary This is the first production \(non\-prerelease\) release of <code>community\.routeros</code>\. @@ -631,7 +648,7 @@ This is the first production \(non\-prerelease\) release of <code>community\.rou <a id="v0-1-1"></a> ## v0\.1\.1 -<a id="release-summary-25"></a> +<a id="release-summary-26"></a> ### Release Summary Small improvements and bugfixes over the initial release\. @@ -644,12 +661,12 @@ Small improvements and bugfixes over the initial release\. <a id="v0-1-0"></a> ## v0\.1\.0 -<a id="release-summary-26"></a> +<a id="release-summary-27"></a> ### Release Summary The <code>community\.routeros</code> continues the work on the Ansible RouterOS modules from their state in <code>community\.network</code> 1\.2\.0\. The changes listed here are thus relative to the modules <code>community\.network\.routeros\_\*</code>\. -<a id="minor-changes-18"></a> +<a id="minor-changes-19"></a> ### Minor Changes * facts \- now also collecting data about BGP and OSPF \([https\://github\.com/ansible\-collections/community\.network/pull/101](https\://github\.com/ansible\-collections/community\.network/pull/101)\)\. diff --git a/ansible_collections/community/routeros/CHANGELOG.rst b/ansible_collections/community/routeros/CHANGELOG.rst index 1b3a76077..1a735af72 100644 --- a/ansible_collections/community/routeros/CHANGELOG.rst +++ b/ansible_collections/community/routeros/CHANGELOG.rst @@ -4,6 +4,20 @@ Community RouterOS Release Notes .. contents:: Topics +v2.16.0 +======= + +Release Summary +--------------- + +Feature release. + +Minor Changes +------------- + +- api_info, api_modify - add missing path ``/ppp secret`` (https://github.com/ansible-collections/community.routeros/pull/286). +- api_info, api_modify - minor changes ``/interface ethernet`` path fields (https://github.com/ansible-collections/community.routeros/pull/288). + v2.15.0 ======= @@ -396,8 +410,8 @@ Bugfixes New Modules ----------- -- api_info - Retrieve information from API -- api_modify - Modify data at paths with API +- community.routeros.api_info - Retrieve information from API +- community.routeros.api_modify - Modify data at paths with API v2.1.0 ====== @@ -425,8 +439,8 @@ Bugfixes New Modules ----------- -- api_facts - Collect facts from remote devices running MikroTik RouterOS using the API -- api_find_and_modify - Find and modify information using the API +- community.routeros.api_facts - Collect facts from remote devices running MikroTik RouterOS using the API +- community.routeros.api_find_and_modify - Find and modify information using the API v2.0.0 ====== @@ -463,11 +477,11 @@ New Plugins Filter ~~~~~~ -- join - Join a list of arguments to a command -- list_to_dict - Convert a list of arguments to a list of dictionary -- quote_argument - Quote an argument -- quote_argument_value - Quote an argument value -- split - Split a command into arguments +- community.routeros.join - Join a list of arguments to a command +- community.routeros.list_to_dict - Convert a list of arguments to a list of dictionary +- community.routeros.quote_argument - Quote an argument +- community.routeros.quote_argument_value - Quote an argument value +- community.routeros.split - Split a command into arguments v1.2.0 ====== diff --git a/ansible_collections/community/routeros/FILES.json b/ansible_collections/community/routeros/FILES.json index 483d87e4f..0ca97eafc 100644 --- a/ansible_collections/community/routeros/FILES.json +++ b/ansible_collections/community/routeros/FILES.json @@ -25,7 +25,7 @@ "name": ".github/workflows/ansible-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bf90bb7d4687afa28b6d64eed2a4ef8761badbd5759319daff0621394fe8a1fe", + "chksum_sha256": "58be3451b2513cc47d2604e6d743c617cfacc8c4a1c438b7771d92ca68092736", "format": 1 }, { @@ -46,7 +46,7 @@ "name": ".github/workflows/ee.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "99536bd592be0fadd2e2c9acce48152aa671b04ba69636097bffd65035c473d6", + "chksum_sha256": "f1d97d8c8bdfc87fdcf56527e57a3516637362a1e15bb76cb000a15d93712953", "format": 1 }, { @@ -151,7 +151,7 @@ "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5780b9cd9fd37dcad0b122ae762afbe426e800c7fda9496e50163c628d77a823", + "chksum_sha256": "47b733d8817c1ed863d03ef0da8cc81790186ef231cb87440f46be1aca54de27", "format": 1 }, { @@ -165,7 +165,7 @@ "name": "changelogs/config.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3cb54c894797529118cca5be83152602e8db6353062d795b6a9aaeecfc188870", + "chksum_sha256": "d8830903d5505b4360fc0c0cfd5e22dbd4e8622e3bddb142e7f116f51528e077", "format": 1 }, { @@ -361,7 +361,7 @@ "name": "plugins/module_utils/_api_data.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2b2dd685aa6a3fd4d481f12ced0ed0284a65d4773844c4c9a30ea3b4cbd38297", + "chksum_sha256": "653685a731169bb6d2598b8b458fedbaf4e28bfc5a3bc1ae32bde2ca8ca198ec", "format": 1 }, { @@ -431,14 +431,14 @@ "name": "plugins/modules/api_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f86b949f2a5f6da6df2061711adf35ff727c034c7c9b7dc4e3bbb50fe80f0dd8", + "chksum_sha256": "fe639cf4de746ab0ac66d586a6961f304ce7b525345f630e3c96b433e07f36d5", "format": 1 }, { "name": "plugins/modules/api_modify.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2ec95cb3af816b5ee9b3e54ead9258c177f559038d57de7f253f4d9b6f179784", + "chksum_sha256": "df615eb928e479aeb090938c1332fc8a96fb1dfc0f3900eec827515075d1ce48", "format": 1 }, { @@ -1278,7 +1278,7 @@ "name": "CHANGELOG.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3add5cc457f4a9b36baea353affd9965843342f141333acdce5af15d84d7ae2b", + "chksum_sha256": "09650110723cae9b5ddfe03f49a7fce8941b96d386f4a5f5386ba965f0991b67", "format": 1 }, { @@ -1292,7 +1292,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ed20bebf70ccd5e1e94da8f399771dddf40744a2c2da0283fe210fc6c47d77ca", + "chksum_sha256": "112f6303c14f159a0c8552647b7c3ff3b031ed36c7d5d607fdfe095c8431ceaa", "format": 1 }, { @@ -1313,7 +1313,7 @@ "name": "README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f5ae35bdf559206e7f48123c0928ef6b5d9bc29f8a6b6eef90aa731e81aaa516", + "chksum_sha256": "aeb12aade87adf256a4a8ff1fc128a66346f1b44dde60de4a764fc4dd63339d2", "format": 1 }, { diff --git a/ansible_collections/community/routeros/MANIFEST.json b/ansible_collections/community/routeros/MANIFEST.json index ddec534d7..1e0c3475a 100644 --- a/ansible_collections/community/routeros/MANIFEST.json +++ b/ansible_collections/community/routeros/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "routeros", - "version": "2.15.0", + "version": "2.16.0", "authors": [ "Egor Zaitsev (github.com/heuels)", "Nikolay Dachev (github.com/NikolayDachev)", @@ -31,7 +31,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a36cd24eef5f055d20b8836410e23e222aa2aa857c025faadc9e10767b95fec6", + "chksum_sha256": "f2db917057798ddb8c2142983e1e2ac0d786099bd5d9c01ffd480014518dd27a", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/routeros/README.md b/ansible_collections/community/routeros/README.md index e617a8f89..f34a74921 100644 --- a/ansible_collections/community/routeros/README.md +++ b/ansible_collections/community/routeros/README.md @@ -5,7 +5,9 @@ SPDX-License-Identifier: GPL-3.0-or-later --> # Community RouterOS Collection -[![CI](https://github.com/ansible-collections/community.routeros/workflows/CI/badge.svg?event=push)](https://github.com/ansible-collections/community.routeros/actions) [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.routeros)](https://codecov.io/gh/ansible-collections/community.routeros) +[![CI](https://github.com/ansible-collections/community.routeros/workflows/CI/badge.svg?event=push)](https://github.com/ansible-collections/community.routeros/actions) +[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.routeros)](https://codecov.io/gh/ansible-collections/community.routeros) +[![REUSE status](https://api.reuse.software/badge/github.com/ansible-collections/community.routeros)](https://api.reuse.software/info/github.com/ansible-collections/community.routeros) Provides modules for [Ansible](https://www.ansible.com/community) to manage [MikroTik RouterOS](http://www.mikrotik-routeros.net/routeros.aspx) instances. diff --git a/ansible_collections/community/routeros/changelogs/changelog.yaml b/ansible_collections/community/routeros/changelogs/changelog.yaml index 62320dd0e..71044fbfd 100644 --- a/ansible_collections/community/routeros/changelogs/changelog.yaml +++ b/ansible_collections/community/routeros/changelogs/changelog.yaml @@ -371,6 +371,17 @@ releases: - 278-add_ip_route_rule_path.yml - 279-add_routing_filter_path.yml release_date: '2024-04-20' + 2.16.0: + changes: + minor_changes: + - api_info, api_modify - add missing path ``/ppp secret`` (https://github.com/ansible-collections/community.routeros/pull/286). + - api_info, api_modify - minor changes ``/interface ethernet`` path fields (https://github.com/ansible-collections/community.routeros/pull/288). + release_summary: Feature release. + fragments: + - 2.16.0.yml + - 286-add_ppp_secret_path.yml + - 288-interface_ethernet_values.yml + release_date: '2024-06-16' 2.2.0: changes: bugfixes: diff --git a/ansible_collections/community/routeros/changelogs/config.yaml b/ansible_collections/community/routeros/changelogs/config.yaml index 86412bafc..bb3c08b24 100644 --- a/ansible_collections/community/routeros/changelogs/config.yaml +++ b/ansible_collections/community/routeros/changelogs/config.yaml @@ -35,3 +35,6 @@ sections: - - known_issues - Known Issues title: Community RouterOS +trivial_section_name: trivial +use_fqcn: true +add_plugin_period: true diff --git a/ansible_collections/community/routeros/plugins/module_utils/_api_data.py b/ansible_collections/community/routeros/plugins/module_utils/_api_data.py index fdf5cba58..0883a2f55 100644 --- a/ansible_collections/community/routeros/plugins/module_utils/_api_data.py +++ b/ansible_collections/community/routeros/plugins/module_utils/_api_data.py @@ -327,9 +327,9 @@ PATHS = { 'combo-mode': KeyInfo(can_disable=True), 'comment': KeyInfo(can_disable=True, remove_value=''), 'disabled': KeyInfo(default=False), - 'fec-mode': KeyInfo(can_disable=True), + 'fec-mode': KeyInfo(can_disable=True, remove_value='auto'), 'full-duplex': KeyInfo(default=True), - 'l2mtu': KeyInfo(default=1598), + 'l2mtu': KeyInfo(), 'loop-protect': KeyInfo(default='default'), 'loop-protect-disable-time': KeyInfo(default='5m'), 'loop-protect-send-interval': KeyInfo(default='5s'), @@ -338,8 +338,8 @@ PATHS = { 'mtu': KeyInfo(default=1500), 'name': KeyInfo(), 'orig-mac-address': KeyInfo(), - 'poe-out': KeyInfo(can_disable=True), - 'poe-priority': KeyInfo(can_disable=True), + 'poe-out': KeyInfo(can_disable=True, remove_value='auto-on'), + 'poe-priority': KeyInfo(can_disable=True, remove_value=10), 'poe-voltage': KeyInfo(can_disable=True), 'power-cycle-interval': KeyInfo(), 'power-cycle-ping-address': KeyInfo(can_disable=True), @@ -347,7 +347,7 @@ PATHS = { 'power-cycle-ping-timeout': KeyInfo(can_disable=True), 'rx-flow-control': KeyInfo(default='off'), 'sfp-rate-select': KeyInfo(default='high'), - 'sfp-shutdown-temperature': KeyInfo(default='95C'), + 'sfp-shutdown-temperature': KeyInfo(default=95), 'speed': KeyInfo(), 'tx-flow-control': KeyInfo(default='off'), }, @@ -4600,6 +4600,27 @@ PATHS = { }, ), ), + ('ppp', 'secret'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'caller-id': KeyInfo(default=''), + 'disabled': KeyInfo(default=False), + 'ipv6-routes': KeyInfo(default=''), + 'limit-bytes-in': KeyInfo(default=0), + 'limit-bytes-out': KeyInfo(default=0), + 'local-address': KeyInfo(can_disable=True), + 'name': KeyInfo(required=True), + 'password': KeyInfo(), + 'profile': KeyInfo(default='default'), + 'remote-address': KeyInfo(can_disable=True), + 'remote-ipv6-prefix': KeyInfo(can_disable=True), + 'routes': KeyInfo(can_disable=True), + 'service': KeyInfo(default='any'), + }, + ), + ), ('routing', 'bgp', 'aggregate'): APIData( unversioned=VersionedAPIData( primary_keys=('prefix',), diff --git a/ansible_collections/community/routeros/plugins/modules/api_info.py b/ansible_collections/community/routeros/plugins/modules/api_info.py index a3e800ee3..1d5dea56f 100644 --- a/ansible_collections/community/routeros/plugins/modules/api_info.py +++ b/ansible_collections/community/routeros/plugins/modules/api_info.py @@ -186,6 +186,7 @@ options: - port remote-access - ppp aaa - ppp profile + - ppp secret - queue interface - queue simple - queue tree diff --git a/ansible_collections/community/routeros/plugins/modules/api_modify.py b/ansible_collections/community/routeros/plugins/modules/api_modify.py index cd5b3a93d..73a08eff0 100644 --- a/ansible_collections/community/routeros/plugins/modules/api_modify.py +++ b/ansible_collections/community/routeros/plugins/modules/api_modify.py @@ -195,6 +195,7 @@ options: - port remote-access - ppp aaa - ppp profile + - ppp secret - queue interface - queue simple - queue tree diff --git a/ansible_collections/community/zabbix/.github/workflows/agent.yml b/ansible_collections/community/zabbix/.github/workflows/agent.yml index 55b7e1b72..e081e6721 100644 --- a/ansible_collections/community/zabbix/.github/workflows/agent.yml +++ b/ansible_collections/community/zabbix/.github/workflows/agent.yml @@ -22,6 +22,7 @@ jobs: container: - rockylinux9 - rockylinux8 + - ubuntu2404 - ubuntu2204 - ubuntu2004 - ubuntu1804 @@ -40,6 +41,8 @@ jobs: exclude: - container: debian12 version: v62 + - container: ubuntu2404 + version: v62 steps: - name: Check out code diff --git a/ansible_collections/community/zabbix/.github/workflows/javagateway.yml b/ansible_collections/community/zabbix/.github/workflows/javagateway.yml index 22bc5ede1..96ca2a8b7 100644 --- a/ansible_collections/community/zabbix/.github/workflows/javagateway.yml +++ b/ansible_collections/community/zabbix/.github/workflows/javagateway.yml @@ -23,6 +23,7 @@ jobs: - rockylinux9 - rockylinux8 - centos7 + - ubuntu2404 - ubuntu2204 - ubuntu2004 - ubuntu1804 @@ -40,6 +41,8 @@ jobs: exclude: - container: debian12 version: v62 + - container: ubuntu2404 + version: v62 collection_role: - zabbix_javagateway steps: diff --git a/ansible_collections/community/zabbix/.github/workflows/proxy.yml b/ansible_collections/community/zabbix/.github/workflows/proxy.yml index ad5f61b34..5618a0633 100644 --- a/ansible_collections/community/zabbix/.github/workflows/proxy.yml +++ b/ansible_collections/community/zabbix/.github/workflows/proxy.yml @@ -23,6 +23,7 @@ jobs: - rockylinux9 - rockylinux8 - centos7 + - ubuntu2404 - ubuntu2204 - ubuntu2004 - ubuntu1804 @@ -39,12 +40,13 @@ jobs: - v64 - v62 - v60 - include: - - interpreter: python3 - - interpreter: python - container: centos7 exclude: - - container: debian12 + - container: + name: debian12 + base_image: debian:12 + os_family: debian + version: v62 + - container: ubuntu2404 version: v62 steps: - name: Check out code @@ -78,10 +80,9 @@ jobs: - name: Run role tests run: >- - MY_MOLECULE_CONTAINER=${{ matrix.container }} - MY_MOLECULE_IMAGE=${{ matrix.container }} + MY_MOLECULE_CONTAINER=${{ matrix.container.name }} + MY_MOLECULE_IMAGE=${{ matrix.container.base_image }} + MY_MOLECULE_OS_FAMILY=${{ matrix.container.os_family }} MY_MOLECULE_VERSION=${{ matrix.version }} MY_MOLECULE_DATABASE=${{ matrix.database }} - MY_MOLECULE_INTERPRETER=${{ matrix.interpreter }} - MY_MOLECULE_DOCKER_COMMAND=${{ matrix.command }} molecule test -s ${{ matrix.collection_role }} diff --git a/ansible_collections/community/zabbix/.github/workflows/server.yml b/ansible_collections/community/zabbix/.github/workflows/server.yml index 33f5cd5fd..9ca8f3761 100644 --- a/ansible_collections/community/zabbix/.github/workflows/server.yml +++ b/ansible_collections/community/zabbix/.github/workflows/server.yml @@ -22,6 +22,7 @@ jobs: container: - rockylinux9 - rockylinux8 + - ubuntu2404 - ubuntu2204 - ubuntu2004 - ubuntu1804 @@ -37,13 +38,13 @@ jobs: - v64 - v62 - v60 - include: - - interpreter: python3 exclude: - container: debian12 version: v62 - container: debian10 version: v62 + - container: ubuntu2404 + version: v62 - container: ubuntu1804 version: v62 - container: ubuntu1804 @@ -86,6 +87,5 @@ jobs: MY_MOLECULE_IMAGE=${{ matrix.container }} MY_MOLECULE_VERSION=${{ matrix.version }} MY_MOLECULE_DATABASE=${{ matrix.database }} - MY_MOLECULE_INTERPRETER=${{ matrix.interpreter }} MY_MOLECULE_DOCKER_COMMAND=${{ matrix.command }} molecule test -s ${{ matrix.collection_role }} diff --git a/ansible_collections/community/zabbix/.github/workflows/web.yml b/ansible_collections/community/zabbix/.github/workflows/web.yml index 0541a2457..ec60c540d 100644 --- a/ansible_collections/community/zabbix/.github/workflows/web.yml +++ b/ansible_collections/community/zabbix/.github/workflows/web.yml @@ -22,6 +22,7 @@ jobs: container: - rockylinux9 - rockylinux8 + - ubuntu2404 - ubuntu2204 - ubuntu2004 - ubuntu1804 @@ -35,6 +36,7 @@ jobs: - pgsql web_server: - nginx + - apache version: - v64 - v62 @@ -44,6 +46,8 @@ jobs: exclude: - container: debian10 version: v62 + - container: ubuntu2404 + version: v62 - container: ubuntu1804 version: v62 - container: debian10 diff --git a/ansible_collections/community/zabbix/CHANGELOG.rst b/ansible_collections/community/zabbix/CHANGELOG.rst index 4675d1a5a..e108bccf4 100644 --- a/ansible_collections/community/zabbix/CHANGELOG.rst +++ b/ansible_collections/community/zabbix/CHANGELOG.rst @@ -4,6 +4,38 @@ community.zabbix Release Notes .. contents:: Topics +v2.5.1 +====== + +Bugfixes +------------- + +- zabbix_agent - Fix reading existing psk +- zabbix_agent - Fix role when zabbix_agent_listenip is undefined + +v2.5.0 +====== + +Minor Changes +------------- + +- agent role - Standardized all configuration variables using the `zabbix_agent` prefix vs `zabbix_agent2`. Support for `zabbix_agent2` to be removed in 3.0.0 +- agent role - Standardized templating of agent.conf file +- all roles - Added support for Ubuntu 24.04 (Noble Numbat) +- zabbix_discoveryrule module added +- zabbix_host_events_update module added +- zabbix_item - add support for setting master items by name +- zabbix_item module added +- zabbix_itemprototype - add support for setting master items by name +- zabbix_itemprototype module added +- zabbix_trigger module added +- zabbix_triggerprototype module added + +Bugfixes +-------- + +- zabbix_web - make the FPM socket group-writable so the web server can properly forward requests to the FPM process + v2.4.0 ====== diff --git a/ansible_collections/community/zabbix/FILES.json b/ansible_collections/community/zabbix/FILES.json index 694f37957..260909068 100644 --- a/ansible_collections/community/zabbix/FILES.json +++ b/ansible_collections/community/zabbix/FILES.json @@ -46,14 +46,14 @@ "name": ".github/workflows/agent.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ab09e77c1cfb09d0ead5281bcfcd6cfb54d6eaa8380affbd53ec47c38c577855", + "chksum_sha256": "1a3f73038e09c3ca8fd53f6d8efaa24e465a1a08178521b22755ba7056394069", "format": 1 }, { "name": ".github/workflows/javagateway.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5fece5724408d5a2170a22b1fdedf601451248c723f84066b7d1076dff06dbec", + "chksum_sha256": "dc04855a3440f2cf55603398b8d8706fa83d3e7932b9f38f166d2a08a7c98b58", "format": 1 }, { @@ -67,7 +67,7 @@ "name": ".github/workflows/proxy.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f21f654a95b514e188c7cc090b21685521112a90610fef14bc487301141b17af", + "chksum_sha256": "6c52fb341cd0a40742fd5439bfe8e9712be2c6f8e010bbb6823e68600deeabee", "format": 1 }, { @@ -81,14 +81,14 @@ "name": ".github/workflows/server.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1925557e00452541d0105523033dba1edd9e3ee8ca95b3373c006c1f96973380", + "chksum_sha256": "390206c1dc52ff10f3b070a6e3c7622a3739c3c20bddd1eff81452d10b7f0c12", "format": 1 }, { "name": ".github/workflows/web.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b8665c7b983f6b76cba7da881ab0cd450439217a5bd519ae7f30933a3ded554a", + "chksum_sha256": "941a823245cc7a3a02b6ca32253be2ebe01cf508f528e30db8adc186da94cbce", "format": 1 }, { @@ -116,14 +116,14 @@ "name": "changelogs/.plugin-cache.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ddbed2431f771d0b08ec1059fcfc03df63768d78c59488ffadfddae737f52028", + "chksum_sha256": "1cfb6d46aa54a0ee195c96b60658034de0b050f738aa69088189fa7050795117", "format": 1 }, { "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "25653a4be548f83eb8db9059d833a8298cc278f4ff812ff3b79abaa9fcb63f1e", + "chksum_sha256": "91af3d023ce10a9f731f26bbf291cff608e2d77e8ba8a6fd8536740eb7334207", "format": 1 }, { @@ -158,35 +158,35 @@ "name": "docs/ZABBIX_AGENT_ROLE.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d256f34122a50d20bf5d074df98558de74774e591bb2bc309e858ab0f2c7a7b8", + "chksum_sha256": "78d04c48530cd39414bee760f67411ba56a003f0b367155248a0bf883a54d923", "format": 1 }, { "name": "docs/ZABBIX_JAVAGATEWAY_ROLE.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "168aae7236576e4baf77c7b056833d5c90527c99365d7c9487f05f7af4d7281a", + "chksum_sha256": "73778abc24b8eb27b6243c4d04bd38dc8030f8092bfde3297c15221ba565eec6", "format": 1 }, { "name": "docs/ZABBIX_PROXY_ROLE.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5fb7298372379197055d9221660fa37ec078d7b2c5aaa4545ed09a943daa7baf", + "chksum_sha256": "830cf0d2a76423c1146ab807bee53a80bb9f5839ee4954b1cc804ae20207321c", "format": 1 }, { "name": "docs/ZABBIX_SERVER_ROLE.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e7b83a2f01c4ef1388cba62476dbbe0596c483b345f4a79aabc2cd107cf16b61", + "chksum_sha256": "dd08d146c7fbbdef236be08abb9c035456e7d5f635a5748200fb7cbdb965f734", "format": 1 }, { "name": "docs/ZABBIX_WEB_ROLE.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c52def2249d4416ac228eb03d6b57322578e2fb5c118967fb1e11634ff66f64f", + "chksum_sha256": "836bbcc7e6ca298e93435670eefa94582bb44bfc7abf6a42e76ee814d41b88cb", "format": 1 }, { @@ -319,7 +319,7 @@ "name": "molecule/zabbix_agent_tests/common/molecule.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9ce9330c02c7d06dca39d7b31e1683ffd552bb341f35603fbb42659e3915a0ac", + "chksum_sha256": "7a4976cef41847257588e2004f9f8373cdbba1e59063335f5d4fcc531e964e4d", "format": 1 }, { @@ -375,7 +375,7 @@ "name": "molecule/zabbix_agent_tests/molecule/agent2/molecule.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "54630476f85b1859cf8f37f43b64631c0b6b87b1d1a151ae9f0ab8baaa7ce7ad", + "chksum_sha256": "40a1bfa5c04054e27b104891af91a489467b3cbc1b8c0c59f206a75a96154a74", "format": 1 }, { @@ -575,6 +575,20 @@ "format": 1 }, { + "name": "molecule/zabbix_proxy/Dockerfile.debian.j2", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f98266549b4f1b7f99ae7054a70f01178b67f2490e7a32b5545fa0a162a5ee81", + "format": 1 + }, + { + "name": "molecule/zabbix_proxy/Dockerfile.redhat.j2", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a1b4ae72a87e1e9e345c160fd67ef58426b17818be0c241e71f70456c57fd608", + "format": 1 + }, + { "name": "molecule/zabbix_proxy/converge.yml", "ftype": "file", "chksum_type": "sha256", @@ -592,14 +606,14 @@ "name": "molecule/zabbix_proxy/molecule.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4800b75f49e7496f80ace71d84f8f07dc7b9335c8f158bc4155c44a8d8492cc1", + "chksum_sha256": "842bcdb7a60fc380948cb88038df9bf01b519339f43307ed294504acaad49f24", "format": 1 }, { "name": "molecule/zabbix_proxy/prepare.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4495bcd19fac7b44c8d02c80133e37f554c1f66244a10c4a88e85c11ce97b814", + "chksum_sha256": "8fd3ba0ba2765ed0f99a4ebc6e67382df921b9b39e7f2eb2b8ff644a3c6cd3d0", "format": 1 }, { @@ -641,7 +655,7 @@ "name": "molecule/zabbix_server/molecule.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7c0b54e3f4f40288f5a772263d1f56a44aebb39e70aad6ec542546b40d7653a9", + "chksum_sha256": "f3d361e2f88015820269ebb93c8ff98e0a399a67adf30d3ab38ff375a148fae1", "format": 1 }, { @@ -697,7 +711,7 @@ "name": "molecule/zabbix_web/prepare.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7628246084a0692187d2408ee30afc478999d24c1e08d6fc0609f59ed828b23e", + "chksum_sha256": "63917b4d79946207e2ad7207270b94a11e25b058c7eafb040934f1b3560affc8", "format": 1 }, { @@ -711,7 +725,7 @@ "name": "molecule/requirements.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "26a9987c8545a84ddf26c2774fc1bf16c0dc68fa790dde49b46ce17a1720700e", + "chksum_sha256": "ad376f71f1e8d1bcff190d8588e99e6840df2e7296451c4eda7ce7b6663c13a2", "format": 1 }, { @@ -862,6 +876,13 @@ "format": 1 }, { + "name": "plugins/modules/zabbix_discoveryrule.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "bc1a58588a502206fdfc5e4aa1858e276c4e3e6605a5493a314ce81f4b217be1", + "format": 1 + }, + { "name": "plugins/modules/zabbix_globalmacro.py", "ftype": "file", "chksum_type": "sha256", @@ -904,6 +925,13 @@ "format": 1 }, { + "name": "plugins/modules/zabbix_host_events_update.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c83f644554957ef349547a69fa1c7e31b3a03ee5fc5813e94ca1ac16de580a4b", + "format": 1 + }, + { "name": "plugins/modules/zabbix_host_info.py", "ftype": "file", "chksum_type": "sha256", @@ -925,6 +953,20 @@ "format": 1 }, { + "name": "plugins/modules/zabbix_item.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "db8b030def44167e1055ec383657a9f36b3fadc94eaf1868b506affa4e019f51", + "format": 1 + }, + { + "name": "plugins/modules/zabbix_itemprototype.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "875437704fa98e70323feaf57e93a67b043f10e99d93eb1adfd4444b53260ed8", + "format": 1 + }, + { "name": "plugins/modules/zabbix_maintenance.py", "ftype": "file", "chksum_type": "sha256", @@ -970,7 +1012,7 @@ "name": "plugins/modules/zabbix_script.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3fd732f7f929a0dbe91dbaa4ce1d2c7fcd86b0c5199ee9ca5d9db8e3f471b613", + "chksum_sha256": "f3f5e363e8f868bc48cbb55a1783bceb6d023994090c7e03aeff87032cca3a76", "format": 1 }, { @@ -1023,6 +1065,20 @@ "format": 1 }, { + "name": "plugins/modules/zabbix_trigger.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d754c83db1214459d67ebefcab4143303dc057e87a9bf98ca3e9022ddee68eba", + "format": 1 + }, + { + "name": "plugins/modules/zabbix_triggerprototype.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "01a3cf27999c442150706f08c9b6b220a726672605e454cdbfce3bba620f7baf", + "format": 1 + }, + { "name": "plugins/modules/zabbix_user.py", "ftype": "file", "chksum_type": "sha256", @@ -1082,7 +1138,7 @@ "name": "roles/zabbix_agent/README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d256f34122a50d20bf5d074df98558de74774e591bb2bc309e858ab0f2c7a7b8", + "chksum_sha256": "78d04c48530cd39414bee760f67411ba56a003f0b367155248a0bf883a54d923", "format": 1 }, { @@ -1096,7 +1152,7 @@ "name": "roles/zabbix_agent/defaults/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7465f741a1390bc62b1f30f3daf28f271ad94942c2f727fabfe576277fd4c1f3", + "chksum_sha256": "0e723f2914d13b84e8ca7411a5d7679a5a051c213a157862ba81456ba7103ae7", "format": 1 }, { @@ -1243,7 +1299,7 @@ "name": "roles/zabbix_agent/tasks/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "97c991dcccf9ab92bad90d36caf6e2d3bdd2b9eb9461aded42696b3e76c7b1ad", + "chksum_sha256": "90e5f8ceaae327a890c2c4a77b6d3a194442d27327344cf7f07d7487826a8913", "format": 1 }, { @@ -1257,7 +1313,7 @@ "name": "roles/zabbix_agent/tasks/Linux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4cbe916769cde150073a71e1ac8b5e9a3a531ba6a17782944e4e758433877ff8", + "chksum_sha256": "f547026740b272e5dc1b65993e088c876c6bb31d90c7a872af82f62f74ab6de2", "format": 1 }, { @@ -1271,21 +1327,21 @@ "name": "roles/zabbix_agent/tasks/Windows.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "709a0466886c5bf5ed5f560b987cf68d268fff906a6dd26b667c25654d37fe81", + "chksum_sha256": "d224fef134ce06d2723ea4f565e72f34dab2c890d2152374080ec67c23223bbd", "format": 1 }, { "name": "roles/zabbix_agent/tasks/Windows_conf.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ba0da2675127cf58cfa66ba4e977f15f2f856654fb7583826865276fa10c6262", + "chksum_sha256": "626952830d71ad912b6007a647ce3c1f58129f26dee4cccb0f8d96b8338aedd6", "format": 1 }, { "name": "roles/zabbix_agent/tasks/api.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8201b0dc1b00dd86383f272dd81f06e792f8bab1951aee62c03a46791ca5b4bb", + "chksum_sha256": "bf5750468e57278a4174ff2accecd2aac7431678cdc32b9f8822ab9f592e6eb5", "format": 1 }, { @@ -1299,77 +1355,35 @@ "name": "roles/zabbix_agent/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7ceb0be05f5fb90c9d007ae64a43ca66fa855c484410df95c46e41853a44f5bd", - "format": 1 - }, - { - "name": "roles/zabbix_agent/tasks/remove.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "a61614e0f51ef087ef82eb2319b8546f213c22aff785afdf56f007c442b6cb2c", - "format": 1 - }, - { - "name": "roles/zabbix_agent/tasks/selinux.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "5b48575676d826c5e6321daddab3713fbbd76ba575400f29eeafc277017b9fe2", - "format": 1 - }, - { - "name": "roles/zabbix_agent/tasks/tlspsk_auto.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "bcf8266fdd6b7d01d5a6bb97a3f4c1982ca7dc099dedcaa407390c69bbeaa7e6", - "format": 1 - }, - { - "name": "roles/zabbix_agent/tasks/tlspsk_auto_agent2.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "1d0eafd6fefb287832c5b42c80c37c2b2e049b937aa50f44d7040ce56d81db86", - "format": 1 - }, - { - "name": "roles/zabbix_agent/tasks/tlspsk_auto_agent2_common.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "3f194c4720b68b5eb4003effe148b6c379a650f91d5325147d3e43485d37ba7b", - "format": 1 - }, - { - "name": "roles/zabbix_agent/tasks/tlspsk_auto_agent2_linux.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "3d651d820f7be9fd52d0b752f6ad07fc3e41a7ba52f178ae1221e1e2419980d9", + "chksum_sha256": "6b5494d41937dcbb34b1265a741f93d5a1f3731d969853b404394d6800256066", "format": 1 }, { - "name": "roles/zabbix_agent/tasks/tlspsk_auto_agent2_windows.yml", + "name": "roles/zabbix_agent/tasks/psk_identity.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "416c701d66781d97032e1104e5c25abe4157740f517fdcc5ffea5f5bb14fc9cf", + "chksum_sha256": "907f08566fb0f5f7f9c3b0e870372670668a736ad901992d9a8636b47bc419cf", "format": 1 }, { - "name": "roles/zabbix_agent/tasks/tlspsk_auto_common.yml", + "name": "roles/zabbix_agent/tasks/psk_secret.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4be3dadd8bfa5cc2aae3de2b975040f6352fee46127b7ccba2b746f11cfdd39a", + "chksum_sha256": "eb90d955ee19eec7588a60aa07734565c56aa91d1ddc615b8624ca50e078b73d", "format": 1 }, { - "name": "roles/zabbix_agent/tasks/tlspsk_auto_linux.yml", + "name": "roles/zabbix_agent/tasks/remove.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1b494062174c84263883f71ed50842255bc270246afbe12f8573bc2e81ea10a9", + "chksum_sha256": "a61614e0f51ef087ef82eb2319b8546f213c22aff785afdf56f007c442b6cb2c", "format": 1 }, { - "name": "roles/zabbix_agent/tasks/tlspsk_auto_windows.yml", + "name": "roles/zabbix_agent/tasks/selinux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bf3c3976e28fb3846de16e0a0e01eae0184d2cf57b79da0a342a5d5b35b187d8", + "chksum_sha256": "4e5323cf7121df09fffb2b53749f46bbd6fae95eb715febddc01a086330f55ee", "format": 1 }, { @@ -1408,17 +1422,10 @@ "format": 1 }, { - "name": "roles/zabbix_agent/templates/zabbix_agent2.conf.j2", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "123866b68a1511d56e14a523035583e6a3adcf8d234abd086f4b7ba0e322df4b", - "format": 1 - }, - { - "name": "roles/zabbix_agent/templates/zabbix_agentd.conf.j2", + "name": "roles/zabbix_agent/templates/agent.conf.j2", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d3c56ebbe34908eaa981e1838ee17ab90729814dce584c1b3e66ab2455ac6f0f", + "chksum_sha256": "25f9094a4ad3df674d6c2a69b70b2533931e5dc1a3fa5b96e9165583e3f0546f", "format": 1 }, { @@ -1432,14 +1439,14 @@ "name": "roles/zabbix_agent/vars/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b3fdab5e28c143947f965aa38b670a83726994f8e6fb37b7fac24350c9471a28", + "chksum_sha256": "ac1d08f8f30dcacd8fb63cd281bb86864df6fc75fa64bb259c172351361ebf25", "format": 1 }, { "name": "roles/zabbix_agent/vars/RedHat.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "587c2d75417faa8978fdcc729a4b940b4530c5a02df59a049985ab684742e90c", + "chksum_sha256": "39a539d0a9c528df8dae3d18f2c39c567f335c40a0da40d3f0798734ad0b78fa", "format": 1 }, { @@ -1450,6 +1457,20 @@ "format": 1 }, { + "name": "roles/zabbix_agent/vars/agent2_vars.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3fddc386eaaf3a02f856496a82ba80cfd55b5141be86e8065c1dfffd53d2c40b", + "format": 1 + }, + { + "name": "roles/zabbix_agent/vars/agent_vars.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c685651c7d6a30c6f777b6e03b127415be7fa3c117ac92a8deadf143b30c0eda", + "format": 1 + }, + { "name": "roles/zabbix_agent/vars/main.yml", "ftype": "file", "chksum_type": "sha256", @@ -1467,7 +1488,7 @@ "name": "roles/zabbix_javagateway/README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "168aae7236576e4baf77c7b056833d5c90527c99365d7c9487f05f7af4d7281a", + "chksum_sha256": "73778abc24b8eb27b6243c4d04bd38dc8030f8092bfde3297c15221ba565eec6", "format": 1 }, { @@ -1537,7 +1558,7 @@ "name": "roles/zabbix_javagateway/tasks/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "44f9adfe675690b1901bf67f5c60da034bbbc4448476f3a2d69993a180f9dedc", + "chksum_sha256": "374d257d5e917832cb625815075a3cb2f2c9fed5f84a78d66b357ce5b49590ed", "format": 1 }, { @@ -1579,7 +1600,7 @@ "name": "roles/zabbix_javagateway/vars/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "be7796f9ccb7e43552833863142669694201bba88e396406f29f8881e28f381a", + "chksum_sha256": "d10507c4456ec9dc27e7b7f40e30021b77c6fdeeda4a5d0d05c8e40c8e7130d7", "format": 1 }, { @@ -1607,7 +1628,7 @@ "name": "roles/zabbix_proxy/README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5fb7298372379197055d9221660fa37ec078d7b2c5aaa4545ed09a943daa7baf", + "chksum_sha256": "830cf0d2a76423c1146ab807bee53a80bb9f5839ee4954b1cc804ae20207321c", "format": 1 }, { @@ -1621,7 +1642,7 @@ "name": "roles/zabbix_proxy/defaults/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "33dcb508919b88bf2ef0b1c6bc5b121a67392553e54a58b55bf572bf00ea5d53", + "chksum_sha256": "8d5ca9ac229870d22e2dca4de415d75bfacab2b28936226e2de5287f15231064", "format": 1 }, { @@ -1677,49 +1698,49 @@ "name": "roles/zabbix_proxy/tasks/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "92c82d7303b5ec4b9e688bdb8017e5f213993f9c66007ad95846b2db30cfb414", + "chksum_sha256": "57390fe9245af2542ec93677de19af09d5a87bd49118e814a032d3890a7e0d31", "format": 1 }, { "name": "roles/zabbix_proxy/tasks/RedHat.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4b521fd4998782a7fd2e5e8c4bea84d5436dd9e63b0732a0590034181e5c6329", + "chksum_sha256": "933044c1ae7c99784e5136f6bedb840df2db4a7c6b7ab294438dda1041e42251", "format": 1 }, { - "name": "roles/zabbix_proxy/tasks/main.yml", + "name": "roles/zabbix_proxy/tasks/initialize-mysql.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3751caa6aaa36f2f878f60bd81a53ff4fb6dc1e45c0e9ec6c8c195fc3da765a1", + "chksum_sha256": "832de47bd3469c7c00fd3e5ec1550cf7a288b7e00b021b14e2e673231380bc2e", "format": 1 }, { - "name": "roles/zabbix_proxy/tasks/mysql.yml", + "name": "roles/zabbix_proxy/tasks/initialize-pgsql.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ea5c5f6380e122e9b658d4acd5e8a382fa6c564673ec37c947a92f95f0b24ec5", + "chksum_sha256": "066bd0942f8b3e81ed6ef627f6ea8d15e4a487cdfcf94052c0cae32cefb04b92", "format": 1 }, { - "name": "roles/zabbix_proxy/tasks/postgresql.yml", + "name": "roles/zabbix_proxy/tasks/initialize-sqlite3.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1b97ce83bb12d6f435c0363e4f39888c87d0be53db6561168771add354fdd41f", + "chksum_sha256": "039ea53c97e8493e8911b8cbec378fb88c960be4eb0c116b30ad75a45e9bc2ee", "format": 1 }, { - "name": "roles/zabbix_proxy/tasks/selinux.yml", + "name": "roles/zabbix_proxy/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5fcaf2583198e89e108cc2b2a7b777fa6e2dac1a2a1efd88a6c44308d79a6362", + "chksum_sha256": "4302458bdf7683522790560b0d9f74c6f7ad3874ec3941e13516f556f26a63d5", "format": 1 }, { - "name": "roles/zabbix_proxy/tasks/sqlite3.yml", + "name": "roles/zabbix_proxy/tasks/selinux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4c3b276cddc6afa88a48224fa274ca8ea7b7b59d74655197bddec0545a38309d", + "chksum_sha256": "5fcaf2583198e89e108cc2b2a7b777fa6e2dac1a2a1efd88a6c44308d79a6362", "format": 1 }, { @@ -1733,7 +1754,7 @@ "name": "roles/zabbix_proxy/templates/zabbix_proxy.conf.j2", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8133d6ef95a09b0e435324b3005c524745eb0e194cfa591cb3d6f4c36a312590", + "chksum_sha256": "491e64286da2b61338dffd1e5967dbdca598acdd16fb190b45f7d35046255791", "format": 1 }, { @@ -1747,21 +1768,14 @@ "name": "roles/zabbix_proxy/vars/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0c3453870dcd59ed9f69f3fdac8a1b46bf683a87ab86e87cc69b28d3951cce43", + "chksum_sha256": "e1893711fa151d4072c1195d178fcaad62099e4d972220bece3ef76efc69f1c1", "format": 1 }, { "name": "roles/zabbix_proxy/vars/RedHat.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "50f4bb5b1ab62a8f1128dde98e820349b164ef4c1583e6f78d61279d19e56c48", - "format": 1 - }, - { - "name": "roles/zabbix_proxy/vars/main.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "599afb847ce1287ea279d2f5864a6fc6eb240323ef2b92a408e11c8472b08189", + "chksum_sha256": "9ba0777a21b8a56b138adba0270f51603d5f95c3c10e82d4b6351cc08bb9a8cd", "format": 1 }, { @@ -1782,7 +1796,7 @@ "name": "roles/zabbix_server/README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e7b83a2f01c4ef1388cba62476dbbe0596c483b345f4a79aabc2cd107cf16b61", + "chksum_sha256": "dd08d146c7fbbdef236be08abb9c035456e7d5f635a5748200fb7cbdb965f734", "format": 1 }, { @@ -1796,7 +1810,7 @@ "name": "roles/zabbix_server/defaults/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e77fe177f086c46a5fbce843360203fcd6b0bd3cb70cbce6582b73e50fb4f1d8", + "chksum_sha256": "da72f5ec897d8b46a5a73686d679955d63f7e50ca8877b8905beb1bd915adfb1", "format": 1 }, { @@ -1859,21 +1873,21 @@ "name": "roles/zabbix_server/tasks/RedHat.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c843b63e5dc9c44dfa748b6f6b5524f796d1b7a7bbf6151f89e7726770c399ce", + "chksum_sha256": "04cf0ce5034e975fcfe02cefd9ba91e58bd1b89c224a26c17da0a569f9c12f7e", "format": 1 }, { "name": "roles/zabbix_server/tasks/initialize-mysql.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f391750aff2b4e7c74c292036829fe7a44bb3fbfaed9bdb12393542b59132502", + "chksum_sha256": "5be33df40ae618c8bc7654155c7b2c697569c7cc16e5edecfd7805d3943fad24", "format": 1 }, { "name": "roles/zabbix_server/tasks/initialize-pgsql.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "df0005a12cc1d89f1a361f1d5f2764600a24527a567cce4b38f69490651f5541", + "chksum_sha256": "dcfebdf9a3d57022bfc9287c44933fdb1675ebc6cd51c874941d6d1385da0a7f", "format": 1 }, { @@ -1894,7 +1908,7 @@ "name": "roles/zabbix_server/tasks/selinux.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f82baa01937f5e3e29b02be6fefd51f7c6cafcefebd44e9a3cf2a8c22d9c5e8c", + "chksum_sha256": "927e5e8dbd9766b738e96aa48c8282283e34d0a6a8b3887e73d6128af5c6b184", "format": 1 }, { @@ -1922,7 +1936,7 @@ "name": "roles/zabbix_server/vars/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "428c1f85055c5afdccf997e4c6ab8fd4b9999760f93517dcbea2f41c88f82cb5", + "chksum_sha256": "568d7280dc9153f941220ba07fc94d66f92669a6b64ca1fffc38c847e2748c77", "format": 1 }, { @@ -1957,7 +1971,7 @@ "name": "roles/zabbix_web/README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c52def2249d4416ac228eb03d6b57322578e2fb5c118967fb1e11634ff66f64f", + "chksum_sha256": "836bbcc7e6ca298e93435670eefa94582bb44bfc7abf6a42e76ee814d41b88cb", "format": 1 }, { @@ -2076,7 +2090,7 @@ "name": "roles/zabbix_web/templates/php-fpm.conf.j2", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d81d68fe5d62c8199e5d360be16bf1b1f27d72c4a3926d1e45abe720bb458cb8", + "chksum_sha256": "ac3253913106eb5e48e15335f95f3a7cbd8fe40eec84ca35fc023f296fd9341f", "format": 1 }, { @@ -2097,7 +2111,7 @@ "name": "roles/zabbix_web/vars/Debian.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "42d65bb39698381f067773966ab6605f96b6b7ced0e5d63e217ac0877d7dc7ad", + "chksum_sha256": "8754339ac10bbedd824445da405c7725251784224922cfede41aa132ea302314", "format": 1 }, { @@ -2409,6 +2423,62 @@ "format": 1 }, { + "name": "tests/integration/targets/test_zabbix_discoveryrule", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_discoveryrule/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_discoveryrule/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "63ae23343a8854777c0e014be5fdd33db6a6b78f96d22a889ad78556dc0ffa81", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_discoveryrule/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_discoveryrule/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4eec6e2f6d02642f42b6f8b8f1e82d1928d24d796a598d739ba43d6b61778835", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b452b8a9c1c973f25dd408e2cc94966005496f9398ad3b4caf0daf63f603e034", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_teardown.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c0784486108c91c1c600e6fe9274fe41c74cfac179cc85a682a6f96a860fb33f", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_tests.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ddd02d4b606be9ca946c00f373c9db8c205847555e1d73fd2cb9f65cc220e90a", + "format": 1 + }, + { "name": "tests/integration/targets/test_zabbix_globalmacro", "ftype": "dir", "chksum_type": null, @@ -2626,6 +2696,62 @@ "format": 1 }, { + "name": "tests/integration/targets/test_zabbix_host_events_update", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_host_events_update/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_host_events_update/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "63ae23343a8854777c0e014be5fdd33db6a6b78f96d22a889ad78556dc0ffa81", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_host_events_update/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_host_events_update/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "4a202829b4dcf0556eda80dcfdf315aa40540997e4286cfd441eac6ef95fa131", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3b0a0d8ba4b38321e60d42f0d93331473371e2dbd1e0e53a3f7a1ddce6cfa317", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_teardown.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f37b00a4d8ab112a8b6d43378eb9fc0c2a334ef12811ed4c69e20fe466339594", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_tests.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "34d77f1f1cbb6e639aca44c1f91b55106091f8e2ac0c22f6fbb90ecaeb1b28f5", + "format": 1 + }, + { "name": "tests/integration/targets/test_zabbix_host_info", "ftype": "dir", "chksum_type": null, @@ -2731,6 +2857,118 @@ "format": 1 }, { + "name": "tests/integration/targets/test_zabbix_item", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_item/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_item/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "63ae23343a8854777c0e014be5fdd33db6a6b78f96d22a889ad78556dc0ffa81", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_item/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_item/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "88728d40518ddfcaba88ae038b478cbb6758c601b93c7e384c4fc69ab3561915", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_item/tasks/zabbix_setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b452b8a9c1c973f25dd408e2cc94966005496f9398ad3b4caf0daf63f603e034", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_item/tasks/zabbix_teardown.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c0784486108c91c1c600e6fe9274fe41c74cfac179cc85a682a6f96a860fb33f", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_item/tasks/zabbix_tests.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "bf05aaec5b1e5775d76151e653629c2fac4e5f28b73fb68e6a77faa2e20892ae", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_itemprototype", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_itemprototype/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_itemprototype/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "63ae23343a8854777c0e014be5fdd33db6a6b78f96d22a889ad78556dc0ffa81", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_itemprototype/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_itemprototype/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "eb08b68052b69e34134588369ffe3aed732f71416d7782a2a1148ac95a83e94d", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "82f652382e99595d8c98490c12357554a80fb3f44e0d9266bbd7048f81b6683e", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_teardown.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c0784486108c91c1c600e6fe9274fe41c74cfac179cc85a682a6f96a860fb33f", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_tests.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "0b0361125b18999c1b70bc8794c06759651b7c84dd9dba77c9ce2e3b88d8c55b", + "format": 1 + }, + { "name": "tests/integration/targets/test_zabbix_maintenance", "ftype": "dir", "chksum_type": null, @@ -3333,6 +3571,118 @@ "format": 1 }, { + "name": "tests/integration/targets/test_zabbix_trigger", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_trigger/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_trigger/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "63ae23343a8854777c0e014be5fdd33db6a6b78f96d22a889ad78556dc0ffa81", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_trigger/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_trigger/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "51268021168f4a1d99aedf7f8721ad5181edc8307b770daf5781b13193ce0849", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_trigger/tasks/zabbix_setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ad14bba00c032393d931c90dc09d984ddae41f37b444ce60a5a6262148f7f029", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_trigger/tasks/zabbix_teardown.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "a8d4e25b566a1d73a8a5d60d4402836c129001a84c3b91091b8fd7ac7ec3b5f3", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_trigger/tasks/zabbix_tests.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "970d7065d3f99a4611ea746417e9a09c921821ab538e5911c4834f142d170dea", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_triggerprototype", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_triggerprototype/meta", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_triggerprototype/meta/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "63ae23343a8854777c0e014be5fdd33db6a6b78f96d22a889ad78556dc0ffa81", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_triggerprototype/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_triggerprototype/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d039addf6c1a402806568d87a796cc7c5cd65c84fe688e5a68b1fbb55a69f582", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_setup.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d85a1ca01851714d4c4c4f5149ee6c414b553f062cb00ae1071f108e0cba3533", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_teardown.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e0a57d0d626d8a91bb298104a2dad6504054134224057ba4371cb3c362d524da", + "format": 1 + }, + { + "name": "tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_tests.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "539f9a3ddec14e95a711e2622142d000ffd677cc77bf8f237d8ac196262e6986", + "format": 1 + }, + { "name": "tests/integration/targets/test_zabbix_user", "ftype": "dir", "chksum_type": null, @@ -3539,7 +3889,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "841378afa489d7ab18a26f89a6c8a91949c1fb0c05c54b00ab5518157d83f3fa", + "chksum_sha256": "4cb82a3565187516b368d9f5dfceeb756f5d9aff8eb9cd867bfea2bf96595cf7", "format": 1 }, { @@ -3581,7 +3931,7 @@ "name": "README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e78a31db573596c05c1b54e4da2ab59b53b57c8e19b41694e16fc8a600d366e8", + "chksum_sha256": "21818a52c2f3c431ee8614f87a2be5dcec3e8350b613d20028f83a3fe3085d8d", "format": 1 }, { diff --git a/ansible_collections/community/zabbix/MANIFEST.json b/ansible_collections/community/zabbix/MANIFEST.json index 803b2a538..e4395622f 100644 --- a/ansible_collections/community/zabbix/MANIFEST.json +++ b/ansible_collections/community/zabbix/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "zabbix", - "version": "2.4.0", + "version": "2.5.1", "authors": [ "Dusan Matejka (@D3DeFi)", "sky-joker (@sky-joker)", @@ -35,7 +35,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "48923f5d0d4edaa37a77a0dda92c0f41f762a24a9d7ab4bd04c816cf9f3bd73a", + "chksum_sha256": "2240b795e1121857fa2806c32e30cfc339d18ffad8914f097414ceaba4733eac", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/zabbix/README.md b/ansible_collections/community/zabbix/README.md index 889645483..6663beb2d 100644 --- a/ansible_collections/community/zabbix/README.md +++ b/ansible_collections/community/zabbix/README.md @@ -104,7 +104,7 @@ You can also include it in a `requirements.yml` file along with other required c --- collections: - name: community.zabbix - version: 2.4.0 + version: 2.5.1 - name: ansible.posix version: 1.3.0 - name: community.general diff --git a/ansible_collections/community/zabbix/changelogs/.plugin-cache.yaml b/ansible_collections/community/zabbix/changelogs/.plugin-cache.yaml index 78da79cd3..1fd62c57e 100644 --- a/ansible_collections/community/zabbix/changelogs/.plugin-cache.yaml +++ b/ansible_collections/community/zabbix/changelogs/.plugin-cache.yaml @@ -47,6 +47,11 @@ plugins: name: zabbix_discovery_rule namespace: '' version_added: null + zabbix_discoveryrule: + description: Create/delete Zabbix discovery rules + name: zabbix_discoveryrule + namespace: '' + version_added: null zabbix_globalmacro: description: Create/update/delete Zabbix Global macros name: zabbix_globalmacro @@ -77,6 +82,11 @@ plugins: name: zabbix_host_events_info namespace: '' version_added: null + zabbix_host_events_update: + description: update the status of event(s). + name: zabbix_host_events_update + namespace: '' + version_added: null zabbix_host_info: description: Gather information about Zabbix host name: zabbix_host_info @@ -92,6 +102,16 @@ plugins: name: zabbix_housekeeping namespace: '' version_added: 1.6.0 + zabbix_item: + description: Create/delete Zabbix items + name: zabbix_item + namespace: '' + version_added: null + zabbix_itemprototype: + description: Create/delete Zabbix item prototypes + name: zabbix_itemprototype + namespace: '' + version_added: null zabbix_maintenance: description: Create Zabbix maintenance windows name: zabbix_maintenance @@ -162,6 +182,16 @@ plugins: name: zabbix_token namespace: '' version_added: 2.1.0 + zabbix_trigger: + description: Create/delete Zabbix triggers + name: zabbix_trigger + namespace: '' + version_added: null + zabbix_triggerprototype: + description: Create/delete Zabbix triggerprototypes + name: zabbix_triggerprototype + namespace: '' + version_added: null zabbix_user: description: Create/update/delete Zabbix users name: zabbix_user @@ -196,4 +226,4 @@ plugins: shell: {} strategy: {} vars: {} -version: 2.4.0 +version: 2.5.1 diff --git a/ansible_collections/community/zabbix/changelogs/changelog.yaml b/ansible_collections/community/zabbix/changelogs/changelog.yaml index 608160c0b..e83d608fc 100644 --- a/ansible_collections/community/zabbix/changelogs/changelog.yaml +++ b/ansible_collections/community/zabbix/changelogs/changelog.yaml @@ -3,1150 +3,1187 @@ releases: 0.1.0: changes: bugfixes: - - zabbix_action - allow str values for ``esc_period`` options (see `#66841 <https://github.com/ansible/ansible/pull/66841>`_). - - zabbix_action - no longer requires ``esc_period`` and ``event_source`` arguments - when ``state=absent``. - - zabbix_host - now supports configuring user macros and host tags on the managed - host (see `#66777 <https://github.com/ansible/ansible/pull/66777>`_). - - zabbix_host_info - ``host_name`` based search results now include host groups. - - zabbix_hostmacro - ``macro_name`` now accepts macros in zabbix native format - as well (e.g. ``{$MACRO}``). - - zabbix_hostmacro - ``macro_value`` is no longer required when ``state=absent``. - - zabbix_proxy (module) - ``interface`` sub-options ``type`` and ``main`` are - now deprecated and will be removed in community.general 3.0.0. Also, the values - passed to ``interface`` are now checked for correct types and unexpected keys. - - zabbix_proxy (module) - added option proxy_address for comma-delimited list - of IP/CIDR addresses or DNS names to accept active proxy requests from. - - zabbix_template - add new option omit_date to remove date from exported/dumped - template (see `#67302 <https://github.com/ansible/ansible/pull/67302>`_). - - zabbix_template - adding new update rule templateLinkage.deleteMissing for - newer zabbix versions (see `#66747 <https://github.com/ansible/ansible/pull/66747>`_). - - zabbix_template_info - add new option omit_date to remove date from exported/dumped - template (see `#67302 <https://github.com/ansible/ansible/pull/67302>`_). + - zabbix_action - allow str values for ``esc_period`` options (see `#66841 <https://github.com/ansible/ansible/pull/66841>`_). + - zabbix_action - no longer requires ``esc_period`` and ``event_source`` arguments + when ``state=absent``. + - zabbix_host - now supports configuring user macros and host tags on the managed + host (see `#66777 <https://github.com/ansible/ansible/pull/66777>`_). + - zabbix_host_info - ``host_name`` based search results now include host groups. + - zabbix_hostmacro - ``macro_name`` now accepts macros in zabbix native format + as well (e.g. ``{$MACRO}``). + - zabbix_hostmacro - ``macro_value`` is no longer required when ``state=absent``. + - zabbix_proxy (module) - ``interface`` sub-options ``type`` and ``main`` are + now deprecated and will be removed in community.general 3.0.0. Also, the values + passed to ``interface`` are now checked for correct types and unexpected keys. + - zabbix_proxy (module) - added option proxy_address for comma-delimited list + of IP/CIDR addresses or DNS names to accept active proxy requests from. + - zabbix_template - add new option omit_date to remove date from exported/dumped + template (see `#67302 <https://github.com/ansible/ansible/pull/67302>`_). + - zabbix_template - adding new update rule templateLinkage.deleteMissing for + newer zabbix versions (see `#66747 <https://github.com/ansible/ansible/pull/66747>`_). + - zabbix_template_info - add new option omit_date to remove date from exported/dumped + template (see `#67302 <https://github.com/ansible/ansible/pull/67302>`_). deprecated_features: - - zabbix_proxy (module) - deprecates ``interface`` sub-options ``type`` and - ``main`` when proxy type is set to passive via ``status=passive``. Make sure - these suboptions are removed from your playbook as they were never supported - by Zabbix in the first place. + - zabbix_proxy (module) - deprecates ``interface`` sub-options ``type`` and + ``main`` when proxy type is set to passive via ``status=passive``. Make sure + these suboptions are removed from your playbook as they were never supported + by Zabbix in the first place. minor_changes: - - zabbix inventory plugin now no longer prints DeprecationWarning when used - with Python3 due to SafeConfigParser. - - zabbix_action - arguments ``event_source`` and ``esc_period`` no longer required - when ``state=absent``. - - zabbix_host - fixed inventory_mode key error, which occurs with Zabbix 4.4.1 - or more (see `#65304 <https://github.com/ansible/ansible/issues/65304>`_). - - zabbix_host - was not possible to update a host where visible_name was not - set in zabbix. - - zabbix_mediatype - Fixed to support zabbix 4.4 or more and python3 (see `#67693 - <https://github.com/ansible/ansible/pull/67693>`_). - - zabbix_template - fixed error when providing empty ``link_templates`` to the - module (see `#66417 <https://github.com/ansible/ansible/issues/66417>`_). - - zabbix_template - fixed invalid (non-importable) output provided by exporting - XML (see `#66466 <https://github.com/ansible/ansible/issues/66466>`_). - - zabbix_user - Fixed an issue where module failed with zabbix 4.4 or above - (see `#67475 <https://github.com/ansible/ansible/pull/67475>`_). - release_summary: '| Release date: 2020-06-15 + - zabbix inventory plugin now no longer prints DeprecationWarning when used + with Python3 due to SafeConfigParser. + - zabbix_action - arguments ``event_source`` and ``esc_period`` no longer required + when ``state=absent``. + - zabbix_host - fixed inventory_mode key error, which occurs with Zabbix 4.4.1 + or more (see `#65304 <https://github.com/ansible/ansible/issues/65304>`_). + - zabbix_host - was not possible to update a host where visible_name was not + set in zabbix. + - zabbix_mediatype - Fixed to support zabbix 4.4 or more and python3 (see `#67693 + <https://github.com/ansible/ansible/pull/67693>`_). + - zabbix_template - fixed error when providing empty ``link_templates`` to the + module (see `#66417 <https://github.com/ansible/ansible/issues/66417>`_). + - zabbix_template - fixed invalid (non-importable) output provided by exporting + XML (see `#66466 <https://github.com/ansible/ansible/issues/66466>`_). + - zabbix_user - Fixed an issue where module failed with zabbix 4.4 or above + (see `#67475 <https://github.com/ansible/ansible/pull/67475>`_). + release_summary: "| Release date: 2020-06-15 - ' + " fragments: - - 010release.yml - release_date: '2020-06-15' + - 010release.yml + release_date: "2020-06-15" 0.2.0: changes: bugfixes: - - zabbix_action - documented ``value2`` parameter and ``notify_all_involved`` - option. - - zabbix_maintenance - changing value of ``description`` parameter now actually - updates maintenance's description. - - zabbix_template - is now able to perform ``state=dump`` when using ``ansible-playbook - --check``. - - zabbix_template - no longer imports template from ``template_json`` or ``template_xml`` - when using ``ansible-playbook --check``. + - zabbix_action - documented ``value2`` parameter and ``notify_all_involved`` + option. + - zabbix_maintenance - changing value of ``description`` parameter now actually + updates maintenance's description. + - zabbix_template - is now able to perform ``state=dump`` when using ``ansible-playbook + --check``. + - zabbix_template - no longer imports template from ``template_json`` or ``template_xml`` + when using ``ansible-playbook --check``. minor_changes: - - Documentation for roles moved to ``docs/`` sub-directory in the collection. - - New **role zabbix_agent** - previously known as dj-wasabi/zabbix-agent (also - see `UPGRADE.md <https://github.com/ansible-collections/community.zabbix/blob/main/docs/UPGRADE.md>`_ - for each role). - - New **role zabbix_javagateway** - previously known as dj-wasabi/zabbix-javagateway. - - New **role zabbix_proxy** - previously known as dj-wasabi/zabbix-proxy. - - New **role zabbix_server** - previously known as dj-wasabi/zabbix-server. - - New **role zabbix_web** - previously known as dj-wasabi/zabbix-web. - - zabbix_action - new alias ``update_operations`` for ``acknowledge_operations`` - parameter. - - zabbix_host - ``macros`` now support new macro types ``text`` and ``secret``. - - zabbix_host - new option ``details`` (additional SNMP details) for ``interfaces`` - parameter. - - zabbix_host - now supports Zabbix 5.0. - - zabbix_proxy (module) - now supports Zabbix 5.0. - - zabbix_screen - ``host_group`` parameter now accepts multiple groups. - release_summary: '| Release date: 2020-06-15 ' + - Documentation for roles moved to ``docs/`` sub-directory in the collection. + - New **role zabbix_agent** - previously known as dj-wasabi/zabbix-agent (also + see `UPGRADE.md <https://github.com/ansible-collections/community.zabbix/blob/main/docs/UPGRADE.md>`_ + for each role). + - New **role zabbix_javagateway** - previously known as dj-wasabi/zabbix-javagateway. + - New **role zabbix_proxy** - previously known as dj-wasabi/zabbix-proxy. + - New **role zabbix_server** - previously known as dj-wasabi/zabbix-server. + - New **role zabbix_web** - previously known as dj-wasabi/zabbix-web. + - zabbix_action - new alias ``update_operations`` for ``acknowledge_operations`` + parameter. + - zabbix_host - ``macros`` now support new macro types ``text`` and ``secret``. + - zabbix_host - new option ``details`` (additional SNMP details) for ``interfaces`` + parameter. + - zabbix_host - now supports Zabbix 5.0. + - zabbix_proxy (module) - now supports Zabbix 5.0. + - zabbix_screen - ``host_group`` parameter now accepts multiple groups. + release_summary: "| Release date: 2020-06-15 " fragments: - - 020release.yml - release_date: '2020-06-15' + - 020release.yml + release_date: "2020-06-15" 0.3.0: changes: bugfixes: - - zabbix_action - choices for the ``inventory`` paramter sub option in ``*operations`` - arguments have been clarified to ``manual`` and ``automatic``. - - zabbix_action - fixed error on changed API fields ``*default_message`` and - ``*default_subject`` for Zabbix 5.0 (see `#92 <https://github.com/ansible-collections/community.zabbix/pull/92>`_). - - zabbix_action - module will no longer fail when searching for global script - provided to ``script_name`` parameter. - - zabbix_action - now correctly selects mediatype for the (normal|recovery|update) - operations with Zabbix 4.4 and newer. - - zabbix_agent - fixed installation of agent on Windows to directories with - spaces. - - zabbix_agent - role should no longer fail when looking for ``getenforce`` - binary. - - zabbix_host - module will no longer convert context part of user macro to - upper case. - - zabbix_proxy (role) - will now correctly install python3-libsemanage on RHEL - OS family. - - zabbix_service - fixed the zabbix_service has no idempotency with Zabbix 5.0. - - zabbix_web - now no longer fails when rendering apache vhost template. + - zabbix_action - choices for the ``inventory`` paramter sub option in ``*operations`` + arguments have been clarified to ``manual`` and ``automatic``. + - zabbix_action - fixed error on changed API fields ``*default_message`` and + ``*default_subject`` for Zabbix 5.0 (see `#92 <https://github.com/ansible-collections/community.zabbix/pull/92>`_). + - zabbix_action - module will no longer fail when searching for global script + provided to ``script_name`` parameter. + - zabbix_action - now correctly selects mediatype for the (normal|recovery|update) + operations with Zabbix 4.4 and newer. + - zabbix_agent - fixed installation of agent on Windows to directories with + spaces. + - zabbix_agent - role should no longer fail when looking for ``getenforce`` + binary. + - zabbix_host - module will no longer convert context part of user macro to + upper case. + - zabbix_proxy (role) - will now correctly install python3-libsemanage on RHEL + OS family. + - zabbix_service - fixed the zabbix_service has no idempotency with Zabbix 5.0. + - zabbix_web - now no longer fails when rendering apache vhost template. minor_changes: - - All roles now **support Zabbix 5.0** and by default install this version (see - `#131 <https://github.com/ansible-collections/community.zabbix/pull/131>`_ - and `#121 <https://github.com/ansible-collections/community.zabbix/pull/121>`_). - - Roles will now install gnupg on Debian OS family if not present. - - zabbix_action - no longer requires ``password`` and ``ssh_*key_file`` parameters - at the same time for ``remote_command`` operations of type SSH. - - zabbix_action - parameter ``ssh_auth_type`` for SSH ``remote_command`` operation - now correctly identifies which other parameters are required. - - zabbix_discovery_rule - refactoring module to use ``module_utils`` classes - and functions, adjust return values on success, add documentation for return - values. - - zabbix_discovery_rule - refactoring the module to remove unnecessary variables - and fix a variable typo. - - zabbix_mediatype - new options ``message_templates``, ``description`` and - many more related to ``type=webhook``. - - zabbix_mediatype - now supports new ``webhook`` media type. - release_summary: '| Release date: 2020-07-26 + - All roles now **support Zabbix 5.0** and by default install this version (see + `#131 <https://github.com/ansible-collections/community.zabbix/pull/131>`_ + and `#121 <https://github.com/ansible-collections/community.zabbix/pull/121>`_). + - Roles will now install gnupg on Debian OS family if not present. + - zabbix_action - no longer requires ``password`` and ``ssh_*key_file`` parameters + at the same time for ``remote_command`` operations of type SSH. + - zabbix_action - parameter ``ssh_auth_type`` for SSH ``remote_command`` operation + now correctly identifies which other parameters are required. + - zabbix_discovery_rule - refactoring module to use ``module_utils`` classes + and functions, adjust return values on success, add documentation for return + values. + - zabbix_discovery_rule - refactoring the module to remove unnecessary variables + and fix a variable typo. + - zabbix_mediatype - new options ``message_templates``, ``description`` and + many more related to ``type=webhook``. + - zabbix_mediatype - now supports new ``webhook`` media type. + release_summary: "| Release date: 2020-07-26 - ' + " fragments: - - 030release.yml + - 030release.yml modules: - - description: Create/delete/update Zabbix discovery rules - name: zabbix_discovery_rule - namespace: '' - - description: Create/delete/update Zabbix user groups - name: zabbix_usergroup - namespace: '' - release_date: '2020-07-26' + - description: Create/delete/update Zabbix discovery rules + name: zabbix_discovery_rule + namespace: "" + - description: Create/delete/update Zabbix user groups + name: zabbix_usergroup + namespace: "" + release_date: "2020-07-26" 1.0.0: changes: breaking_changes: - - zabbix_javagateway - options ``javagateway_pidfile``, ``javagateway_listenip``, - ``javagateway_listenport`` and ``javagateway_startpollers`` renamed to ``zabbix_javagateway_xyz`` - (see `UPGRADE.md <https://github.com/ansible-collections/community.zabbix/blob/main/docs/UPGRADE.md>`_). + - zabbix_javagateway - options ``javagateway_pidfile``, ``javagateway_listenip``, + ``javagateway_listenport`` and ``javagateway_startpollers`` renamed to ``zabbix_javagateway_xyz`` + (see `UPGRADE.md <https://github.com/ansible-collections/community.zabbix/blob/main/docs/UPGRADE.md>`_). bugfixes: - - all roles - a ``handler`` is configured when ``zabbix_http(s)_proxy`` is defined - which will remove the proxy line from the repository files. This results that - execution of the roles are not idempotent anymore. - - zabbix_proxy (role) - ``StartPreprocessors`` only works with version 4.2 or - higher. When a lower version is used, it will not be added to the configuration. - - zabbix_proxy (role) - only install the sql files that needs to be executed - for when ``zabbix_repo`` is set to ``epel``. - - zabbix_server - ``StartPreprocessors`` only works with version 4.2 or higher. - When a lower version is used, it will not be added to the configuration. - - zabbix_server - only install the sql files that needs to be executed for when - ``zabbix_repo`` is set to ``epel``. + - all roles - a ``handler`` is configured when ``zabbix_http(s)_proxy`` is defined + which will remove the proxy line from the repository files. This results that + execution of the roles are not idempotent anymore. + - zabbix_proxy (role) - ``StartPreprocessors`` only works with version 4.2 or + higher. When a lower version is used, it will not be added to the configuration. + - zabbix_proxy (role) - only install the sql files that needs to be executed + for when ``zabbix_repo`` is set to ``epel``. + - zabbix_server - ``StartPreprocessors`` only works with version 4.2 or higher. + When a lower version is used, it will not be added to the configuration. + - zabbix_server - only install the sql files that needs to be executed for when + ``zabbix_repo`` is set to ``epel``. minor_changes: - - Added the possibility to configure the ``mode`` for the ``zabbix_{agent,server,proxy}_include`` - directories. - - all roles - added the possibility to configure the ``mode`` for the ``yum`` - repositories files in case it contains credentials. - - zabbix_agent - ``zabbix-sender`` and ``zabbix-get`` will not be installed - when ``zabbix_repo`` is set to ``epel``, as they are not part of the repository. - - zabbix_agent - added option to change between HTTP/HTTPS with ``zabbix_repo_yum_schema``. - - zabbix_agent - can also install the zabbix-agent2 application when ``zabbix_agent2`` - is set to ``true``. - - zabbix_proxy (role) - a user and group are created on the host when ``zabbix_repo`` - is set to ``epel``. - - zabbix_proxy (role) - now supports ``startpreprocessors`` setting and encryption - when connecting to database (see `#164 <https://github.com/ansible-collections/community.zabbix/pull/164>`_). - - zabbix_server - a user and group are created on the host when ``zabbix_repo`` - is set to ``epel``. - - zabbix_server - added option to change between HTTP/HTTPS with ``zabbix_repo_yum_schema``. - - zabbix_server - now supports ``startpreprocessors`` setting and encryption - when connecting to database (see `#164 <https://github.com/ansible-collections/community.zabbix/pull/164>`_). - - zabbix_web - a property is added ``zabbix_web_doubleprecision`` which currently - is set to ``false`` for default installations. For new installations this - should be set to ``True``. For upgraded installations, please read database - `upgrade notes <https://www.zabbix.com/documentation/current/manual/installation/upgrade_notes_500>`_ - (Paragraph "Enabling extended range of numeric (float) values") before enabling - this option. - - zabbix_web - added option to change between HTTP/HTTPS with ``zabbix_repo_yum_schema``. - - zabbix_web - don't remove the files that Zabbix will install during installation - when you don't want to configure a virtual host configuration. - release_summary: '| Release date: 2020-08-16 + - Added the possibility to configure the ``mode`` for the ``zabbix_{agent,server,proxy}_include`` + directories. + - all roles - added the possibility to configure the ``mode`` for the ``yum`` + repositories files in case it contains credentials. + - zabbix_agent - ``zabbix-sender`` and ``zabbix-get`` will not be installed + when ``zabbix_repo`` is set to ``epel``, as they are not part of the repository. + - zabbix_agent - added option to change between HTTP/HTTPS with ``zabbix_repo_yum_schema``. + - zabbix_agent - can also install the zabbix-agent2 application when ``zabbix_agent2`` + is set to ``true``. + - zabbix_proxy (role) - a user and group are created on the host when ``zabbix_repo`` + is set to ``epel``. + - zabbix_proxy (role) - now supports ``startpreprocessors`` setting and encryption + when connecting to database (see `#164 <https://github.com/ansible-collections/community.zabbix/pull/164>`_). + - zabbix_server - a user and group are created on the host when ``zabbix_repo`` + is set to ``epel``. + - zabbix_server - added option to change between HTTP/HTTPS with ``zabbix_repo_yum_schema``. + - zabbix_server - now supports ``startpreprocessors`` setting and encryption + when connecting to database (see `#164 <https://github.com/ansible-collections/community.zabbix/pull/164>`_). + - zabbix_web - a property is added ``zabbix_web_doubleprecision`` which currently + is set to ``false`` for default installations. For new installations this + should be set to ``True``. For upgraded installations, please read database + `upgrade notes <https://www.zabbix.com/documentation/current/manual/installation/upgrade_notes_500>`_ + (Paragraph "Enabling extended range of numeric (float) values") before enabling + this option. + - zabbix_web - added option to change between HTTP/HTTPS with ``zabbix_repo_yum_schema``. + - zabbix_web - don't remove the files that Zabbix will install during installation + when you don't want to configure a virtual host configuration. + release_summary: "| Release date: 2020-08-16 - ' + " fragments: - - 100-release-prep.yaml - - role-agent-supports-zabbix-agent2.yaml - - role-all-configure-mode-include.yaml - - role-all-configure-mode-with-handlers.yaml - - role-all-fix-epel-installations.yaml - - role-web-add-doubleprecision.yaml - - role-web-zabbix_vhost-dont-remove-files.yaml - release_date: '2020-08-16' + - 100-release-prep.yaml + - role-agent-supports-zabbix-agent2.yaml + - role-all-configure-mode-include.yaml + - role-all-configure-mode-with-handlers.yaml + - role-all-fix-epel-installations.yaml + - role-web-add-doubleprecision.yaml + - role-web-zabbix_vhost-dont-remove-files.yaml + release_date: "2020-08-16" 1.1.0: changes: bugfixes: - - all roles - missing ``become`` set to ``true`` was added to each task that - requires admin privleges. - - zabbix_agent - added new properties and updated documentation to allow for - correct Zabbix Agent2 configuration. - - zabbix_agent - fixed bug where Nginx prevented Apache from working as it was - part of the FPM configuration. + - all roles - missing ``become`` set to ``true`` was added to each task that + requires admin privleges. + - zabbix_agent - added new properties and updated documentation to allow for + correct Zabbix Agent2 configuration. + - zabbix_agent - fixed bug where Nginx prevented Apache from working as it was + part of the FPM configuration. minor_changes: - - all roles - added ``zabbix_{agent,web,server,proxy,javagateway}_conf_mode`` - option for configuring a mode of the configuration file for each Zabbix service. - - zabbix_proxy (role) - added an option ``innodb_default_row_format`` for MariaDB/MySQL - if it isn't set to ``dynamic``. - - zabbix_server - fixed installation output when using MySQL database to not - print PostgreSQL. - - zabbix_user - ``passwd`` no longer required when ALL groups in ``usrgrps`` - use LDAP as ``gui_access`` (see `#240 <https://github.com/ansible-collections/community.zabbix/issues/232>`_). - - zabbix_user - no longer requires ``usrgrps`` when ``state=absent`` (see `#240 - <https://github.com/ansible-collections/community.zabbix/issues/232>`_). - - zabbix_web - added several configuration options for the PHP-FPM setup to - configure the listen (socket) file. - - zabbix_web - added support for configuring Zabbix Web with Nginx, same way - as with Apache. - release_summary: '| Release date: 2020-10-22 + - all roles - added ``zabbix_{agent,web,server,proxy,javagateway}_conf_mode`` + option for configuring a mode of the configuration file for each Zabbix service. + - zabbix_proxy (role) - added an option ``innodb_default_row_format`` for MariaDB/MySQL + if it isn't set to ``dynamic``. + - zabbix_server - fixed installation output when using MySQL database to not + print PostgreSQL. + - zabbix_user - ``passwd`` no longer required when ALL groups in ``usrgrps`` + use LDAP as ``gui_access`` (see `#240 <https://github.com/ansible-collections/community.zabbix/issues/232>`_). + - zabbix_user - no longer requires ``usrgrps`` when ``state=absent`` (see `#240 + <https://github.com/ansible-collections/community.zabbix/issues/232>`_). + - zabbix_web - added several configuration options for the PHP-FPM setup to + configure the listen (socket) file. + - zabbix_web - added support for configuring Zabbix Web with Nginx, same way + as with Apache. + release_summary: "| Release date: 2020-10-22 - ' + " fragments: - - 240-zabbix-user-nopass-ldap.yaml - - role-agent-correct-usage-acl.yaml - - role-agent-zabbix-agent2-props.yaml - - role-server-screen-output.yaml - - role-web-add-support-for-nginx.yaml - - role-web-added-some-properties.yaml - - roles-all-add-become.yaml - - roles-all-configure-conf-mode.yaml - - roles-server-proxy-add-innodb-check.yaml - release_date: '2020-10-22' + - 240-zabbix-user-nopass-ldap.yaml + - role-agent-correct-usage-acl.yaml + - role-agent-zabbix-agent2-props.yaml + - role-server-screen-output.yaml + - role-web-add-support-for-nginx.yaml + - role-web-added-some-properties.yaml + - roles-all-add-become.yaml + - roles-all-configure-conf-mode.yaml + - roles-server-proxy-add-innodb-check.yaml + release_date: "2020-10-22" 1.2.0: changes: bugfixes: - - When installing the Zabbix packages, we disable all other yum repositories - except the one for the Zabbix. - - zabbix_agent - Agent 2 also be able to use userparameters file. - - zabbix_agent - Also work on SLES 12 sp5 - - zabbix_agent - Documented the property 'zabbix_proxy_ip' in the documentation. - - zabbix_agent - There was an task that wasn't able to use an http(s)_proxy - environment while installing an package. - - zabbix_agent - Windows - Able to create PSK file - - zabbix_agent - Windows - Fixing download links to proper version/url - - zabbix_agent - Windows - Removal of not working property - - zabbix_agent - Zabbix packages were not able to install properly on Fedora. - When the packages are installed, the version will be appended to the package - name. This is eofr all RedHat related OS'es. - - zabbix_agent - fixed issue with zabbix_agent2_tlspsk_auto having no effect - when using zabbix_agent2 - - zabbix_agent - fixed issue with zabbix_api_create_hosts and TLS configuration - when using zabbix_agent2, where zabbix_agent_tls* settings were used instead - of zabbix_agent2_tls* - - zabbix_host - module will no longer require ``interfaces`` to be present when - creating host with Zabbix 5.2 (https://github.com/ansible-collections/community.zabbix/pull/291). - - zabbix_host - should no longer fail with 'host cannot have more than one default - interface' error (https://github.com/ansible-collections/community.zabbix/pull/309). - - zabbix_proxy (role) - Added missing paragraph for the SQLite3 as database. - - zabbix_proxy (role) - The become option was missing in some essential tasks - when installing the Zabbix Proxy with SQLite3 as database. - - zabbix_proxy (role) - Various documentation fixes removing the Zabbix Server - and replaced it with actual Zabbix Proxy information. - - zabbix_proxy - Added new property 'zabbix_proxy_ip' to determine ip for host - running the Zabbix Proxy. - - zabbix_proxy - The 'interface' option was missing when creating an Proxy via - the API. - - zabbix_template - fixed documentation for ``macros`` argument (https://github.com/ansible-collections/community.zabbix/pull/296). - - zabbix_template - fixed encode error when using Python2 (https://github.com/ansible-collections/community.zabbix/pull/297). - - zabbix_template - fixed issue when importing templates to zabbix version. - >= 5.2 - - zabbix_template_info - fixed encode error when using Python2 (https://github.com/ansible-collections/community.zabbix/pull/297). - - zabbix_user - disable no_log warning for option override_password. - - zabbix_user - fixed issue where module couldn't create a user since Zabbix - 5.2 (https://github.com/ansible-collections/community.zabbix/pull/260). - - zabbix_web - fixed issue Role cannot install Zabbix web 5.0 on RHEL 7 (https://github.com/ansible-collections/community.zabbix/issues/202). + - When installing the Zabbix packages, we disable all other yum repositories + except the one for the Zabbix. + - zabbix_agent - Agent 2 also be able to use userparameters file. + - zabbix_agent - Also work on SLES 12 sp5 + - zabbix_agent - Documented the property 'zabbix_proxy_ip' in the documentation. + - zabbix_agent - There was an task that wasn't able to use an http(s)_proxy + environment while installing an package. + - zabbix_agent - Windows - Able to create PSK file + - zabbix_agent - Windows - Fixing download links to proper version/url + - zabbix_agent - Windows - Removal of not working property + - zabbix_agent - Zabbix packages were not able to install properly on Fedora. + When the packages are installed, the version will be appended to the package + name. This is eofr all RedHat related OS'es. + - zabbix_agent - fixed issue with zabbix_agent2_tlspsk_auto having no effect + when using zabbix_agent2 + - zabbix_agent - fixed issue with zabbix_api_create_hosts and TLS configuration + when using zabbix_agent2, where zabbix_agent_tls* settings were used instead + of zabbix_agent2_tls* + - zabbix_host - module will no longer require ``interfaces`` to be present when + creating host with Zabbix 5.2 (https://github.com/ansible-collections/community.zabbix/pull/291). + - zabbix_host - should no longer fail with 'host cannot have more than one default + interface' error (https://github.com/ansible-collections/community.zabbix/pull/309). + - zabbix_proxy (role) - Added missing paragraph for the SQLite3 as database. + - zabbix_proxy (role) - The become option was missing in some essential tasks + when installing the Zabbix Proxy with SQLite3 as database. + - zabbix_proxy (role) - Various documentation fixes removing the Zabbix Server + and replaced it with actual Zabbix Proxy information. + - zabbix_proxy - Added new property 'zabbix_proxy_ip' to determine ip for host + running the Zabbix Proxy. + - zabbix_proxy - The 'interface' option was missing when creating an Proxy via + the API. + - zabbix_template - fixed documentation for ``macros`` argument (https://github.com/ansible-collections/community.zabbix/pull/296). + - zabbix_template - fixed encode error when using Python2 (https://github.com/ansible-collections/community.zabbix/pull/297). + - zabbix_template - fixed issue when importing templates to zabbix version. + >= 5.2 + - zabbix_template_info - fixed encode error when using Python2 (https://github.com/ansible-collections/community.zabbix/pull/297). + - zabbix_user - disable no_log warning for option override_password. + - zabbix_user - fixed issue where module couldn't create a user since Zabbix + 5.2 (https://github.com/ansible-collections/community.zabbix/pull/260). + - zabbix_web - fixed issue Role cannot install Zabbix web 5.0 on RHEL 7 (https://github.com/ansible-collections/community.zabbix/issues/202). minor_changes: - - Updated the roles to support Zabbix 5.2. - - zabbix_agent - Added a new property `zabbix_agent_dont_detect_ip` when set - to true, it won't detect the ips and no need to install the python module - `netaddr`. - - zabbix_agent - Added parameter `zabbix_agent_package_remove` when set to `true` - and `zabbix_agent2` is set to `true` it will uninstall the `zabbix-agent` - service and package. - - zabbix_agent - added `zabbix_agent_install_agent_only` Will only install the - Zabbix Agent package and not the `zabbix-sender` or `zabbix-get` packages. - - zabbix_template - Fixed to decode Unicode Escape of multibyte strings in an - importing template data(https://github.com/ansible-collections/community.zabbix/pull/226). - - zabbix_user - added new parameters to set timezone and role_name for users - (https://github.com/ansible-collections/community.zabbix/pull/260). - - zabbix_user - user_medias now defaults to None and is optional (https://github.com/ansible-collections/community.zabbix/pull/264). - - zabbix_web - added `zabbix_web_rhel_release` which enable scl on RHEL (https://github.com/ansible-collections/community.zabbix/pull/266). - - zabbix_web - quality of life improvements when using Nginx (https://github.com/ansible-collections/community.zabbix/pull/304). - release_summary: '| Release date: 2021-01-11 | Last major release to support - Zabbix server 3.X versions in plugins.' + - Updated the roles to support Zabbix 5.2. + - zabbix_agent - Added a new property `zabbix_agent_dont_detect_ip` when set + to true, it won't detect the ips and no need to install the python module + `netaddr`. + - zabbix_agent - Added parameter `zabbix_agent_package_remove` when set to `true` + and `zabbix_agent2` is set to `true` it will uninstall the `zabbix-agent` + service and package. + - zabbix_agent - added `zabbix_agent_install_agent_only` Will only install the + Zabbix Agent package and not the `zabbix-sender` or `zabbix-get` packages. + - zabbix_template - Fixed to decode Unicode Escape of multibyte strings in an + importing template data(https://github.com/ansible-collections/community.zabbix/pull/226). + - zabbix_user - added new parameters to set timezone and role_name for users + (https://github.com/ansible-collections/community.zabbix/pull/260). + - zabbix_user - user_medias now defaults to None and is optional (https://github.com/ansible-collections/community.zabbix/pull/264). + - zabbix_web - added `zabbix_web_rhel_release` which enable scl on RHEL (https://github.com/ansible-collections/community.zabbix/pull/266). + - zabbix_web - quality of life improvements when using Nginx (https://github.com/ansible-collections/community.zabbix/pull/304). + release_summary: + "| Release date: 2021-01-11 | Last major release to support + Zabbix server 3.X versions in plugins." fragments: - - 226-zabbix_template.yaml - - 254-disable-no-log-warning.yml - - 260-zabbix_user.yml - - 264-allow-user_medias-to-be-optional.yaml - - 266-zabbix_web.yml - - 297-zabbix_template_modules.yml - - 309-host-interfaces.yaml - - agent-missing-proxy-task.yaml - - agent-not-detect-ips.yml - - agent-use-version-for-rh.yml - - agent2-psk-fixes.yml - - module-zabbix_host-interfaces-not-required.yaml - - module-zabbix_template-argspec-doc.yaml - - proxy-able-to-use-interface.yaml - - role-agent-allow-uninstall-agent.yaml - - role-agent-userparameter.yaml - - role-agent-windows-service-handling.yaml - - role-agent-work-with-sles.yaml - - role-proxy-sqlite3-zabbix-proxy.yaml - - roles-all-enable-zabbix-disable-rest.yaml - - roles-all-update-to-zabbix-52.yml - - templatescreens-fix.yml - release_date: '2021-01-11' + - 226-zabbix_template.yaml + - 254-disable-no-log-warning.yml + - 260-zabbix_user.yml + - 264-allow-user_medias-to-be-optional.yaml + - 266-zabbix_web.yml + - 297-zabbix_template_modules.yml + - 309-host-interfaces.yaml + - agent-missing-proxy-task.yaml + - agent-not-detect-ips.yml + - agent-use-version-for-rh.yml + - agent2-psk-fixes.yml + - module-zabbix_host-interfaces-not-required.yaml + - module-zabbix_template-argspec-doc.yaml + - proxy-able-to-use-interface.yaml + - role-agent-allow-uninstall-agent.yaml + - role-agent-userparameter.yaml + - role-agent-windows-service-handling.yaml + - role-agent-work-with-sles.yaml + - role-proxy-sqlite3-zabbix-proxy.yaml + - roles-all-enable-zabbix-disable-rest.yaml + - roles-all-update-to-zabbix-52.yml + - templatescreens-fix.yml + release_date: "2021-01-11" 1.3.0: changes: bugfixes: - - zabbix_action - now properly filters discovery rule checks by name (https://github.com/ansible-collections/community.zabbix/pull/349). - - zabbix_agent - corrected version for Windows agents (https://github.com/ansible-collections/community.zabbix/pull/316). - - zabbix_agent - fixed download URL for MacOS (https://github.com/ansible-collections/community.zabbix/pull/325). - - zabbix_server - now installs correct MySQL client packages on RHEL8 systems - (https://github.com/ansible-collections/community.zabbix/pull/343). - - zabbix_template - fixed an issue with Python2 where module wouldn't decode - Unicode characters (https://github.com/ansible-collections/community.zabbix/pull/322). - - zabbix_web - fixed installation of python3-libsemanage package RHEL7 and older - systems (https://github.com/ansible-collections/community.zabbix/pull/330). - - zabbix_web - role should now correctly determine naming of PHP packages on - older systems (https://github.com/ansible-collections/community.zabbix/pull/344). - - zabbix_web - updated default PHP version for Debian10 (https://github.com/ansible-collections/community.zabbix/pull/323). + - zabbix_action - now properly filters discovery rule checks by name (https://github.com/ansible-collections/community.zabbix/pull/349). + - zabbix_agent - corrected version for Windows agents (https://github.com/ansible-collections/community.zabbix/pull/316). + - zabbix_agent - fixed download URL for MacOS (https://github.com/ansible-collections/community.zabbix/pull/325). + - zabbix_server - now installs correct MySQL client packages on RHEL8 systems + (https://github.com/ansible-collections/community.zabbix/pull/343). + - zabbix_template - fixed an issue with Python2 where module wouldn't decode + Unicode characters (https://github.com/ansible-collections/community.zabbix/pull/322). + - zabbix_web - fixed installation of python3-libsemanage package RHEL7 and older + systems (https://github.com/ansible-collections/community.zabbix/pull/330). + - zabbix_web - role should now correctly determine naming of PHP packages on + older systems (https://github.com/ansible-collections/community.zabbix/pull/344). + - zabbix_web - updated default PHP version for Debian10 (https://github.com/ansible-collections/community.zabbix/pull/323). minor_changes: - - zabbix_agent - added support for installations on arm64 systems (https://github.com/ansible-collections/community.zabbix/pull/320). - - zabbix_proxy - now supports configuring StatsAllowedIP (https://github.com/ansible-collections/community.zabbix/pull/337). - - zabbix_server - added support for installtions on arm64 systems (https://github.com/ansible-collections/community.zabbix/pull/320). - - zabbix_web - added support for installtions on arm64 systems (https://github.com/ansible-collections/community.zabbix/pull/320). - release_summary: '| Release date: 2021-03-20 | Last major release to support - Zabbix server 3.X versions in plugins.' + - zabbix_agent - added support for installations on arm64 systems (https://github.com/ansible-collections/community.zabbix/pull/320). + - zabbix_proxy - now supports configuring StatsAllowedIP (https://github.com/ansible-collections/community.zabbix/pull/337). + - zabbix_server - added support for installtions on arm64 systems (https://github.com/ansible-collections/community.zabbix/pull/320). + - zabbix_web - added support for installtions on arm64 systems (https://github.com/ansible-collections/community.zabbix/pull/320). + release_summary: + "| Release date: 2021-03-20 | Last major release to support + Zabbix server 3.X versions in plugins." security_fixes: - - zabbix_action - no longer exposes remote SSH command password used in operations, - recovery & acknowledge operations to system logs (https://github.com/ansible-collections/community.zabbix/pull/345). - - zabbix_discovery_rule - no longer exposes SNMPv3 auth and priv passphrases - to system logs (https://github.com/ansible-collections/community.zabbix/pull/345). - - zabbix_host - no longer exposes SNMPv3 auth and priv passphrases to system - logs (https://github.com/ansible-collections/community.zabbix/pull/345). + - zabbix_action - no longer exposes remote SSH command password used in operations, + recovery & acknowledge operations to system logs (https://github.com/ansible-collections/community.zabbix/pull/345). + - zabbix_discovery_rule - no longer exposes SNMPv3 auth and priv passphrases + to system logs (https://github.com/ansible-collections/community.zabbix/pull/345). + - zabbix_host - no longer exposes SNMPv3 auth and priv passphrases to system + logs (https://github.com/ansible-collections/community.zabbix/pull/345). fragments: - - 316-zbx-agent-windows-long-version.yaml - - 322-zabbix_template.yml - - 323-zabbix_web.yml - - 325-zbx-agent-macos.yaml - - 330-zabbix_web-selinux.yaml - - 337-zabbix_proxy-statsAllowedIP.yaml - - 343-zabbix_server-rhel8-mysql.yaml - - 344-zabbix_web-legacyphp.yaml - - 345-security-fixes-no_log.yaml - - 349-zabbix_action-dcheck-filter.yaml - - raspberry-server.yaml - - raspberry.yaml - release_date: '2021-03-20' + - 316-zbx-agent-windows-long-version.yaml + - 322-zabbix_template.yml + - 323-zabbix_web.yml + - 325-zbx-agent-macos.yaml + - 330-zabbix_web-selinux.yaml + - 337-zabbix_proxy-statsAllowedIP.yaml + - 343-zabbix_server-rhel8-mysql.yaml + - 344-zabbix_web-legacyphp.yaml + - 345-security-fixes-no_log.yaml + - 349-zabbix_action-dcheck-filter.yaml + - raspberry-server.yaml + - raspberry.yaml + release_date: "2021-03-20" 1.4.0: changes: bugfixes: - - zabbix_agent - StatusPort will be configured only when `zabbix_agent2_statusport` - is defined (https://github.com/ansible-collections/community.zabbix/pull/378) - - zabbix_agent - fixed issue preventing installation of zabbix-agent 4.2 on - Ubuntu Focal 20.04 (https://github.com/ansible-collections/community.zabbix/pull/390) - - zabbix_agent - role will now configure correct port for hostinterface in Zabbix - Server if `zabbix_agent2_listenport` is defined (https://github.com/ansible-collections/community.zabbix/pull/400) - - zabbix_agent - should no longer be failing on Windows platform due to re-running - all of the tasks for the 2nd time (https://github.com/ansible-collections/community.zabbix/pull/376) - - zabbix_agent - should no longer fail while cleaning up zabbix_agent installation - if Zabbix Agent2 is being used (https://github.com/ansible-collections/community.zabbix/pull/409) - - zabbix_agent - will no longer install zabbix_get package on Debian systems - when `zabbix_agent_install_agent_only` is defined (https://github.com/ansible-collections/community.zabbix/pull/363) - - zabbix_host - fixed issue where module was idempotent when multiple host interfaces - of the same type were present (https://github.com/ansible-collections/community.zabbix/pull/391) - - zabbix_proxy (role) - will no longer fail on proxy creation in Zabbix Server - when TLS parameters are used (https://github.com/ansible-collections/community.zabbix/pull/388) - - zabbix_server - Removed the removal everything from /tmp directory command - as it removes things that it shouldnt do. - - zabbix_template - first time import of template now works with Zabbix 5.4 - (https://github.com/ansible-collections/community.zabbix/pull/407), please - note that rerunning the task will fail as there are breaking changes in Zabbix - 5.4 API that module not yet covers. - - zabbix_user - now works with Zabbix 5.4 (https://github.com/ansible-collections/community.zabbix/pull/406) + - zabbix_agent - StatusPort will be configured only when `zabbix_agent2_statusport` + is defined (https://github.com/ansible-collections/community.zabbix/pull/378) + - zabbix_agent - fixed issue preventing installation of zabbix-agent 4.2 on + Ubuntu Focal 20.04 (https://github.com/ansible-collections/community.zabbix/pull/390) + - zabbix_agent - role will now configure correct port for hostinterface in Zabbix + Server if `zabbix_agent2_listenport` is defined (https://github.com/ansible-collections/community.zabbix/pull/400) + - zabbix_agent - should no longer be failing on Windows platform due to re-running + all of the tasks for the 2nd time (https://github.com/ansible-collections/community.zabbix/pull/376) + - zabbix_agent - should no longer fail while cleaning up zabbix_agent installation + if Zabbix Agent2 is being used (https://github.com/ansible-collections/community.zabbix/pull/409) + - zabbix_agent - will no longer install zabbix_get package on Debian systems + when `zabbix_agent_install_agent_only` is defined (https://github.com/ansible-collections/community.zabbix/pull/363) + - zabbix_host - fixed issue where module was idempotent when multiple host interfaces + of the same type were present (https://github.com/ansible-collections/community.zabbix/pull/391) + - zabbix_proxy (role) - will no longer fail on proxy creation in Zabbix Server + when TLS parameters are used (https://github.com/ansible-collections/community.zabbix/pull/388) + - zabbix_server - Removed the removal everything from /tmp directory command + as it removes things that it shouldnt do. + - zabbix_template - first time import of template now works with Zabbix 5.4 + (https://github.com/ansible-collections/community.zabbix/pull/407), please + note that rerunning the task will fail as there are breaking changes in Zabbix + 5.4 API that module not yet covers. + - zabbix_user - now works with Zabbix 5.4 (https://github.com/ansible-collections/community.zabbix/pull/406) minor_changes: - - all roles were updated to support Zabbix 5.4 release (https://github.com/ansible-collections/community.zabbix/pull/405) - - new inventory plugin zabbix_inventory (https://github.com/ansible-collections/community.zabbix/pull/373) - - new module plugin zabbix_globalmacro (https://github.com/ansible-collections/community.zabbix/pull/377) - - zabbix_agent - `zabbix_agent_src_reinstall` now defaults to `False` (https://github.com/ansible-collections/community.zabbix/pull/403) - - zabbix_agent - now supports setting AllowKey (https://github.com/ansible-collections/community.zabbix/pull/358) - - zabbix_globalmacros - it is now possible to create global macros using this - module (https://github.com/ansible-collections/community.zabbix/pull/377). - - zabbix_inventory - Created Ansible - Zabbix inventory plugin to create dynamic - inventory from Zabbix. - - zabbix_maintenance - it is now possible to target hosts by their technical - name if it differs from the visible name - - zabbix_proxy - Add MySQL Python 3 package installation. - - zabbix_server - Add MySQL Python 3 package installation. - - zabbix_server - now supports setting StartLLDProcessors (https://github.com/ansible-collections/community.zabbix/pull/361) - - zabbix_user - now supports parameter `username` as an alternative to `alias` - (https://github.com/ansible-collections/community.zabbix/pull/406) - - zabbix_user - removed some of the default values because a configuration should - be changed only if specified as a parameter (https://github.com/ansible-collections/community.zabbix/pull/382). - - zabbix_web - now supports setting SAML certificates (https://github.com/ansible-collections/community.zabbix/pull/408) + - all roles were updated to support Zabbix 5.4 release (https://github.com/ansible-collections/community.zabbix/pull/405) + - new inventory plugin zabbix_inventory (https://github.com/ansible-collections/community.zabbix/pull/373) + - new module plugin zabbix_globalmacro (https://github.com/ansible-collections/community.zabbix/pull/377) + - zabbix_agent - `zabbix_agent_src_reinstall` now defaults to `False` (https://github.com/ansible-collections/community.zabbix/pull/403) + - zabbix_agent - now supports setting AllowKey (https://github.com/ansible-collections/community.zabbix/pull/358) + - zabbix_globalmacros - it is now possible to create global macros using this + module (https://github.com/ansible-collections/community.zabbix/pull/377). + - zabbix_inventory - Created Ansible - Zabbix inventory plugin to create dynamic + inventory from Zabbix. + - zabbix_maintenance - it is now possible to target hosts by their technical + name if it differs from the visible name + - zabbix_proxy - Add MySQL Python 3 package installation. + - zabbix_server - Add MySQL Python 3 package installation. + - zabbix_server - now supports setting StartLLDProcessors (https://github.com/ansible-collections/community.zabbix/pull/361) + - zabbix_user - now supports parameter `username` as an alternative to `alias` + (https://github.com/ansible-collections/community.zabbix/pull/406) + - zabbix_user - removed some of the default values because a configuration should + be changed only if specified as a parameter (https://github.com/ansible-collections/community.zabbix/pull/382). + - zabbix_web - now supports setting SAML certificates (https://github.com/ansible-collections/community.zabbix/pull/408) fragments: - - 350-zabbix_maintenance-visible_name.yaml - - 373-create_zabbix_inventory.yaml - - 377-create_globalmacros_module.yaml - - 382-zabbix_user.yml - - 391-zabbix_host-intf_idempotency_fix.yml - - zabbix-proxy-package-installation.yaml - - zabbix-server-tmp-dir.yml - - zbx-catch-all.yml + - 350-zabbix_maintenance-visible_name.yaml + - 373-create_zabbix_inventory.yaml + - 377-create_globalmacros_module.yaml + - 382-zabbix_user.yml + - 391-zabbix_host-intf_idempotency_fix.yml + - zabbix-proxy-package-installation.yaml + - zabbix-server-tmp-dir.yml + - zbx-catch-all.yml modules: - - description: Create/update/delete Zabbix Global macros - name: zabbix_globalmacro - namespace: '' + - description: Create/update/delete Zabbix Global macros + name: zabbix_globalmacro + namespace: "" plugins: inventory: - - description: Zabbix Inventory Plugin - name: zabbix_inventory - namespace: null - release_date: '2021-06-29' + - description: Zabbix Inventory Plugin + name: zabbix_inventory + namespace: null + release_date: "2021-06-29" 1.5.0: changes: breaking_changes: - - all roles now reference other roles and modules via their fully qualified - collection names, which makes Ansible 2.10 minimum supported version for roles - (See https://github.com/ansible-collections/community.zabbix/pull/477). + - all roles now reference other roles and modules via their fully qualified + collection names, which makes Ansible 2.10 minimum supported version for roles + (See https://github.com/ansible-collections/community.zabbix/pull/477). bugfixes: - - all roles now support installing zabbix 4.0 version on Ubuntu 20.04. - - all roles now supports installations on Debian 11. - - zabbix inventory - Change default value for host_zapi_query from list "[]" - to dict "{}". - - zabbix_action - should no longer fail with Zabbix version 5.4. - - zabbix_agent - `zabbix_win_install_dir` no longer ignored for zabbix_agentd.d - and zabbix log directories. - - zabbix_agent - auto-recovery for Windows installation has been fixed (https://github.com/ansible-collections/community.zabbix/pull/470). - - zabbix_agent - deploying zabbix_agent2 under Windows should now be possible - (Thanks to https://github.com/ansible-collections/community.zabbix/pull/433 - and https://github.com/ansible-collections/community.zabbix/pull/453). - - zabbix_agent - fixed AutoPSK for Windows deployments (https://github.com/ansible-collections/community.zabbix/pull/450). - - zabbix_host - Fix error when updating hosts caused by Zabbix bug not returning - the inventory_mode field for hosts(https://github.com/ansible-collections/community.zabbix/issues/385). - - zabbix_host - will not break when `tls_psk*` parameters are set with Zabbix - version 5.4. - - zabbix_proxy (module) - now supports configuring `tls_psk*` parameters. - - zabbix_proxy (role) - TLS config should now properly configure certificates. - - zabbix_proxy (role) - should no longer fail on permission problems wren configured - to use SQLite database and now installs correct package sqlite3 on Debian - systems. - - zabbix_web - `zabbix_nginx_vhost_*` parameters are no longer ignored. - - zabbix_web - executing role with `--tags` should now correctly include distribution - specific variables (https://github.com/ansible-collections/community.zabbix/pull/448). - - zabbix_web - now correctly restarts php-fpm service (https://github.com/ansible-collections/community.zabbix/pull/427). - - zabbix_web - permissions for accesing php-fpm socket has been fixed (See https://github.com/ansible-collections/community.zabbix/pull/426). + - all roles now support installing zabbix 4.0 version on Ubuntu 20.04. + - all roles now supports installations on Debian 11. + - zabbix inventory - Change default value for host_zapi_query from list "[]" + to dict "{}". + - zabbix_action - should no longer fail with Zabbix version 5.4. + - zabbix_agent - `zabbix_win_install_dir` no longer ignored for zabbix_agentd.d + and zabbix log directories. + - zabbix_agent - auto-recovery for Windows installation has been fixed (https://github.com/ansible-collections/community.zabbix/pull/470). + - zabbix_agent - deploying zabbix_agent2 under Windows should now be possible + (Thanks to https://github.com/ansible-collections/community.zabbix/pull/433 + and https://github.com/ansible-collections/community.zabbix/pull/453). + - zabbix_agent - fixed AutoPSK for Windows deployments (https://github.com/ansible-collections/community.zabbix/pull/450). + - zabbix_host - Fix error when updating hosts caused by Zabbix bug not returning + the inventory_mode field for hosts(https://github.com/ansible-collections/community.zabbix/issues/385). + - zabbix_host - will not break when `tls_psk*` parameters are set with Zabbix + version 5.4. + - zabbix_proxy (module) - now supports configuring `tls_psk*` parameters. + - zabbix_proxy (role) - TLS config should now properly configure certificates. + - zabbix_proxy (role) - should no longer fail on permission problems wren configured + to use SQLite database and now installs correct package sqlite3 on Debian + systems. + - zabbix_web - `zabbix_nginx_vhost_*` parameters are no longer ignored. + - zabbix_web - executing role with `--tags` should now correctly include distribution + specific variables (https://github.com/ansible-collections/community.zabbix/pull/448). + - zabbix_web - now correctly restarts php-fpm service (https://github.com/ansible-collections/community.zabbix/pull/427). + - zabbix_web - permissions for accesing php-fpm socket has been fixed (See https://github.com/ansible-collections/community.zabbix/pull/426). minor_changes: - - Added requirements.txt to collection root to be used with Ansible Builder. - See https://ansible-builder.readthedocs.io/en/latest/collection_metadata.html - - some roles are now using new naming for API connection parameters (https://github.com/ansible-collections/community.zabbix/pull/492 - and https://github.com/ansible-collections/community.zabbix/pull/495). - - some roles can now utilize an option `zabbix_repo_yum_gpgcheck` to enable/disable - GPG check for YUM repository (https://github.com/ansible-collections/community.zabbix/pull/438). - - zabbix inventory - Enabled the usage of environment variables in zabbix inventory - plugin. - - zabbix inventory plugin - can now use environment variables ZABBIX_SERVER, - ZABBIX_USERNAME and ZABBIX_PASSWORD for connection purposes to the Zabbix - API. - - zabbix_agent - `zabbix_agent_loadmodule` can also be configured with a list. - - zabbix_agent - new `zabbix_api_timeout` option. - - zabbix_agent - now supports DenyKeys configuration. - - zabbix_hostmacro - now supports creating macros of type secret and vault. - - zabbix_proxy (role) - new `zabbix_api_timeout` option. - - zabbix_proxy_info - new module that allows to retrieve information about configured - Zabbix Proxies. - - zabbix_server - added support for TimescaleDB (https://github.com/ansible-collections/community.zabbix/pull/428). + - Added requirements.txt to collection root to be used with Ansible Builder. + See https://ansible-builder.readthedocs.io/en/latest/collection_metadata.html + - some roles are now using new naming for API connection parameters (https://github.com/ansible-collections/community.zabbix/pull/492 + and https://github.com/ansible-collections/community.zabbix/pull/495). + - some roles can now utilize an option `zabbix_repo_yum_gpgcheck` to enable/disable + GPG check for YUM repository (https://github.com/ansible-collections/community.zabbix/pull/438). + - zabbix inventory - Enabled the usage of environment variables in zabbix inventory + plugin. + - zabbix inventory plugin - can now use environment variables ZABBIX_SERVER, + ZABBIX_USERNAME and ZABBIX_PASSWORD for connection purposes to the Zabbix + API. + - zabbix_agent - `zabbix_agent_loadmodule` can also be configured with a list. + - zabbix_agent - new `zabbix_api_timeout` option. + - zabbix_agent - now supports DenyKeys configuration. + - zabbix_hostmacro - now supports creating macros of type secret and vault. + - zabbix_proxy (role) - new `zabbix_api_timeout` option. + - zabbix_proxy_info - new module that allows to retrieve information about configured + Zabbix Proxies. + - zabbix_server - added support for TimescaleDB (https://github.com/ansible-collections/community.zabbix/pull/428). fragments: - - 0-copy_ignore_txt.yml - - 415-inventory_mode-fix.yaml - - 456-zabbix-hostmacro-secret-vault.yml - - 505-awx_compatibility-fixes.yml - - zbx-missing-1.5.0.yml - - zbx-proxy-info.yaml + - 0-copy_ignore_txt.yml + - 415-inventory_mode-fix.yaml + - 456-zabbix-hostmacro-secret-vault.yml + - 505-awx_compatibility-fixes.yml + - zbx-missing-1.5.0.yml + - zbx-proxy-info.yaml modules: - - description: Gather information about Zabbix proxy - name: zabbix_proxy_info - namespace: '' - release_date: '2021-11-02' + - description: Gather information about Zabbix proxy + name: zabbix_proxy_info + namespace: "" + release_date: "2021-11-02" 1.5.1: changes: bugfixes: - - template - use templateid property when linking templates for ``template.create`` - and ``template.update`` API calls. - - zabbix inventory - Moved ZABBIX_VALIDATE_CERTS to correct option, validate_certs. - - zabbix_agent - Create the actual configuration file for Windows setups. - - zabbix_agent - Fix typo for correct using the zabbix_windows_service.exists - - zabbix_agent - tlspsk_auto to support become on Linux and ignore on windows - - zabbix_user - fix zabbix_user require password only on internal. + - template - use templateid property when linking templates for ``template.create`` + and ``template.update`` API calls. + - zabbix inventory - Moved ZABBIX_VALIDATE_CERTS to correct option, validate_certs. + - zabbix_agent - Create the actual configuration file for Windows setups. + - zabbix_agent - Fix typo for correct using the zabbix_windows_service.exists + - zabbix_agent - tlspsk_auto to support become on Linux and ignore on windows + - zabbix_user - fix zabbix_user require password only on internal. minor_changes: - - Enabled usage of environment variables for modules by adding a fallback lookup - in the module_utils/helpers.py - zabbix_common_argument_spec + - Enabled usage of environment variables for modules by adding a fallback lookup + in the module_utils/helpers.py - zabbix_common_argument_spec fragments: - - 508-zabbix-env-vars.yml - - 512-inventory-bugfix.yaml - - 521-agent-typo.yaml - - 523-templateid-property.yml - - 527-agent-windows-config-creation.yaml - - 537-TLSPSK.yaml - - 543-internal-user.yaml - release_date: '2021-12-05' + - 508-zabbix-env-vars.yml + - 512-inventory-bugfix.yaml + - 521-agent-typo.yaml + - 523-templateid-property.yml + - 527-agent-windows-config-creation.yaml + - 537-TLSPSK.yaml + - 543-internal-user.yaml + release_date: "2021-12-05" 1.6.0: changes: bugfixes: - - 'Various modules and plugins - use vendored version of ``distutils.version`` - instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/community.zabbix/pull/603). - This superseedes #597.' - - ZapiWrapper (module_utils) - fix only partial zabbix version is returned. - - zabbix_agent - Install Zabbix packages when zabbix_repo == other is used with - yum. - - zabbix_agent - Install the Agent for MacOSX sooner than its configuration. - - zabbix_agent - The ``Install gpg key`` task for Debian did not work when a - http proxy is configured. - - zabbix_agent - Use the correct URL with correct version. - - zabbix_agent - Use the correct path to determine Zabbix Agent 2 installation - on Windows. - - zabbix_agent - Using the correct hostgroup as default now. - - zabbix_agent - fix for the autopsk, incl. tests with Molecule. - - zabbix_host - Added small notification that an user should have read access - to get hostgroups overview. - - zabbix_host - adapter changed properties for interface comparisson - - zabbix_maintenance - should now work when creating maintenace on Zabbix 6.0 - server - - zabbix_proxy - 'zcat' the zipped sql files to /tmp before executing it. - - zabbix_proxy - Check MySQL version before settings mysql_innodb_default_row_format - value. - - zabbix_proxy - Install Zabbix packages when zabbix_repo == other is used with - yum. - - zabbix_server - 'zcat' the zipped sql files to /tmp before executing it. - - zabbix_server - Check MySQL version before settings mysql_innodb_default_row_format - value. - - zabbix_server - Install Zabbix packages when zabbix_repo == other is used - with yum. - - zabbix_template - setting correct null values to fix unintentional changes - - zabbix_web - Added some default variables if the geerlingguys apache role - is not used. - - zabbix_web - Specified the correct versions for php. + - "Various modules and plugins - use vendored version of ``distutils.version`` + instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/community.zabbix/pull/603). + This superseedes #597." + - ZapiWrapper (module_utils) - fix only partial zabbix version is returned. + - zabbix_agent - Install Zabbix packages when zabbix_repo == other is used with + yum. + - zabbix_agent - Install the Agent for MacOSX sooner than its configuration. + - zabbix_agent - The ``Install gpg key`` task for Debian did not work when a + http proxy is configured. + - zabbix_agent - Use the correct URL with correct version. + - zabbix_agent - Use the correct path to determine Zabbix Agent 2 installation + on Windows. + - zabbix_agent - Using the correct hostgroup as default now. + - zabbix_agent - fix for the autopsk, incl. tests with Molecule. + - zabbix_host - Added small notification that an user should have read access + to get hostgroups overview. + - zabbix_host - adapter changed properties for interface comparisson + - zabbix_maintenance - should now work when creating maintenace on Zabbix 6.0 + server + - zabbix_proxy - 'zcat' the zipped sql files to /tmp before executing it. + - zabbix_proxy - Check MySQL version before settings mysql_innodb_default_row_format + value. + - zabbix_proxy - Install Zabbix packages when zabbix_repo == other is used with + yum. + - zabbix_server - 'zcat' the zipped sql files to /tmp before executing it. + - zabbix_server - Check MySQL version before settings mysql_innodb_default_row_format + value. + - zabbix_server - Install Zabbix packages when zabbix_repo == other is used + with yum. + - zabbix_template - setting correct null values to fix unintentional changes + - zabbix_web - Added some default variables if the geerlingguys apache role + is not used. + - zabbix_web - Specified the correct versions for php. minor_changes: - - all modules - prepare for deprecation of distutils LooseVersion. - - collection - Add dependencies to other collections. This helps Ansible Galaxy - automatically downloading collections that this collection relies on to run. - - connection.httpapi (plugin) - add initial httpapi connection plugin. - - httpapi.jsonrpc (plugin) - add initial httpapi for future handling of json-rpc. - - new module zabbix authentication for configuring global authentication settings - in Zabbix Server's Settings section of GUI. - - new module zabbix_autoregister for configuring global autoregistration settings - in Zabbix Server's Settings section of GUI. - - new module zabbix_housekeeping for configuring global housekeeping settings - in Zabbix Server's Settings section of GUI. - - test_zabbix_host_info - fix Template/Group names for 5.4 - - test_zabbix_screen - disable testing for screen in 5.4 (deprecated) - - zabbix_action - additional fixes to make module work with Zabbix 6.0 (https://github.com/ansible-collections/community.zabbix/pull/664) - - zabbix_action - module ported to work with Zabbix 6.0 (https://github.com/ansible-collections/community.zabbix/pull/648, - https://github.com/ansible-collections/community.zabbix/pull/653) - - zabbix_action - should now correctly actions with maintenance_status conditions - (https://github.com/ansible-collections/community.zabbix/pull/667) - - zabbix_agent - Check if 'firewalld' exist and is running when handler is executed. - - zabbix_agent - Fixed use of bare variables in conditions (https://github.com/ansible-collections/community.zabbix/pull/663) - - zabbix_agent - Install the correct Python libxml2 package on SLES15 - - zabbix_agent - Move inclusion of the apache.yml tasks to later stage during - execution of role. - - zabbix_agent - Prepare for Zabbix 6.0. - - zabbix_agent - Specify a minor version with zabbix_agent_version_minor for - RH systems. - - zabbix_agent - There was no way to configure a specific type for the macro. - - zabbix_agent - Use multiple aliases in the configuration file with ``zabbix_agent_zabbix_alias`` - or ``zabbix_agent2_zabbix_alias``. - - zabbix_maintenance - added new module parameter `tags`, which allows configuring - Problem Tags on maintenances. - - zabbix_maintenance - fixed to work with Zabbix 6.0+ and Python 3.9+ (https://github.com/ansible-collections/community.zabbix/pull/665) - - zabbix_proxy - Prepare for Zabbix 6.0. - - zabbix_proxy - Specify a minor version with zabbix_proxy_version_minor for - RH systems. - - zabbix_proxy - Support for Sangoma and treat it like a RHEL system. - - zabbix_server - Check the 'zabbix_server_install_database_client' variable - in RedHat tasks. - - zabbix_server - Prepare for Zabbix 6.0. - - zabbix_server - Specify a minor version with zabbix_server_version_minor for - RH systems. - - zabbix_user - change alias property to username (changed in 5.4) (alias is - now an alias for username) - - zabbix_user_info - change alias property to username (changed in 5.4) (alias - is now an alias for username) - - zabbix_web - Change format ENCRYPTION, VERIFY_HOST from string to boolean. - - zabbix_web - Specify a minor version with zabbix_web_version_minor for RH - systems. + - all modules - prepare for deprecation of distutils LooseVersion. + - collection - Add dependencies to other collections. This helps Ansible Galaxy + automatically downloading collections that this collection relies on to run. + - connection.httpapi (plugin) - add initial httpapi connection plugin. + - httpapi.jsonrpc (plugin) - add initial httpapi for future handling of json-rpc. + - new module zabbix authentication for configuring global authentication settings + in Zabbix Server's Settings section of GUI. + - new module zabbix_autoregister for configuring global autoregistration settings + in Zabbix Server's Settings section of GUI. + - new module zabbix_housekeeping for configuring global housekeeping settings + in Zabbix Server's Settings section of GUI. + - test_zabbix_host_info - fix Template/Group names for 5.4 + - test_zabbix_screen - disable testing for screen in 5.4 (deprecated) + - zabbix_action - additional fixes to make module work with Zabbix 6.0 (https://github.com/ansible-collections/community.zabbix/pull/664) + - zabbix_action - module ported to work with Zabbix 6.0 (https://github.com/ansible-collections/community.zabbix/pull/648, + https://github.com/ansible-collections/community.zabbix/pull/653) + - zabbix_action - should now correctly actions with maintenance_status conditions + (https://github.com/ansible-collections/community.zabbix/pull/667) + - zabbix_agent - Check if 'firewalld' exist and is running when handler is executed. + - zabbix_agent - Fixed use of bare variables in conditions (https://github.com/ansible-collections/community.zabbix/pull/663) + - zabbix_agent - Install the correct Python libxml2 package on SLES15 + - zabbix_agent - Move inclusion of the apache.yml tasks to later stage during + execution of role. + - zabbix_agent - Prepare for Zabbix 6.0. + - zabbix_agent - Specify a minor version with zabbix_agent_version_minor for + RH systems. + - zabbix_agent - There was no way to configure a specific type for the macro. + - zabbix_agent - Use multiple aliases in the configuration file with ``zabbix_agent_zabbix_alias`` + or ``zabbix_agent2_zabbix_alias``. + - zabbix_maintenance - added new module parameter `tags`, which allows configuring + Problem Tags on maintenances. + - zabbix_maintenance - fixed to work with Zabbix 6.0+ and Python 3.9+ (https://github.com/ansible-collections/community.zabbix/pull/665) + - zabbix_proxy - Prepare for Zabbix 6.0. + - zabbix_proxy - Specify a minor version with zabbix_proxy_version_minor for + RH systems. + - zabbix_proxy - Support for Sangoma and treat it like a RHEL system. + - zabbix_server - Check the 'zabbix_server_install_database_client' variable + in RedHat tasks. + - zabbix_server - Prepare for Zabbix 6.0. + - zabbix_server - Specify a minor version with zabbix_server_version_minor for + RH systems. + - zabbix_user - change alias property to username (changed in 5.4) (alias is + now an alias for username) + - zabbix_user_info - change alias property to username (changed in 5.4) (alias + is now an alias for username) + - zabbix_web - Change format ENCRYPTION, VERIFY_HOST from string to boolean. + - zabbix_web - Specify a minor version with zabbix_web_version_minor for RH + systems. fragments: - - 144-check-if-service-is-running.yml - - 329-only-do-apache-stuff.yml - - 356-zbx-maint-tags.yml - - 360-fix-macos-install.yml - - 367-add-dependencies.yml - - 414-specify-minor-version.yml - - 444-add-initial-httpapi.yml - - 560-prepare-zabbix-60-roles.yml - - 570-fix-autopsk.yml - - 574-fix-windows-url.yml - - 583-change-var-type.yml - - 587-host-cannot-have-same-type.yml - - 588-template-not-found.yml - - 589-failed-to-get-screen.yml - - 591-invalid-parameter.yml - - 592-has-no-attribute.yml - - 597-prepare-distutils.yml - - 599-multiple-aliases.yml - - 603-vendor-distutils.yml - - 612-use-correct-value.yml - - 620-add-macro-type.yml - - 622-fix-environmentsettings.yml - - 630-zabbix-autoreg.yml - - 638-sangoma-rhel.yml - - 645-zabbix-authentication.yml - - 647-zabbix-housekeeping.yml - - 648-653-zbx_action.yaml - - 654-check-zabbix_server_install_database_client-rhel.yml - - 664-zbx_action.yaml - - 665-zbx_maint.yaml - - 668-zabbix_agent-sles15.yml - - various-wd.yml + - 144-check-if-service-is-running.yml + - 329-only-do-apache-stuff.yml + - 356-zbx-maint-tags.yml + - 360-fix-macos-install.yml + - 367-add-dependencies.yml + - 414-specify-minor-version.yml + - 444-add-initial-httpapi.yml + - 560-prepare-zabbix-60-roles.yml + - 570-fix-autopsk.yml + - 574-fix-windows-url.yml + - 583-change-var-type.yml + - 587-host-cannot-have-same-type.yml + - 588-template-not-found.yml + - 589-failed-to-get-screen.yml + - 591-invalid-parameter.yml + - 592-has-no-attribute.yml + - 597-prepare-distutils.yml + - 599-multiple-aliases.yml + - 603-vendor-distutils.yml + - 612-use-correct-value.yml + - 620-add-macro-type.yml + - 622-fix-environmentsettings.yml + - 630-zabbix-autoreg.yml + - 638-sangoma-rhel.yml + - 645-zabbix-authentication.yml + - 647-zabbix-housekeeping.yml + - 648-653-zbx_action.yaml + - 654-check-zabbix_server_install_database_client-rhel.yml + - 664-zbx_action.yaml + - 665-zbx_maint.yaml + - 668-zabbix_agent-sles15.yml + - various-wd.yml modules: - - description: Update Zabbix authentication - name: zabbix_authentication - namespace: '' - - description: Update Zabbix autoregistration - name: zabbix_autoregister - namespace: '' - - description: Update Zabbix housekeeping - name: zabbix_housekeeping - namespace: '' + - description: Update Zabbix authentication + name: zabbix_authentication + namespace: "" + - description: Update Zabbix autoregistration + name: zabbix_autoregister + namespace: "" + - description: Update Zabbix housekeeping + name: zabbix_housekeeping + namespace: "" plugins: connection: - - description: Use httpapi to run command on network appliances - name: httpapi - namespace: null + - description: Use httpapi to run command on network appliances + name: httpapi + namespace: null httpapi: - - description: HttpApi Plugin for Zabbix - name: jsonrpc - namespace: null - release_date: '2022-03-21' + - description: HttpApi Plugin for Zabbix + name: jsonrpc + namespace: null + release_date: "2022-03-21" 1.7.0: changes: bugfixes: - - Include ``PSF-license.txt`` file for ``plugins/module_utils/_version.py``. - - zabbix_action - will no longer wipe `esc_step_to` and `esc_step_from` (https://github.com/ansible-collections/community.zabbix/issues/692) - - zabbix_agent - added support for zabbix-agent on Ubuntu 22.04 (https://github.com/ansible-collections/community.zabbix/pull/681) - - zabbix_agent - now properly creates webroot for issuing LE certificates (https://github.com/ansible-collections/community.zabbix/pull/677, - https://github.com/ansible-collections/community.zabbix/pull/682) - - zabbix_proxy (module) - passive proxy should be now correctly created in Zabbix - 6.0 (https://github.com/ansible-collections/community.zabbix/pull/697) - - zabbix_proxy (role) - fixed accidental regression of TLS psk file being generated - for passive agent (#528) caused in (#663) (https://github.com/ansible-collections/community.zabbix/issues/680) + - Include ``PSF-license.txt`` file for ``plugins/module_utils/_version.py``. + - zabbix_action - will no longer wipe `esc_step_to` and `esc_step_from` (https://github.com/ansible-collections/community.zabbix/issues/692) + - zabbix_agent - added support for zabbix-agent on Ubuntu 22.04 (https://github.com/ansible-collections/community.zabbix/pull/681) + - zabbix_agent - now properly creates webroot for issuing LE certificates (https://github.com/ansible-collections/community.zabbix/pull/677, + https://github.com/ansible-collections/community.zabbix/pull/682) + - zabbix_proxy (module) - passive proxy should be now correctly created in Zabbix + 6.0 (https://github.com/ansible-collections/community.zabbix/pull/697) + - zabbix_proxy (role) - fixed accidental regression of TLS psk file being generated + for passive agent (#528) caused in (#663) (https://github.com/ansible-collections/community.zabbix/issues/680) minor_changes: - - helpers.helper_compare_lists() changed logic to not consider the order of - elements in lists. (https://github.com/ansible-collections/community.zabbix/pull/683) - - zabbix_action, zabbix_maintenance, zabbix_mediatype, zabbix_proxy, zabbix_service - - updated to work with Zabbix 6.0. (https://github.com/ansible-collections/community.zabbix/pull/683) - - zabbix_script module added (https://github.com/ansible-collections/community.zabbix/issues/634) + - helpers.helper_compare_lists() changed logic to not consider the order of + elements in lists. (https://github.com/ansible-collections/community.zabbix/pull/683) + - zabbix_action, zabbix_maintenance, zabbix_mediatype, zabbix_proxy, zabbix_service + - updated to work with Zabbix 6.0. (https://github.com/ansible-collections/community.zabbix/pull/683) + - zabbix_script module added (https://github.com/ansible-collections/community.zabbix/issues/634) fragments: - - 1.7.0-missing-fragments.yml - - 683-zbx60.yml - - 685-zabbix-script.yml - - 699-proxy-role-regression.yml - - psf-license.yml + - 1.7.0-missing-fragments.yml + - 683-zbx60.yml + - 685-zabbix-script.yml + - 699-proxy-role-regression.yml + - psf-license.yml modules: - - description: Create/update/delete Zabbix scripts - name: zabbix_script - namespace: '' - release_date: '2022-05-24' + - description: Create/update/delete Zabbix scripts + name: zabbix_script + namespace: "" + release_date: "2022-05-24" 1.8.0: changes: bugfixes: - - zabbix_host - fixed idempotency of the module when hostmacros or snmp interfaces - are used - - zabbix_script - fix compatibility with Zabbix <5.4. - - zabbix_script - should no longer fail when description is not set + - zabbix_host - fixed idempotency of the module when hostmacros or snmp interfaces + are used + - zabbix_script - fix compatibility with Zabbix <5.4. + - zabbix_script - should no longer fail when description is not set minor_changes: - - roles - Minimized the config templates for the zabbix_agent, zabbix_javagateway, - zabbix_proxy, and zabbix_server roles to make them version independent. - - roles - Support for Zabbix 6.2 has been added - - roles - Updated the version defaults to select the latest version supported - by an operating system. - - zabbix_action - added another condition operator naming options (contains, - does not contain,...) - - zabbix_agent - Set a ansible_python_interpreter to localhost based on the - env the playbook is executed from. - - zabbix_agent - add option to set host tags using ``zabbix_agent_tags``. - - zabbix_agent - add possiblity to set include file pattern using ``zabbix_agent(2)_include_pattern`` - variable. - - zabbix_agent - is now able to manage directories and upload files for TLS - PSK configuration used with Windows operating systems - - zabbix_agent - new options for Windows installations zabbix_win_install_dir_conf/bin - - zabbix_agent - when configuring firewalld, make sure the new rule is applied - immediately - - zabbix_authentication - module updated to support Zabbix 6.2 - - zabbix_host - using ``tls_psk_identity`` or ``tls_psk`` parameters with Zabbix - >= 5.4 makes this module non-idempotent - - zabbix_host - will no longer wipe tls_connect en tls_accept settings when - not specified on update - - zabbix_mediatype - added support for time units in ``attempt_interval`` parameter - - zabbix_template - added support for template groups (Zabbix >= 6.2) - - zabbix_template_info - add template_id return value - - zabbix_template_info - add yaml and none formats - - zabbix_user_directory - added new module to support multiple sources for LDAP - authentication + - roles - Minimized the config templates for the zabbix_agent, zabbix_javagateway, + zabbix_proxy, and zabbix_server roles to make them version independent. + - roles - Support for Zabbix 6.2 has been added + - roles - Updated the version defaults to select the latest version supported + by an operating system. + - zabbix_action - added another condition operator naming options (contains, + does not contain,...) + - zabbix_agent - Set a ansible_python_interpreter to localhost based on the + env the playbook is executed from. + - zabbix_agent - add option to set host tags using ``zabbix_agent_tags``. + - zabbix_agent - add possiblity to set include file pattern using ``zabbix_agent(2)_include_pattern`` + variable. + - zabbix_agent - is now able to manage directories and upload files for TLS + PSK configuration used with Windows operating systems + - zabbix_agent - new options for Windows installations zabbix_win_install_dir_conf/bin + - zabbix_agent - when configuring firewalld, make sure the new rule is applied + immediately + - zabbix_authentication - module updated to support Zabbix 6.2 + - zabbix_host - using ``tls_psk_identity`` or ``tls_psk`` parameters with Zabbix + >= 5.4 makes this module non-idempotent + - zabbix_host - will no longer wipe tls_connect en tls_accept settings when + not specified on update + - zabbix_mediatype - added support for time units in ``attempt_interval`` parameter + - zabbix_template - added support for template groups (Zabbix >= 6.2) + - zabbix_template_info - add template_id return value + - zabbix_template_info - add yaml and none formats + - zabbix_user_directory - added new module to support multiple sources for LDAP + authentication fragments: - - 602-change-intrepeter.yml - - 711-minimize-role-config-templates.yml - - 727-script-compatibility.yml - - 731-template-info-formats.yml - - 738-template-groups.yml - - 741-host-tls-psk-fix.yml - - 743-agent-tags.yml - - 744-mediatype-attemptinterval-timeunits.yml - - 749-action-operator-naming.yml - - 753-host-tls-settings.yml - - 755-user-directory-module.yml - - 770-agent-include-pattern.yml - - 771-auto-select-version.yml - - firewalld_immediate.yaml - - missing.yml - release_date: '2022-08-15' + - 602-change-intrepeter.yml + - 711-minimize-role-config-templates.yml + - 727-script-compatibility.yml + - 731-template-info-formats.yml + - 738-template-groups.yml + - 741-host-tls-psk-fix.yml + - 743-agent-tags.yml + - 744-mediatype-attemptinterval-timeunits.yml + - 749-action-operator-naming.yml + - 753-host-tls-settings.yml + - 755-user-directory-module.yml + - 770-agent-include-pattern.yml + - 771-auto-select-version.yml + - firewalld_immediate.yaml + - missing.yml + release_date: "2022-08-15" 1.9.0: changes: bugfixes: - - The inventory script had insufficient error handling in case the Zabbix API - provided an empty interfaces list. This bugfix checks for an exisiting interfaces - element, then for the minimal length of 1 so that the first interface will - only be accessed when it really exists in the api response. (https://github.com/ansible-collections/community.zabbix/issues/826) - - zabbix-proxy - updated to install correct sources for Debian arm64 family - - zabbix_agent - Filter IPv6 addresses from list of IP as Zabbix host creation - expects IPv4 - - zabbix_agent - installation on Windows will no longer fail when zabbix_agent2 - is used - - zabbix_host - fix updating of host without interfaces - - zabbix_proxy - correctly provision tls_accept and tls_connect on Zabbix backend - - zabbix_proxy - updated the datafiles_path fact for the zabbix_proxy and zabbix_server - roles due to upstream change - - zabbix_server - move location of the fping(6) variables to distribution specific - files (https://github.com/ansible-collections/community.zabbix/issues/812) - - zabbix_server - updated the datafiles_path fact for the zabbix_proxy and zabbix_server - roles due to upstream change + - The inventory script had insufficient error handling in case the Zabbix API + provided an empty interfaces list. This bugfix checks for an exisiting interfaces + element, then for the minimal length of 1 so that the first interface will + only be accessed when it really exists in the api response. (https://github.com/ansible-collections/community.zabbix/issues/826) + - zabbix-proxy - updated to install correct sources for Debian arm64 family + - zabbix_agent - Filter IPv6 addresses from list of IP as Zabbix host creation + expects IPv4 + - zabbix_agent - installation on Windows will no longer fail when zabbix_agent2 + is used + - zabbix_host - fix updating of host without interfaces + - zabbix_proxy - correctly provision tls_accept and tls_connect on Zabbix backend + - zabbix_proxy - updated the datafiles_path fact for the zabbix_proxy and zabbix_server + roles due to upstream change + - zabbix_server - move location of the fping(6) variables to distribution specific + files (https://github.com/ansible-collections/community.zabbix/issues/812) + - zabbix_server - updated the datafiles_path fact for the zabbix_proxy and zabbix_server + roles due to upstream change major_changes: - - all modules are opting away from zabbix-api and using httpapi ansible.netcommon - plugin. We will support zabbix-api for backwards compatibility until next - major release. See our README.md for more information about how to migrate - - zabbix_agent and zabbix_proxy roles are opting away from zabbix-api and use - httpapi ansible.netcommon plugin. We will support zabbix-api for backwards - compatibility until next major release. See our README.md for more information - about how to migrate + - all modules are opting away from zabbix-api and using httpapi ansible.netcommon + plugin. We will support zabbix-api for backwards compatibility until next + major release. See our README.md for more information about how to migrate + - zabbix_agent and zabbix_proxy roles are opting away from zabbix-api and use + httpapi ansible.netcommon plugin. We will support zabbix-api for backwards + compatibility until next major release. See our README.md for more information + about how to migrate minor_changes: - - ansible_zabbix_url_path introduced to be able to specify non-default Zabbix - WebUI path, e.g. http://<FQDN>/zabbixeu - - collection now supports creating ``module_defaults`` for ``group/community.zabbix.zabbix`` - (see https://github.com/ansible-collections/community.zabbix/issues/326) - - fixed ``zabbix_server`` role failure running in check_mode (see https://github.com/ansible-collections/community.zabbix/issues/804) - - zabbix_agent - give Zabbix Agent access to the Linux DMI table allowing system.hw.chassis - info to populate. - - zabbix_template - add support for template tags - - zabbix_user_role module added - - zabbix_web - add support for Ubuntu 22.04 jammy + - ansible_zabbix_url_path introduced to be able to specify non-default Zabbix + WebUI path, e.g. http://<FQDN>/zabbixeu + - collection now supports creating ``module_defaults`` for ``group/community.zabbix.zabbix`` + (see https://github.com/ansible-collections/community.zabbix/issues/326) + - fixed ``zabbix_server`` role failure running in check_mode (see https://github.com/ansible-collections/community.zabbix/issues/804) + - zabbix_agent - give Zabbix Agent access to the Linux DMI table allowing system.hw.chassis + info to populate. + - zabbix_template - add support for template tags + - zabbix_user_role module added + - zabbix_web - add support for Ubuntu 22.04 jammy fragments: - - 326-module_defaults-group.yml - - 526-swap-tls-accept-connect-in-proxy.yaml - - 778-zbx-agent2-win.yml - - 784-allow-system.hw.chassis-to-populate-on-linux.yml - - 786-web-add-ubuntu-22-04-support.yml - - 792-update-host-without-iface-fix.yml - - 795-zbx-agent-win-ipv6.yml - - 800-add-template-tags.yml - - 806-httpapi-connection-plugin.yml - - 812-fping-binary-location.yml - - 813-sql-scripts-moved-to-usr-share.yml - - 821-zabbix-proxy-debian-arm64.yml - - 822-roles-to-httpapi.yml - - 823-zabbix_server-role-in-check-mode.yml - - 827-fixing-bug-for-empty-interfaces-list.yml - - module_zabbix-user-role.yml - - modules-url-path.yml - release_date: '2022-11-07' + - 326-module_defaults-group.yml + - 526-swap-tls-accept-connect-in-proxy.yaml + - 778-zbx-agent2-win.yml + - 784-allow-system.hw.chassis-to-populate-on-linux.yml + - 786-web-add-ubuntu-22-04-support.yml + - 792-update-host-without-iface-fix.yml + - 795-zbx-agent-win-ipv6.yml + - 800-add-template-tags.yml + - 806-httpapi-connection-plugin.yml + - 812-fping-binary-location.yml + - 813-sql-scripts-moved-to-usr-share.yml + - 821-zabbix-proxy-debian-arm64.yml + - 822-roles-to-httpapi.yml + - 823-zabbix_server-role-in-check-mode.yml + - 827-fixing-bug-for-empty-interfaces-list.yml + - module_zabbix-user-role.yml + - modules-url-path.yml + release_date: "2022-11-07" 1.9.1: changes: bugfixes: - - all modules - remove deprecation warnings for modules parameters related to - zabbix-api when these parapmeters are not explicetely defined - - all roles and modules integration tests - replace deprecated include module - whith include_tasks - - zabbix_agent, zabbix_proxy roles, all modules - make httpapi connection work - with HTTP Basic Authorization - - zabbix_proxy - do not set ServerPort config parameter which was removed in - Zabbix 6.0 - - 'zabbix_server role Debian.yml task - remove warn: arg for shell module as - the arg is deprecated since ansible-core above 2.13' - - zabbix_user_role module - creation of a User Role with Super Admin type + - all modules - remove deprecation warnings for modules parameters related to + zabbix-api when these parapmeters are not explicetely defined + - all roles and modules integration tests - replace deprecated include module + whith include_tasks + - zabbix_agent, zabbix_proxy roles, all modules - make httpapi connection work + with HTTP Basic Authorization + - zabbix_proxy - do not set ServerPort config parameter which was removed in + Zabbix 6.0 + - "zabbix_server role Debian.yml task - remove warn: arg for shell module as + the arg is deprecated since ansible-core above 2.13" + - zabbix_user_role module - creation of a User Role with Super Admin type minor_changes: - - zabbix suport for rhel 9 + - zabbix suport for rhel 9 fragments: - - 845-rhel-9-support.yml - - 850-proxy-serverport.yml - - 857-deprecation-warnings.yml - - 859-remove-warn-arg.yml - - 866-user-role-superadmin.yml - - 868-include-to-include-tasks.yml - - fix-httpapi-http-auth.yml - release_date: '2023-01-09' + - 845-rhel-9-support.yml + - 850-proxy-serverport.yml + - 857-deprecation-warnings.yml + - 859-remove-warn-arg.yml + - 866-user-role-superadmin.yml + - 868-include-to-include-tasks.yml + - fix-httpapi-http-auth.yml + release_date: "2023-01-09" 1.9.2: changes: bugfixes: - - zabbix_agent and zabbix_proxy roles - fixed a bug whith ansible_python_interpreter - not being set correctly in some corner cases - - zabbix_agent role - Fix MacOS install never executed because of the missing - include_tasks "Darwin.yml" in the "main.yml" task file and wrong user permission - on folder/files. - - zabbix_agent, zabbix_proxy and zabbix_server roles - make Ansible 2.14 compatible - by removing warn parameter + - zabbix_agent and zabbix_proxy roles - fixed a bug whith ansible_python_interpreter + not being set correctly in some corner cases + - zabbix_agent role - Fix MacOS install never executed because of the missing + include_tasks "Darwin.yml" in the "main.yml" task file and wrong user permission + on folder/files. + - zabbix_agent, zabbix_proxy and zabbix_server roles - make Ansible 2.14 compatible + by removing warn parameter fragments: - - 897.yml - - missing.yml - release_date: '2023-02-11' + - 897.yml + - missing.yml + release_date: "2023-02-11" 1.9.3: changes: bugfixes: - - compatibility with ansible.netcommon 5.0.0 - - treat sendto parameter in module zabbix_user according to real media type, - do not rely on media name - - zabbix-proxy role - fix tags for postgresql task. - - zabbix_agent role - Fix MacOS install never executed because of the missing - include_tasks "Darwin.yml" in the "main.yml" task file and wrong user permission - on folder/files. - - zabbix_user module - ability to specify several e-mail addresses in Zabbix - User's media + - compatibility with ansible.netcommon 5.0.0 + - treat sendto parameter in module zabbix_user according to real media type, + do not rely on media name + - zabbix-proxy role - fix tags for postgresql task. + - zabbix_agent role - Fix MacOS install never executed because of the missing + include_tasks "Darwin.yml" in the "main.yml" task file and wrong user permission + on folder/files. + - zabbix_user module - ability to specify several e-mail addresses in Zabbix + User's media minor_changes: - - httpapi plugin - updated to work with Zabbix 6.4. - - zabbix_action, zabbix_authentication, zabbix_discovery_rule, zabbix_mediatype, - zabbix_user, zabbix_user_directory, zabbix_usergroup - updated to work with - Zabbix 6.4. - - zabbix_agent role - Add support for SUSE Linux Enterprise Server for SAP Applications - ("SLES_SAP"). - - zabbix_host - add missing variants for SNMPv3 authprotocol and privprotocol - introduced by Zabbix 6 - - zabbix_proxy role - Add variable zabbix_proxy_dbpassword_hash_method to control - whether you want postgresql user password to be hashed with md5 or want to - use db default. When zabbix_proxy_dbpassword_hash_method is set to anything - other than md5 then do not hash the password with md5 so you could use postgresql - scram-sha-256 hashing method. - - zabbix_server role - Add variable zabbix_server_dbpassword_hash_method to - control whether you want postgresql user password to be hashed with md5 or - want to use db default. When zabbix_server_dbpassword_hash_method is set to - anything other than md5 then do not hash the password with md5 so you could - use postgresql scram-sha-256 hashing method. - - zabbix_usergroup module - userdirectory, hostgroup_rights and templategroup_rights - parameters added (Zabbix >= 6.2) - - zabbix_web role - possibility to add custom includes in apache vhost config + - httpapi plugin - updated to work with Zabbix 6.4. + - zabbix_action, zabbix_authentication, zabbix_discovery_rule, zabbix_mediatype, + zabbix_user, zabbix_user_directory, zabbix_usergroup - updated to work with + Zabbix 6.4. + - zabbix_agent role - Add support for SUSE Linux Enterprise Server for SAP Applications + ("SLES_SAP"). + - zabbix_host - add missing variants for SNMPv3 authprotocol and privprotocol + introduced by Zabbix 6 + - zabbix_proxy role - Add variable zabbix_proxy_dbpassword_hash_method to control + whether you want postgresql user password to be hashed with md5 or want to + use db default. When zabbix_proxy_dbpassword_hash_method is set to anything + other than md5 then do not hash the password with md5 so you could use postgresql + scram-sha-256 hashing method. + - zabbix_server role - Add variable zabbix_server_dbpassword_hash_method to + control whether you want postgresql user password to be hashed with md5 or + want to use db default. When zabbix_server_dbpassword_hash_method is set to + anything other than md5 then do not hash the password with md5 so you could + use postgresql scram-sha-256 hashing method. + - zabbix_usergroup module - userdirectory, hostgroup_rights and templategroup_rights + parameters added (Zabbix >= 6.2) + - zabbix_web role - possibility to add custom includes in apache vhost config fragments: - - 871.yml - - 880.yml - - 886.yml - - 890.yml - - 897.yml - - 899.yml - - 910-postgres-proxy.yml - - 935-custom-includes-apache.yml - - netcommon50-fix.yaml - - zabbix64.yml - - zabbix_user_media_mailto.yml - - zabbix_user_sendto.yaml - release_date: '2023-04-03' + - 871.yml + - 880.yml + - 886.yml + - 890.yml + - 897.yml + - 899.yml + - 910-postgres-proxy.yml + - 935-custom-includes-apache.yml + - netcommon50-fix.yaml + - zabbix64.yml + - zabbix_user_media_mailto.yml + - zabbix_user_sendto.yaml + release_date: "2023-04-03" 2.0.0: changes: breaking_changes: - - agent role - removed support for Darwin, Amazon, Fedora, XCP-ng, Suse, Mint, - and Sangoma operating systems - - agent role - removed support for zabbix_create_host and replaced it with zabbix_agent_host_state - - agent role - removed support for zabbix_create_hostgroup and replaced it with - zabbix_agent_hostgroups_state - - agent role - removed support for zabbix_http_password, zabbix_api_http_password, - zabbix_api_pass, and zabbix_api_login_pass and replaced it with zabbix_api_login_pass - - agent role - removed support for zabbix_http_user, zabbix_api_http_user, zabbix_api_user, - and zabbix_api_login_user and replaced it with zabbix_api_login_user - - agent role - removed support for zabbix_inventory_mode and replaced it with - zabbix_agent_inventory_mode - - agent role - removed support for zabbix_link_templates adn replaced it with - zabbix_agent_link_templates - - agent role - removed support for zabbix_macros and replaced it with zabbix_agent_macros - - agent role - removed support for zabbix_proxy and replaced it with zabbix_agent_proxy - - agent role - removed support for zabbix_update_host and replaced it with zabbix_agent_host_update - - all modules - dropped support of Zabbix versions < 6.0 - - all roles - removed support for the zabbix_version variable. - - all roles - removed support for all versions of Zabbix < 6.0. - - all roles - removed support for installation from epel and non-standard repositories - - dropped support of zabbix-api to make REST API calls to Zabbix - - proxy role - removed support for zabbix_database_creation and replaced it - with zabbix_proxy_database_creation - - proxy role - removed support for zabbix_database_sqlload and replaced it - with zabbix_proxy_database_sqlload - - proxy role - removed support for zabbix_selinux and replaced it with zabbix_proxy_selinux - - server role - removed support for zabbix_server_mysql_login_password and replaced - with zabbix_server_dbpassword - - server role - removed support for zabbix_server_mysql_login_user and replaced - with zabbix_server_dbuser - - stopped supporting Ansible < 2.12 - - stopped supporting Python < 3.9 - - zabbix_action - message parameter renamed to op_message - - zabbix_group_facts module - removed in favour of zabbix_group_info - - zabbix_host_facts module - removed in favour of zabbix_host_info + - agent role - removed support for Darwin, Amazon, Fedora, XCP-ng, Suse, Mint, + and Sangoma operating systems + - agent role - removed support for zabbix_create_host and replaced it with zabbix_agent_host_state + - agent role - removed support for zabbix_create_hostgroup and replaced it with + zabbix_agent_hostgroups_state + - agent role - removed support for zabbix_http_password, zabbix_api_http_password, + zabbix_api_pass, and zabbix_api_login_pass and replaced it with zabbix_api_login_pass + - agent role - removed support for zabbix_http_user, zabbix_api_http_user, zabbix_api_user, + and zabbix_api_login_user and replaced it with zabbix_api_login_user + - agent role - removed support for zabbix_inventory_mode and replaced it with + zabbix_agent_inventory_mode + - agent role - removed support for zabbix_link_templates adn replaced it with + zabbix_agent_link_templates + - agent role - removed support for zabbix_macros and replaced it with zabbix_agent_macros + - agent role - removed support for zabbix_proxy and replaced it with zabbix_agent_proxy + - agent role - removed support for zabbix_update_host and replaced it with zabbix_agent_host_update + - all modules - dropped support of Zabbix versions < 6.0 + - all roles - removed support for the zabbix_version variable. + - all roles - removed support for all versions of Zabbix < 6.0. + - all roles - removed support for installation from epel and non-standard repositories + - dropped support of zabbix-api to make REST API calls to Zabbix + - proxy role - removed support for zabbix_database_creation and replaced it + with zabbix_proxy_database_creation + - proxy role - removed support for zabbix_database_sqlload and replaced it + with zabbix_proxy_database_sqlload + - proxy role - removed support for zabbix_selinux and replaced it with zabbix_proxy_selinux + - server role - removed support for zabbix_server_mysql_login_password and replaced + with zabbix_server_dbpassword + - server role - removed support for zabbix_server_mysql_login_user and replaced + with zabbix_server_dbuser + - stopped supporting Ansible < 2.12 + - stopped supporting Python < 3.9 + - zabbix_action - message parameter renamed to op_message + - zabbix_group_facts module - removed in favour of zabbix_group_info + - zabbix_host_facts module - removed in favour of zabbix_host_info minor_changes: - - Replaced usage of deprecated apt key management in Debian based distros - - See https://wiki.debian.org/DebianRepository/UseThirdParty - - Standardized tags across all roles. - - Updated all roles to default to version 6.4 for install. - - all roles - removed unused variables from defaults - - all roles - standardized testing matrix to check all supported versions and - operating systems. - - all roles - temporarily disable epel repo on zabbix installation tasks - - all roles - updated documentation. - - inventory plugin - switched from using zabbix-api to custom implementation - adding authentication with tokens - - inventory script - re-coded to stop using zabbix-api. API tokens support added. - - web role - removed support for htpasswd + - Replaced usage of deprecated apt key management in Debian based distros - + See https://wiki.debian.org/DebianRepository/UseThirdParty + - Standardized tags across all roles. + - Updated all roles to default to version 6.4 for install. + - all roles - removed unused variables from defaults + - all roles - standardized testing matrix to check all supported versions and + operating systems. + - all roles - temporarily disable epel repo on zabbix installation tasks + - all roles - updated documentation. + - inventory plugin - switched from using zabbix-api to custom implementation + adding authentication with tokens + - inventory script - re-coded to stop using zabbix-api. API tokens support added. + - web role - removed support for htpasswd removed_features: - - agent role - removed support to configure firewall - - web role - removed installation of apache, debian, and php + - agent role - removed support to configure firewall + - web role - removed installation of apache, debian, and php fragments: - - 2_0_update.yml - - 941_github_runner.yml - - 963-drop-zabbix-api.yml - - 964_tag_cleanup.yml - - 969_replace_apt_key.yml - - 976_old_zabbix_versions_removal.yml - - default_ver.yml - - inventory_script.yml - - python-ansible.yml - release_date: '2023-05-04' + - 2_0_update.yml + - 941_github_runner.yml + - 963-drop-zabbix-api.yml + - 964_tag_cleanup.yml + - 969_replace_apt_key.yml + - 976_old_zabbix_versions_removal.yml + - default_ver.yml + - inventory_script.yml + - python-ansible.yml + release_date: "2023-05-04" 2.0.1: changes: bugfixes: - - Proxy and Agent Roles - Added `zabbix_api_use_ssl` variable to allow secure - API connections - - Web Role - Added defaults and documentation for `zabbix_apache_custom_includes` - - agent - Handled undefined variable error for Windows default versions - - all roles - Added option to selectively disable a repo on Redhat installs + - Proxy and Agent Roles - Added `zabbix_api_use_ssl` variable to allow secure + API connections + - Web Role - Added defaults and documentation for `zabbix_apache_custom_includes` + - agent - Handled undefined variable error for Windows default versions + - all roles - Added option to selectively disable a repo on Redhat installs fragments: - - 986.yml - - 990.yml - - api_ssl.yml - - disable_repo.yml - release_date: '2023-05-26' + - 986.yml + - 990.yml + - api_ssl.yml + - disable_repo.yml + release_date: "2023-05-26" 2.1.0: changes: bugfixes: - - agent role - Added missing become statement to allow run to role as nonroot - - zabbix_host module - fix updating hosts that were discovered via LLD - - zabbix_proxy role - failed at version validation. Fix adds cast of zabbix_proxy_version - to float, similarly to the other roles. - - zabbix_proxy role - undefined vars at updating proxy definition. Fix adds - null defaults for zabbix_proxy_tlsaccept and zabbix_proxy_tlsconnect. - - zabbix_web role - removed 'ssl on;' nginx configuration, which is no longer - supported since nginx version 1.25.1. + - agent role - Added missing become statement to allow run to role as nonroot + - zabbix_host module - fix updating hosts that were discovered via LLD + - zabbix_proxy role - failed at version validation. Fix adds cast of zabbix_proxy_version + to float, similarly to the other roles. + - zabbix_proxy role - undefined vars at updating proxy definition. Fix adds + null defaults for zabbix_proxy_tlsaccept and zabbix_proxy_tlsconnect. + - zabbix_web role - removed 'ssl on;' nginx configuration, which is no longer + supported since nginx version 1.25.1. minor_changes: - - Multiple Roles - Replaced depricated 'include' statements with 'include_tasks' - - Update action_groups variable in runtime.yml - - all roles - Added support for Debian 12 (Bookworm) - - all roles - Delete gpg ids variable. - - all roles - Modified to allow a non-root user to run the role. - - all roles - Updated testing to account for the correct version of Zabbix - - zabbix_hostmacro module - Add description property for Host macro creation/update. - Allow to set/update description of Zabbix host macros. - - zabbix_proxy - Added installation of PyMySQL pip package - - zabbix_proxy - Modified installation of Centos 7 MySQL client - - zabbix_proxy - Standardized MySQL client installed on Debian and Ubuntu - - zabbix_regexp module added - - zabbix_settings module added - - zabbix_token module added + - Multiple Roles - Replaced depricated 'include' statements with 'include_tasks' + - Update action_groups variable in runtime.yml + - all roles - Added support for Debian 12 (Bookworm) + - all roles - Delete gpg ids variable. + - all roles - Modified to allow a non-root user to run the role. + - all roles - Updated testing to account for the correct version of Zabbix + - zabbix_hostmacro module - Add description property for Host macro creation/update. + Allow to set/update description of Zabbix host macros. + - zabbix_proxy - Added installation of PyMySQL pip package + - zabbix_proxy - Modified installation of Centos 7 MySQL client + - zabbix_proxy - Standardized MySQL client installed on Debian and Ubuntu + - zabbix_regexp module added + - zabbix_settings module added + - zabbix_token module added fragments: - - 1025-delete_vars_zabbix.yml - - 1029-update_action_groups.yml - - 732-zabbix-regexp.yml - - 991-zabbix-token.yml - - 993-zabbix-settings.yml - - agent_become.yml - - debian12.yml - - discovered_hosts_update.yml - - hostmacro_modules.yml - - include_tasks.yml - - missing.yml - - nginx_ssl_fix.yml - - non_root.yml - - proxy_role_fix.yml + - 1025-delete_vars_zabbix.yml + - 1029-update_action_groups.yml + - 732-zabbix-regexp.yml + - 991-zabbix-token.yml + - 993-zabbix-settings.yml + - agent_become.yml + - debian12.yml + - discovered_hosts_update.yml + - hostmacro_modules.yml + - include_tasks.yml + - missing.yml + - nginx_ssl_fix.yml + - non_root.yml + - proxy_role_fix.yml modules: - - description: Create/update/delete Zabbix regular expression - name: zabbix_regexp - namespace: '' - - description: Update Zabbix global settings. - name: zabbix_settings - namespace: '' - - description: Create/Update/Generate/Delete Zabbix token. - name: zabbix_token - namespace: '' - release_date: '2023-06-01' + - description: Create/update/delete Zabbix regular expression + name: zabbix_regexp + namespace: "" + - description: Update Zabbix global settings. + name: zabbix_settings + namespace: "" + - description: Create/Update/Generate/Delete Zabbix token. + name: zabbix_token + namespace: "" + release_date: "2023-06-01" 2.2.0: changes: bugfixes: - - zabbix_inventory - fixed handeling of add_zabbix_groups option - - zabbix_template - fix template export when template's content has "error" - word - - zabbix_web role - fix variable naming issues (undefined) to zabbix_web_version - and zabbix_web_apt_repository + - zabbix_inventory - fixed handeling of add_zabbix_groups option + - zabbix_template - fix template export when template's content has "error" + word + - zabbix_web role - fix variable naming issues (undefined) to zabbix_web_version + and zabbix_web_apt_repository minor_changes: - - Added zabbix_group_events_info module - - action module - Added notify_if_canceled property - - agent and proxy roles - Set default `zabbix_api_server_port` to 80 or 443 - based on `zabbix_api_use_ssl` - - agent role - Removed duplicative Windows agent task - - agent role - Standardized default yum priority to 99 - - all roles - Re-added ability to override Debian repo source - - all roles - Updated Debian repository format to 822 standard - - various - updated testing modules - - various - updated to fully qualified module names - - zabbix agent - Added capability to add additional configuration includes - - zabbix_api_info module added - - zabbix_user module - add current_passwd optional parameter to enable password - updating of the currently logged in user (https://www.zabbix.com/documentation/6.4/en/manual/api/reference/user/update) + - Added zabbix_group_events_info module + - action module - Added notify_if_canceled property + - agent and proxy roles - Set default `zabbix_api_server_port` to 80 or 443 + based on `zabbix_api_use_ssl` + - agent role - Removed duplicative Windows agent task + - agent role - Standardized default yum priority to 99 + - all roles - Re-added ability to override Debian repo source + - all roles - Updated Debian repository format to 822 standard + - various - updated testing modules + - various - updated to fully qualified module names + - zabbix agent - Added capability to add additional configuration includes + - zabbix_api_info module added + - zabbix_user module - add current_passwd optional parameter to enable password + updating of the currently logged in user (https://www.zabbix.com/documentation/6.4/en/manual/api/reference/user/update) fragments: - - 1058-zabbix_template_corner_case.yml - - 1081_fqmn.yml - - 733-zabbix-api_info.yml - - 921-action_notify_if_cancled.yml - - additional_includes.yml - - api-port.yml - - current_passwd_user_module.yml - - deb822.yml - - duplicate-windows-agent.yml - - module_group_events_info.yml - - web_role_vars_fix.yml - - yum-priority.yml - release_date: '2023-10-06' + - 1058-zabbix_template_corner_case.yml + - 1081_fqmn.yml + - 733-zabbix-api_info.yml + - 921-action_notify_if_cancled.yml + - additional_includes.yml + - api-port.yml + - current_passwd_user_module.yml + - deb822.yml + - duplicate-windows-agent.yml + - module_group_events_info.yml + - web_role_vars_fix.yml + - yum-priority.yml + release_date: "2023-10-06" 2.3.0: changes: bugfixes: - - api module - Fixed certificiate errors - - proxy and server roles - Defaulted location of fping and fping6 based on OS. - - proxy role - Removed requirement for mysql group definition. - - server role - typo in configuration var StasAllowedIP to StatsAllowedIP - - zabbix-{agent, javagateway, proxy, server, web} - support raspberry pi without - repository url specification + - api module - Fixed certificiate errors + - proxy and server roles - Defaulted location of fping and fping6 based on OS. + - proxy role - Removed requirement for mysql group definition. + - server role - typo in configuration var StasAllowedIP to StatsAllowedIP + - zabbix-{agent, javagateway, proxy, server, web} - support raspberry pi without + repository url specification minor_changes: - - api_requests - Handled error from depricated CertificateError class - - multiple roles - Removed unneeded Apt Clean commands. - - proxy role - Updated MariaDB version for Centos 7 to 10.11 - - zabbix web - Allowed the independent configuration of php-fpm without creating - vhost. - - zabbix_host_info - added ability to get all the hosts configured in Zabbix - - zabbix_proxy role - Add variable zabbix_proxy_dbpassword_hash_method to control - whether you want postgresql user password to be hashed with md5 or want to - use db default. When zabbix_proxy_dbpassword_hash_method is set to anything - other than md5 then do not hash the password with md5 so you could use postgresql - scram-sha-256 hashing method. - - zabbix_server role - Add variable zabbix_server_dbpassword_hash_method to - control whether you want postgresql user password to be hashed with md5 or - want to use db default. When zabbix_server_dbpassword_hash_method is set to - anything other than md5 then do not hash the password with md5 so you could - use postgresql scram-sha-256 hashing method. - - zabbix_templategroup module added + - api_requests - Handled error from depricated CertificateError class + - multiple roles - Removed unneeded Apt Clean commands. + - proxy role - Updated MariaDB version for Centos 7 to 10.11 + - zabbix web - Allowed the independent configuration of php-fpm without creating + vhost. + - zabbix_host_info - added ability to get all the hosts configured in Zabbix + - zabbix_proxy role - Add variable zabbix_proxy_dbpassword_hash_method to control + whether you want postgresql user password to be hashed with md5 or want to + use db default. When zabbix_proxy_dbpassword_hash_method is set to anything + other than md5 then do not hash the password with md5 so you could use postgresql + scram-sha-256 hashing method. + - zabbix_server role - Add variable zabbix_server_dbpassword_hash_method to + control whether you want postgresql user password to be hashed with md5 or + want to use db default. When zabbix_server_dbpassword_hash_method is set to + anything other than md5 then do not hash the password with md5 so you could + use postgresql scram-sha-256 hashing method. + - zabbix_templategroup module added fragments: - - 1134.yml - - 1136.yml - - 1142.yml - - fping.yml - - host_info_all_hosts.yml - - php_fpm_config.yml - - pr_1104.yml - - pr_647.yml - - proxy_mysql.yml - - pymysql.yml - - raspberrypi.yml - release_date: '2024-01-02' + - 1134.yml + - 1136.yml + - 1142.yml + - fping.yml + - host_info_all_hosts.yml + - php_fpm_config.yml + - pr_1104.yml + - pr_647.yml + - proxy_mysql.yml + - pymysql.yml + - raspberrypi.yml + release_date: "2024-01-02" 2.3.1: changes: bugfixes: - - Avoid to update user-directory configuration in dry run. + - Avoid to update user-directory configuration in dry run. fragments: - - 1156-bugfix_zabbix_user_directory_dryrun.yml - release_date: '2024-01-10' + - 1156-bugfix_zabbix_user_directory_dryrun.yml + release_date: "2024-01-10" 2.4.0: changes: bugfixes: - - zabbix_agent - Fixed IPMI authentication algorithm default setting - - zabbix_agent - Fixed issue to where scripts can be deployed alongside userparameters - - zabbix_host - Don't reset IPMI setting when update inventory data of a host - - zabbix_host - Finish task with failed if host_group parameter is empty list - - zabbix_server - proper indentaion of become in selinux.yaml - - zabbix_web - Added missing semicolon to nginx vhost template. - - zabbix_web role, Add missing selinux.yml tasks. + - zabbix_agent - Fixed IPMI authentication algorithm default setting + - zabbix_agent - Fixed issue to where scripts can be deployed alongside userparameters + - zabbix_host - Don't reset IPMI setting when update inventory data of a host + - zabbix_host - Finish task with failed if host_group parameter is empty list + - zabbix_server - proper indentaion of become in selinux.yaml + - zabbix_web - Added missing semicolon to nginx vhost template. + - zabbix_web role, Add missing selinux.yml tasks. minor_changes: - - Add slash at the end of the location directives, to prevent path traversal - attacks. - - Added active_since and active_till in zabbix_maintenance - - Added content_type for email in zabbix_mediatypes - - Introduce flag `enable_version_check` to allow installations on non-supported - platforms. - - agent, javagateway, proxy, server, and web role - added the http_proxy and - https_proxy environment variables to "Debian | Download gpg key" analog to - other tasks - - agent, javagateway, proxy, server, and web role - introduced default variable - zabbix_repo_deb_gpg_key_url with value http://repo.zabbix.com/zabbix-official-repo.key - - agent, javagateway, proxy, server, and web role - introduced default variable - zabbix_repo_deb_include_deb_src with value true - - agent, javagateway, proxy, server, and web role - removed superfluous slash - in zabbix_gpg_key of the Debian vars and renamed key to zabbix-repo instead - of zabbix-official-repo - - agent, javagateway, proxy, server, and web role - used variable zabbix_repo_deb_include_deb_src - in "Debian | Installing repository" to determine whether deb-src should be - added to /etc/apt/sources.list.d/zabbix.sources - - agent, javagateway, proxy, server, and web role - used zabbix_repo_deb_gpg_key_url - in "Debian | Download gpg key" instead of hardcoded url - - zabbix_correlation module added - - zabbix_service_info module added - - zabbix_template - Add template_yaml parameter. - - zabbix_web role, Refactored zabbix_selinux variable names to correlate with - selinux boolean names. + - Add slash at the end of the location directives, to prevent path traversal + attacks. + - Added active_since and active_till in zabbix_maintenance + - Added content_type for email in zabbix_mediatypes + - Introduce flag `enable_version_check` to allow installations on non-supported + platforms. + - agent, javagateway, proxy, server, and web role - added the http_proxy and + https_proxy environment variables to "Debian | Download gpg key" analog to + other tasks + - agent, javagateway, proxy, server, and web role - introduced default variable + zabbix_repo_deb_gpg_key_url with value http://repo.zabbix.com/zabbix-official-repo.key + - agent, javagateway, proxy, server, and web role - introduced default variable + zabbix_repo_deb_include_deb_src with value true + - agent, javagateway, proxy, server, and web role - removed superfluous slash + in zabbix_gpg_key of the Debian vars and renamed key to zabbix-repo instead + of zabbix-official-repo + - agent, javagateway, proxy, server, and web role - used variable zabbix_repo_deb_include_deb_src + in "Debian | Installing repository" to determine whether deb-src should be + added to /etc/apt/sources.list.d/zabbix.sources + - agent, javagateway, proxy, server, and web role - used zabbix_repo_deb_gpg_key_url + in "Debian | Download gpg key" instead of hardcoded url + - zabbix_correlation module added + - zabbix_service_info module added + - zabbix_template - Add template_yaml parameter. + - zabbix_web role, Refactored zabbix_selinux variable names to correlate with + selinux boolean names. fragments: - - 1157-add_template_yaml.yml - - 1162-do_not_update_ipmi_options.yml - - 1165-indent-become.yml - - 1168-finish-task-with-failed-if-host_group-parameter-is-empty_list.yml - - 1169-add_zabbix_correlation.yml - - 1176-content_type-in-mediatype.yml - - 1180-active_since-in-maintenance.yml - - 1183-nginx-fix-against-path-traversal.yml - - 1186-custom_gpg_key_url.yml - - 1188-agent_ipmi_authtype_fix.yml - - 1205-fix-zabbix-agent-scripts.yml - - 1206-fix-nginx-template-ssl-params.yml - - 1210-add_zabbix_service_info.yml - - 1220-refactor_selinux_tasks_and_variable_names_role_zabbix_web.yml - - 1224-enable-version-check.yml + - 1157-add_template_yaml.yml + - 1162-do_not_update_ipmi_options.yml + - 1165-indent-become.yml + - 1168-finish-task-with-failed-if-host_group-parameter-is-empty_list.yml + - 1169-add_zabbix_correlation.yml + - 1176-content_type-in-mediatype.yml + - 1180-active_since-in-maintenance.yml + - 1183-nginx-fix-against-path-traversal.yml + - 1186-custom_gpg_key_url.yml + - 1188-agent_ipmi_authtype_fix.yml + - 1205-fix-zabbix-agent-scripts.yml + - 1206-fix-nginx-template-ssl-params.yml + - 1210-add_zabbix_service_info.yml + - 1220-refactor_selinux_tasks_and_variable_names_role_zabbix_web.yml + - 1224-enable-version-check.yml modules: - - description: Create/update/delete Zabbix correlation - name: zabbix_correlation - namespace: '' - release_date: '2024-05-13' + - description: Create/update/delete Zabbix correlation + name: zabbix_correlation + namespace: "" + release_date: "2024-05-13" + 2.5.0: + changes: + bugfixes: + - zabbix_web - make the FPM socket group-writable so the web server can properly + forward requests to the FPM process + minor_changes: + - agent role - Standardized all configuration variables using the `zabbix_agent` + prefix vs `zabbix_agent2`. Support for `zabbix_agent2` to be removed in 3.0.0 + - agent role - Standardized templating of agent.conf file + - all roles - Added support for Ubuntu 24.04 (Noble Numbat) + - zabbix_discoveryrule module added + - zabbix_host_events_update module added + - zabbix_item - add support for setting master items by name + - zabbix_item module added + - zabbix_itemprototype - add support for setting master items by name + - zabbix_itemprototype module added + - zabbix_trigger module added + - zabbix_triggerprototype module added + fragments: + - 1221-add_support_for_ubuntu_24.04.yml + - 1227-fpm-socket-permissions.yml + - agent.yml + - pr_1222.yml + - pr_1234.yml + - pr_1238.yml + release_date: "2024-05-30" + 2.5.1: + changes: + bugfixes: + - zabbix_agent - Fix reading existing psk + - zabbix_agent - Fix role when zabbix_agent_listenip is undefined + fragments: + - pr_1245.yml + - pr_1246.yml + release_date: "2024-05-30" diff --git a/ansible_collections/community/zabbix/docs/ZABBIX_AGENT_ROLE.md b/ansible_collections/community/zabbix/docs/ZABBIX_AGENT_ROLE.md index fe4a601b3..f9a2fb5a5 100644 --- a/ansible_collections/community/zabbix/docs/ZABBIX_AGENT_ROLE.md +++ b/ansible_collections/community/zabbix/docs/ZABBIX_AGENT_ROLE.md @@ -28,7 +28,6 @@ * [proxy](#proxy) - [Dependencies](#dependencies) - [Example Playbook](#example-playbook) - * [zabbix_agent2_plugins](#zabbix-agent2-plugins) * [agent_interfaces](#agent-interfaces) * [Other interfaces](#other-interfaces) * [Vars in role configuration](#vars-in-role-configuration) @@ -95,6 +94,7 @@ See the following list of supported Operating systems with the Zabbix releases: | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | | Red Hat Fam 7 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | V | V | V | @@ -104,24 +104,6 @@ See the following list of supported Operating systems with the Zabbix releases: You can bypass this matrix by setting `enable_version_check: false` -# Getting started - -## Minimal Configuration - -In order to get the Zabbix Agent running, you'll have to define the following properties before executing the role: - -* `zabbix_agent_version` -* `zabbix_agent(2)_server` -* `zabbix_agent(2)_serveractive` (When using active checks) - -The `zabbix_agent_version` is optional. The latest available major.minor version of Zabbix will be installed on the host(s). If you want to use an older version, please specify this in the major.minor format. Example: `zabbix_agent_version: 6.0`. - -The `zabbix_agent(2)_server` (and `zabbix_agent(2)_serveractive`) should contain the ip or fqdn of the host running the Zabbix Server. - -## Issues - -Due to issue discussed on [#291](https://github.com/dj-wasabi/ansible-zabbix-agent/issues/291), the Ansible Version 2.9.{0,1,2} isn't working correctly on Windows related targets. - # Role Variables ## Main variables @@ -133,114 +115,66 @@ The following is an overview of all available configuration default for this rol * `zabbix_agent_version`: This is the version of zabbix. Default: The highest supported version for the operating system. Can be overridden to 6.4, 6.2, or 6.0 * `zabbix_agent_version_minor`: When you want to specify a minor version to be installed. Is also used for `zabbix_sender` and `zabbix_get`. RedHat only. Default set to: `*` (latest available) * `zabbix_repo_yum`: A list with Yum repository configuration. +* `zabbix_repo_yum_gpgcheck`: If Yum should check GPG keys on installation * `zabbix_repo_yum_schema`: Default: `https`. Option to change the web schema for the yum repository(http/https) * `zabbix_agent_disable_repo`: A list of repos to disable during install. Default `epel`. * `zabbix_repo_deb_url`: The URL to the Zabbix repository. Default `http://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}/{{ ansible_distribution.lower() }}` * `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`. -* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`. +* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key. * `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`. ### SElinux * `zabbix_selinux`: Default: `False`. Enables an SELinux policy so that the server will run. +* `selinux_allow_zabbix_run_sudo`: Default: `False`. Enable Zabbix root access on system. ### Zabbix Agent -* `zabbix_agent_ip`: The IP address of the host. When not provided, it will be determined via the `ansible_default_ipv4` fact. * `zabbix_agent2`: Default: `False`. When you want to install the `Zabbix Agent2` instead of the "old" `Zabbix Agent`.zabbix_agent_version +* `zabbix_agent_apt_priority`: Add a weight (`Pin-Priority`) for the APT repository. +* `zabbix_agent_chassis`: Default: `false`. When set to `true`, it will give Zabbix Agent access to the Linux DMI table allowing system.hw.chassis info to populate. +* `zabbix_agent_conf_mode`: Default: `0644`. The "mode" for the Zabbix configuration file. +* `zabbix_agent_dont_detect_ip`: Default `false`. When set to `true`, it won't detect available ip addresses on the host and no need for the Python module `netaddr` to be installed. +* `zabbix_agent_get_package`: The name of the zabbix-get package. Default: `zabbix-get`. +* `zabbix_agent_include_mode`: The mode for the directory mentioned above. +* `zabbix_agent_install_agent_only`: Only install the Zabbix Agent and not the `zabbix-sender` and `zabbix-get` packages. Default: `False` * `zabbix_agent_listeninterface`: Interface zabbix-agent listens on. Leave blank for all. * `zabbix_agent_package_remove`: If `zabbix_agent2: True` and you want to remove the old installation. Default: `False`. -* `zabbix_agent_package`: The name of the zabbix-agent package. Default: `zabbix-agent`. In case for EPEL, it is automatically renamed. -* `zabbix_sender_package`: The name of the zabbix-sender package. Default: `zabbix-sender`. In case for EPEL, it is automatically renamed. -* `zabbix_get_package`: The name of the zabbix-get package. Default: `zabbix-get`. In case for EPEL, it is automatically renamed. -* `zabbix_agent_package_state`: If Zabbix-agent needs to be `present` or `latest`. -* `zabbix_agent_interfaces`: A list that configured the interfaces you can use when configuring via API. -* `zabbix_agent_install_agent_only`: Only install the Zabbix Agent and not the `zabbix-sender` and `zabbix-get` packages. Default: `False` +* `zabbix_agent_package_state`: If Zabbix-agent needs to be `present` (default) or `latest`. +* `zabbix_agent_package`: The name of the zabbix-agent package. Default: `zabbix-agent` if `zabbix_agent2` is fale and `zabbix-agent2` if `true`. +* `zabbix_agent_sender_package`: The name of the zabbix-sender package. Default: `zabbix-sender`. * `zabbix_agent_userparameters`: Default: `[]]`. List of userparameter names and scripts (if any). Detailed description is given in the [Deploying Userparameters](#deploying-userparameters) section. - * `name`: Userparameter name (should be the same with userparameter template file name) - * `scripts_dir`: Directory name of the custom scripts needed for userparameters -* `zabbix_agent_userparameters_templates_src`: indicates the relative path (from `templates/`) where userparameter templates are searched + * `name`: Userparameter name (should be the same with userparameter template file name) + * `scripts_dir`: Directory name of the custom scripts needed for userparameters * `zabbix_agent_userparameters_scripts_src`: indicates the relative path (from `files/`) where userparameter scripts are searched -* `zabbix_agent_runas_user`: Drop privileges to a specific, existing user on the system. Only has effect if run as 'root' and AllowRoot is disabled. -* `zabbix_agent_become_on_localhost`: Default: `True`. Set to `False` if you don't need to elevate privileges on localhost to install packages locally with pip. -* `zabbix_agent_apt_priority`: Add a weight (`Pin-Priority`) for the APT repository. -* `zabbix_agent_conf_mode`: Default: `0644`. The "mode" for the Zabbix configuration file. -* `zabbix_agent_dont_detect_ip`: Default `false`. When set to `true`, it won't detect available ip addresses on the host and no need for the Python module `netaddr` to be installed. -* `zabbix_agent_chassis`: Default: `false`. When set to `true`, it will give Zabbix Agent access to the Linux DMI table allowing system.hw.chassis info to populate. - -### Zabbix Agent vs Zabbix Agent 2 configuration - -The following provides an overview of all the properties that can be set in the Zabbix Agent configuration file. When `(2)` is used in the name of the property, like `zabbix_agent(2)_pidfile`, it will show that you can configure `zabbix_agent_pidfile` for the Zabbix Agent configuration file and `zabbix_agent2_pidfile` for the Zabbix Agent 2 configuration file. - -Otherwise it just for the Zabbix Agent or for the Zabbix Agent 2. - -* `zabbix_agent(2)_server`: The ip address for the zabbix-server or zabbix-proxy. -* `zabbix_agent(2)_serveractive`: The ip address for the zabbix-server or zabbix-proxy for active checks. -* `zabbix_agent(2)_allow_key`: list of AllowKey configurations. -* `zabbix_agent(2)_deny_key`: list of DenyKey configurations. -* `zabbix_agent(2)_pidfile`: name of pid file. -* `zabbix_agent(2)_logfile`: name of log file. -* `zabbix_agent(2)_logfilesize`: maximum size of log file in mb. -* `zabbix_agent(2)_additional_include`: A list of additional complete paths to include in configuration -* `zabbix_agent(2)_logtype`: Specifies where log messages are written to -* `zabbix_agent(2)_debuglevel`: specifies debug level -* `zabbix_agent(2)_sourceip`: source ip address for outgoing connections. -* `zabbix_agent_enableremotecommands`: whether remote commands from zabbix server are allowed. -* `zabbix_agent_logremotecommands`: enable logging of executed shell commands as warnings. -* `zabbix_agent(2)_listenport`: agent will listen on this port for connections from the server. -* `zabbix_agent2_statusport`: Agent will listen on this port for HTTP status requests. -* `zabbix_agent(2)_listenip`: list of comma delimited ip addresses that the agent should listen on. -* `zabbix_agent_startagents`: number of pre-forked instances of zabbix_agentd that process passive checks. -* `zabbix_agent(2)_hostname`: unique, case sensitive hostname. -* `zabbix_agent(2)_hostnameitem`: item used for generating hostname if it is undefined. -* `zabbix_agent(2)_hostmetadata`: optional parameter that defines host metadata. -* `zabbix_agent(2)_hostmetadataitem`: optional parameter that defines an item used for getting the metadata. -* `zabbix_agent(2)_refreshactivechecks`: how often list of active checks is refreshed, in seconds. -* `zabbix_agent(2)_buffersend`: do not keep data longer than n seconds in buffer. -* `zabbix_agent(2)_buffersize`: maximum number of values in a memory buffer. the agent will send all collected data to zabbix server or proxy if the buffer is full. -* `zabbix_agent2_enablepersistentbuffer`: 0 - disabled, in-memory buffer is used (default); 1 - use persistent buffer -* `zabbix_agent2_persistentbufferperiod`: Zabbix Agent2 will keep data for this time period in case of no connectivity with Zabbix server or proxy. Older data will be lost. Log data will be preserved. -* `zabbix_agent2_persistentbufferfile`: Zabbix Agent2 will keep SQLite database in this file * n is valid if `EnablePersistentBuffer=1` -* `zabbix_agent_maxlinespersecond`: maximum number of new lines the agent will send per second to zabbix server or proxy processing 'log' and 'logrt' active checks. -* `zabbix_agent_allowroot`: allow the agent to run as 'root'. if disabled and the agent is started by 'root', the agent will try to switch to user 'zabbix' instead. has no effect if started under a regular user. -* `zabbix_agent(2)_zabbix_alias`: sets an alias for parameter. it can be useful to substitute long and complex parameter name with a smaller and simpler one. Can be both a string as an list. -* `zabbix_agent(2)_timeout`: spend no more than timeout seconds on processing -* `zabbix_agent(2)_include`: you may include individual files or all files in a directory in the configuration file. -* `zabbix_agent(2)_include_pattern`: Optional file pattern used for included files. -* `zabbix_agent(2)_include_mode`: The mode for the directory mentioned above. -* `zabbix_agent(2)_unsafeuserparameters`: allow all characters to be passed in arguments to user-defined parameters. -* `zabbix_agent_loadmodulepath`: Full path to location of agent modules. -* `zabbix_agent_loadmodule`: Module to load at agent startup. Modules are used to extend functionality of the agent. -* `zabbix_agent2_controlsocket`: The control socket, used to send runtime commands with '-R' option. -* `zabbix_agent_allowroot`: Allow the agent to run as 'root'. 0 - do not allow, 1 - allow -* `zabbix_agent2_plugins`: A list containing plugin configuration. -* `zabbix_agent(2)_listenbacklog`: The maximum number of pending connections in the queue. +* `zabbix_agent_userparameters_templates_src`: indicates the relative path (from `templates/`) where userparameter templates are searched ## TLS Specific configuration +* `zabbix_agent_tlspsk_auto`: Enables auto generation and storing of individual pre-shared keys and identities on clients. Is false by default. If set to true and if `zabbix_agent_tlspskfile` and `zabbix_agent_tlspsk_secret` are undefined, it generates the files `/etc/zabbix/tls_psk_auto.identity` and `/etc/zabbix/tls_psk_auto.secret`, which are populated by values automatically (identity is set to hostname, underscore and 4 random alphanumeric digits; secret is 64 random alphanumeric digits) in such a way that the values are generated once and are never overwritten. -These variables are specific for Zabbix 3.0 and higher. When `(2)` is used in the name of the property, like `zabbix_agent(2)_tlsconnect`, it will show that you can configure `zabbix_agent_tlsconnect` for the Zabbix Agent configuration file and `zabbix_agent2_tlsconnect` for the Zabbix Agent 2 configuration file. - -* `zabbix_agent(2)_tlsconnect`: How the agent should connect to server or proxy. Used for active checks. +* `zabbix_agent_tlsconnect`: How the agent should connect to server or proxy. Used for active checks. Possible values: * unencrypted * psk * cert -* `zabbix_agent(2)_tlsaccept`: What incoming connections to accept. +* `zabbix_agent_tlsaccept`: What incoming connections to accept. Possible values: * unencrypted * psk * cert -* `zabbix_agent(2)_tlscafile`: Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. -* `zabbix_agent(2)_tlscrlfile`: Full pathname of a file containing revoked certificates. -* `zabbix_agent(2)_tlsservercertissuer`: Allowed server certificate issuer. -* `zabbix_agent(2)_tlsservercertsubject`: Allowed server certificate subject. -* `zabbix_agent(2)_tlscertfile`: Full pathname of a file containing the agent certificate or certificate chain. -* `zabbix_agent(2)_tlskeyfile`: Full pathname of a file containing the agent private key. -* `zabbix_agent(2)_tlspskidentity`: Unique, case sensitive string used to identify the pre-shared key. -* `zabbix_agent(2)_tlspskidentity_file`: Full pathname of a file containing the pre-shared key identity. -* `zabbix_agent(2)_tlspskfile`: Full pathname of a file containing the pre-shared key. -* `zabbix_agent(2)_tlspsk_secret`: The pre-shared secret key that should be placed in the file configured with `agent_tlspskfile`. -* `zabbix_agent(2)_tlspsk_auto`: Enables auto generation and storing of individual pre-shared keys and identities on clients. Is false by default. If set to true and if `zabbix_agent_tlspskfile` and `zabbix_agent_tlspsk_secret` are undefined, it generates the files `/etc/zabbix/tls_psk_auto.identity` and `/etc/zabbix/tls_psk_auto.secret`, which are populated by values automatically (identity is set to hostname, underscore and 4 random alphanumeric digits; secret is 64 random alphanumeric digits) in such a way that the values are generated once and are never overwritten. + +* `zabbix_agent_tlscafile`: Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. +* `zabbix_agent_tlscertfile`: Full pathname of a file containing the agent certificate or certificate chain. +* `zabbix_agent_tlscrlfile`: Full pathname of a file containing revoked certificates. +* `zabbix_agent_tlskeyfile`: Full pathname of a file containing the agent private key. +* `zabbix_agent_tlspskfile`: Full pathname of a file containing the pre-shared key. +* `zabbix_agent_tlspskidentity`: Unique, case sensitive string used to identify the pre-shared key. +* `zabbix_agent_tlspskidentity_file`: Full pathname of a file containing the pre-shared key identity. +* `zabbix_agent_tlspsk_secret`: The pre-shared secret key for the agent. +* `zabbix_agent_tlsservercertissuer`: Allowed server certificate issuer. +* `zabbix_agent_tlsservercertsubject`: Allowed server certificate subject. +* `zabbix_agent_tls_subject`: The subject of the TLS certificate. +* `zabbix_agent_visible_hostname` : Configure Zabbix visible name inside Zabbix web UI for the node. The results are stored in the Ansible variables `zabbix_agent_tlspskidentity` and `zabbix_agent_tlspsk_secret`, so that they may be used later in the code, for example with [zabbix_host](https://docs.ansible.com/ansible/latest/collections/community/zabbix/zabbix_host_module.html) to configure the Zabbix server or with `debug: msg:` to display them to the user. @@ -250,51 +184,49 @@ These variables need to be overridden when you want to make use of the Zabbix AP Host encryption configuration will be set to match agent configuration. -* `zabbix_api_server_host`: The IP or hostname/FQDN of Zabbix server. Example: zabbix.example.com -* `zabbix_api_use_ssl`: Is SSL required to connect to the Zabbix API server? Default: `false` -* `zabbix_api_server_port`: 80 if `zabbix_api_use_ssl` is `false` and 443 if `true` (Default) TCP port to use to connect to Zabbix server. Example: 8080 -* `zabbix_api_login_user`: Username of user which has API access. -* `zabbix_api_login_pass`: Password for the user which has API access. -* `zabbix_api_http_user`: The http user to access zabbix url with Basic Auth (if your Zabbix is behind a proxy with HTTP Basic Auth). -* `zabbix_api_http_password`: The http password to access zabbix url with Basic Auth (if your Zabbix is behind a proxy with HTTP Basic Auth). -* `zabbix_api_validate_certs`: yes (Default) if we need to validate tls certificates of the API. Use `no` in case self-signed certificates are used. -* `zabbix_api_timeout`: How many seconds to wait for API response (default 30s). -* `zabbix_api_create_hosts`: Default: `False`. When you want to enable the Zabbix API to create/delete the host. This has to be set to `True` if you want to make use of `zabbix_agent_host_state`. -* `zabbix_api_create_hostgroup`: When you want to enable the Zabbix API to create/delete the hostgroups. This has to be set to `True` if you want to make use of `zabbix_agent_hostgroups_state`.Default: `False` -* `ansible_zabbix_url_path`: URL path if Zabbix WebUI running on non-default (zabbix) path, e.g. if http://<FQDN>/zabbixeu then set to `zabbixeu` -* `zabbix_agent_hostgroups_state`: present (Default) if the hostgroup needs to be created or absent if you want to delete it. This only works when `zabbix_api_create_hostgroup` is set to `True`. -* `zabbix_host_status`: enabled (Default) when host in monitored, disabled when host is disabled for monitoring. +* `zabbix_agent_description`: Description of the host in Zabbix. * `zabbix_agent_host_state`: present (Default) if the host needs to be created or absent is you want to delete it. This only works when `zabbix_api_create_hosts` is set to `True`. * `zabbix_agent_host_update`: yes (Default) if the host should be updated if already present. This only works when `zabbix_api_create_hosts` is set to `True`. -* `zabbix_useuip`: 1 if connection to zabbix-agent is made via ip, 0 for fqdn. -* `zabbix_host_groups`: A list of hostgroups which this host belongs to. -* `zabbix_agent_link_templates`: A list of templates which needs to be link to this host. The templates should exist. +* `zabbix_agent_interfaces`: A list of interfaces and their configurations you can use when configuring via API. +* `zabbix_agent_inventory_mode`: Configure Zabbix inventory mode. Needed for building inventory data, manually when configuring a host or automatically by using some automatic population options. This has to be set to `automatic` if you want to make automatically building inventory data. Default `disabled` +* `zabbix_agent_inventory_zabbix`: Adds Facts for a zabbix inventory. Default `{}` +* `zabbix_agent_ip`: The IP address of the host. When not provided, it will be determined via the `ansible_default_ipv4` fact. +* `zabbix_agent_link_templates`: A list of templates which needs to be link to this host. The templates should exist. Default: "Templated Linux by Zabbix agent" * `zabbix_agent_macros`: A list with macro_key and macro_value for creating hostmacro's. +* `zabbix_agent_proxy`: The name of the Zabbix proxy (if used). Default `null` * `zabbix_agent_tags`: A list with tag and (optionally) value for creating host tags. -* `zabbix_agent_inventory_mode`: Configure Zabbix inventory mode. Needed for building inventory data, manually when configuring a host or automatically by using some automatic population options. This has to be set to `automatic` if you want to make automatically building inventory data. -* `zabbix_agent_visible_hostname` : Configure Zabbix visible name inside Zabbix web UI for the node. -* `zabbix_agent_description`: Description of the host in Zabbix. -* `zabbix_agent_inventory_zabbix`: Adds Facts for a zabbix inventory +* `zabbix_api_create_hostgroup`: When you want to enable the Zabbix API to create/delete the hostgroups. Default: `False` +* `zabbix_api_create_hosts`: Default: `False`. When you want to enable the Zabbix API to create/delete the host. This has to be set to `True` if you want to make use of `zabbix_agent_host_state`. +* `zabbix_api_http_password`: The http password to access zabbix url with Basic Auth (if your Zabbix is behind a proxy with HTTP Basic Auth). +* `zabbix_api_http_user`: The http user to access zabbix url with Basic Auth (if your Zabbix is behind a proxy with HTTP Basic Auth). +* `zabbix_api_login_pass`: Password for the user which has API access. +* `zabbix_api_login_user`: Username of user which has API access. +* `zabbix_api_server_host`: The IP or hostname/FQDN of Zabbix server. Example: zabbix.example.com +* `zabbix_api_server_port`: 80 if `zabbix_api_use_ssl` is `false` and 443 if `true` (Default) TCP port to use to connect to Zabbix server. Example: 8080 +* `zabbix_api_use_ssl`: Is SSL required to connect to the Zabbix API server? Default: `false` +* `zabbix_api_validate_certs`: `True` if we need to validate tls certificates of the API. Use `False` in case self-signed certificates are used. Default: `False` +* `zabbix_host_groups`: A list of hostgroups which this host belongs to. Default: "Linux Servers" +* `zabbix_host_status`: enabled (Default) when host in monitored, disabled when host is disabled for monitoring. +* `zabbix_useuip`: 1 if connection to zabbix-agent is made via ip, 0 for fqdn. ## Windows Variables **NOTE** -_Supporting Windows is a best effort (We don't have the possibility to either test/verify changes on the various amount of available Windows instances). PRs specific to Windows will almost immediately be merged, unless someone is able to provide a Windows test mechanism via Travis for Pull Requests._ -When `(2)` is used in the name of the property, like `zabbix_agent(2)_win_logfile`, it will show that you can configure `zabbix_agent_win_logfile` for the Zabbix Agent configuration file and `zabbix_agent2_win_logfile` for the Zabbix Agent 2 configuration file. +Supporting Windows is a best effort (We don't have the possibility to either test/verify changes on the various amount of available Windows instances). PRs specific to Windows will almost immediately be merged, unless someone is able to provide a Windows test mechanism via Travis for Pull Requests._ +When `` is used in the name of the property, like `zabbix_agent_win_logfile`, it will show that you can configure `zabbix_agent_win_logfile` for the Zabbix Agent configuration file and `zabbix_agent2_win_logfile` for the Zabbix Agent 2 configuration file. Otherwise it just for the Zabbix Agent or for the Zabbix Agent 2. -* `zabbix(2)_win_package`: file name pattern (zip only). This will be used to generate the `zabbix(2)_win_download_link` variable. -* `zabbix_version_long`: The long (major.minor.patch) version of the Zabbix Agent. This will be used to generate the `zabbix(2)_win_package` and `zabbix(2)_win_download_link` variables. This takes precedence over `zabbix_agent_version`. -* `zabbix(2)_win_download_link`: The download url to the `win.zip` file. +* `zabbix_agent_win_include`: The directory in which the Zabbix Agent specific configuration files are stored. +* `zabbix_agent_win_logfile`: The full path to the logfile for the Zabbix Agent. +* `zabbix_version_long`: The long (major.minor.patch) version of the Zabbix Agent. This will be used to generate the `zabbix_win_package` and `zabbix_win_download_link` variables. This takes precedence over `zabbix_agent_version`. +* `zabbix_win_download_link`: The download url to the `win.zip` file. +* `zabbix_win_firewall_management`: Enable Windows firewall management (add service and port to allow rules). Default: `True` * `zabbix_win_install_dir`: The directory where Zabbix needs to be installed. * `zabbix_win_install_dir_conf`: The directory where Zabbix configuration file needs to be installed. * `zabbix_win_install_dir_bin`: The directory where Zabbix binary file needs to be installed. -* `zabbix_agent(2)_win_logfile`: The full path to the logfile for the Zabbix Agent. -* `zabbix_agent_win_include`: The directory in which the Zabbix Agent specific configuration files are stored. -* `zabbix_agent_win_svc_recovery`: Enable Zabbix Agent service auto-recovery settings. -* `zabbix_win_firewall_management`: Enable Windows firewall management (add service and port to allow rules). Default: `True` +* `zabbix_win_package`: file name pattern (zip only). This will be used to generate the `zabbix_win_download_link` variable. ## macOS Variables @@ -302,8 +234,10 @@ Otherwise it just for the Zabbix Agent or for the Zabbix Agent 2. _Supporting Windows is a best effort (We don't have the possibility to either test/verify changes on the various amount of available Windows instances). PRs specific to Windows will almost immediately be merged, unless someone is able to provide a Windows test mechanism via Travis for Pull Requests._ -* `zabbix_version_long`: The long (major.minor.patch) version of the Zabbix Agent. This will be used to generate the `zabbix_mac_download_link` link. * `zabbix_mac_download_link`: The download url to the `pkg` file. +* `zabbix_mac_download_url`: The download url. Default `https://cdn.zabbix.com/zabbix/binaries/stable` +* `zabbix_mac_package`: The name of the mac install package. Default `zabbix_agent-{{ zabbix_version_long }}-macos-amd64-openssl.pkg` +* `zabbix_version_long`: The long (major.minor.patch) version of the Zabbix Agent. This will be used to generate the `zabbix_mac_download_link` link. ## Docker Variables @@ -324,19 +258,19 @@ The following directories are mounted in the Container: Keep in mind that using the Zabbix Agent in a Container requires changes to the Zabbix Template for Linux as `/proc`, `/sys` and `/etc` are mounted in a directory `/hostfs`. * `zabbix_agent_docker`: Default: `False`. When set to `True`, it will install a Docker container on the target host instead of installation on the target. -* `zabbix_agent_docker_state`: Default: `started` -* `zabbix_agent_docker_name`: The name of the Container. Default: `zabbix-agent` +* `zabbix_agent_docker_env`: A dict with all environment variables that needs to be set for the Container. * `zabbix_agent_docker_image`: The name of the Docker image. Default: `zabbix/zabbix-agent` * `zabbix_agent_docker_image_tag`: The tag of the Docker image. -* `zabbix_agent_docker_user_gid`: The group id of the zabbix user in the Container. -* `zabbix_agent_docker_user_uid`: The user id of the zabbix user in the Container. +* `zabbix_agent_docker_name`: The name of the Container. Default: `zabbix-agent` * `zabbix_agent_docker_network_mode`: The name of the (Docker) network that should be used for the Container. Default `host`. * `zabbix_agent_docker_restart_policy`: Default: `unless-stopped`. The restart policy of the Container. -* `zabbix_agent_docker_privileged`: When set to `True`, the container is running in privileged mode. -* `zabbix_agent_docker_ports`: A list with `<PORT>:<PORT>` values to open ports to the container. +* `zabbix_agent_docker_ports`: A list with `<PORT>:<PORT>` values to open ports to the container. Default `10050` +* `zabbix_agent_docker_privileged`: When set to `True`, the container is running in privileged mode. Default `false` * `zabbix_agent_docker_security_opts`: A list with available security options. +* `zabbix_agent_docker_state`: Default: `started` +* `zabbix_agent_docker_user_gid`: The group id of the zabbix user in the Container. +* `zabbix_agent_docker_user_uid`: The user id of the zabbix user in the Container. * `zabbix_agent_docker_volumes`: A list with all directories that needs to be available in the Container. -* `zabbix_agent_docker_env`: A dict with all environment variables that needs to be set for the Container. ## IPMI variables @@ -345,6 +279,77 @@ Keep in mind that using the Zabbix Agent in a Container requires changes to the * `zabbix_agent_ipmi_privilege`: IPMI privilege level. Possible values are 1 (callback), 2 (user), 3 (operator), 4 (admin), 5 (OEM), with 2 being the API default. * `zabbix_agent_ipmi_username`: IPMI username. +## Configuration Variables +The following table lists all variables that are exposed to modify the configuration of the zabbix_agent.conf file. Specific details of each variable can be found in the Zabbix documentation. + +**NOTE**: Only variables with a default value appear in the defaults file, all others must be added. + +| Zabbix Name | Variable Name | Default Value | Notes | +|-----------|------------------|--------|--------| +| Alias | zabbix_agent_aliases | | Can be a string or list | +| AllowKey | zabbix_agent_allowkeys | | | +| AllowRoot | zabbix_agent_allowroot | | Linux Systems Only | +| BufferSend | zabbix_agent_buffersend | 5 | | +| BufferSize | zabbix_agent_buffersize | 100 | | +| ControlSocket | zabbix_agent_controlsocket | /tmp/agent.sock | Agent 2 Only | +| DebugLevel | zabbix_agent_debuglevel | 3 | | +| DenyKey | zabbix_agent_denykeys | | Can be a string or a list | +| EnableRemoteCommands | zabbix_agent_enableremotecommands | 0 | Agent Only | +| ForceActiveChecksOnStart | zabbix_agent_forceactivechecksonstart | | Agent 2 Only | +| HeartbeatFrequency | zabbix_agent_heartbeatfrequency | 60 | Version >= 6.2 | +| HostInterface | zabbix_agent_hostinterface | | | +| HostInterfaceItem | zabbix_agent_hostinterfaceitem | | | +| HostMetadata | zabbix_agent_hostmetadata | | | +| HostMetadataItem | zabbix_agent_hostmetadataitem | | | +| Hostname | zabbix_agent_hostname | | `{{ inventory_hostname }}` | +| HostnameItem | zabbix_agent_hostnameitem | | | +| Include | zabbix_agent_include | /etc/zabbix/`{ agent version specific }`.d | | +| ListenBacklog | zabbix_agent_listenbacklog | | Agent Only | +| ListenIP | zabbix_agent_listenip | | list of IPs | +| ListenPort | zabbix_agent_listenport | 10050 | | +| LoadModule | zabbix_agent_loadmodule | | Agent On Linux Only | +| LoadModulePath | zabbix_agent_loadmodulepath | | Agent On Linux Only | +| LogFile | zabbix_agent_logfile | /var/log/zabbix/`{ agent version specific }`.log | | +| LogFileSize | zabbix_agent_logfilesize | 100 | | +| LogRemoteCommands | zabbix_agent_logremotecommands | | Agent Only | +| LogType | zabbix_agent_logtype | file | | +| MaxLinesPerSecond | zabbix_agent_maxlinespersecond | | Agent Only | +| PerfCounter | zabbix_agent_perfcounter | | Agent Only | +| PerfCounterEn | zabbix_agent_perfcounteren | | Agent Only | +| PersistentBufferFile | zabbix_agent_persistentbufferfile | | Agent 2 Only | +| PersistentBufferPeriod | zabbix_agent_persistentbufferperiod | 1h | Agent 2 Only | +| PidFile | zabbix_agent_pidfile | /var/run/zabbix/`{ agent version specific }`.pid | Linux Systems Only | +| Plugin | zabbix_agent_plugins | | | +| PluginSocket | zabbix_agent_pluginsocket | | | +| PluginTimeout | zabbix_agent_plugintimeout | | | +| RefreshActiveChecks | zabbix_agent_refreshactivechecks | 120 | | +| Server | zabbix_agent_server | | | +| ServerActive | zabbix_agent_serveractive | | | +| SourceIP | zabbix_agent_sourceip | | | +| StartAgents | zabbix_agent_startagents | | Agent Only | +| StatusPort | zabbix_agent_statusport | 9999 | Agent 2 Only | +| Timeout | zabbix_agent_timeout | 3 | | +| TLSAccept | zabbix_agent_tlsconnect | | | +| TLSCAFile | zabbix_agent_tlscafile | /etc/zabbix/tls_psk_auto.secret | | +| TLSCertFile | zabbix_agent_tlscertfile | | | +| TLSCipherAll | zabbix_agent_tlscipherall | | Agent on Linux Only | +| TLSCipherAll13 | zabbix_agent_tlscipherall13 | | Agent on Linux Only | +| TLSCipherCert | zabbix_agent_tlsciphercert | | Agent on Linux Only | +| TLSCipherCert13 | zabbix_agent_tlsciphercert13 | | Agent on Linux Only | +| TLSCipherPSK | zabbix_agent_tlscipherpsk | | Agent on Linux Only | +| TLSCipherPSK13 | zabbix_agent_tlscipherpsk13 | | Agent on Linux Only | +| TLSConnect | zabbix_agent_tlsconnect | | | +| TLSCRLFile | zabbix_agent_tlscrlfile | | | +| TLSKeyFile | zabbix_agent_tlskeyfile | | | +| TLSPSKFile | zabbix_agent_tlspskfile | | | +| TLSPSKIdentity | zabbix_agent_tlspskidentity | | | +| TLSServerCertIssuer | zabbix_agent_tlsservercertissuer | | | +| TLSServerCertSubject | zabbix_agent_tlsservercertsubject | | | +| UnsafeUserParameters | zabbix_agent_unsafeuserparameters | | | +| User | zabbix_agent_runas_user | | Agent on Linux Only | +| UserParameter | zabbix_agent_userparamater | 0 | | + + ## proxy When the target host does not have access to the internet, but you do have a proxy available then the following properties needs to be set to download the packages via the proxy: @@ -369,18 +374,6 @@ There are no dependencies on other roles. # Example Playbook -## zabbix_agent2_plugins - -Specifically for the Zabbix Agent 2, a list of extra plugins can be configured. The following provides an overview of configuring the `SystemRun` plugin by setting the `LogRemoteCommands` to `0`: - -```yaml -zabbix_agent2_plugins: - - name: SystemRun - options: - - parameter: LogRemoteCommands - value: 0 -``` - In the `zabbix_agent2.conf` an entry will be created with the following content: ``` diff --git a/ansible_collections/community/zabbix/docs/ZABBIX_JAVAGATEWAY_ROLE.md b/ansible_collections/community/zabbix/docs/ZABBIX_JAVAGATEWAY_ROLE.md index 47092a6a0..0de7af814 100644 --- a/ansible_collections/community/zabbix/docs/ZABBIX_JAVAGATEWAY_ROLE.md +++ b/ansible_collections/community/zabbix/docs/ZABBIX_JAVAGATEWAY_ROLE.md @@ -39,6 +39,7 @@ See the following list of supported Operating systems with the Zabbix releases. | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | | Red Hat Fam 7 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | V | V | V | diff --git a/ansible_collections/community/zabbix/docs/ZABBIX_PROXY_ROLE.md b/ansible_collections/community/zabbix/docs/ZABBIX_PROXY_ROLE.md index ee558c8b7..703ec6059 100644 --- a/ansible_collections/community/zabbix/docs/ZABBIX_PROXY_ROLE.md +++ b/ansible_collections/community/zabbix/docs/ZABBIX_PROXY_ROLE.md @@ -82,6 +82,7 @@ See the following list of supported Operating systems with the Zabbix releases. | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | | Red Hat Fam 7 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | V | V | V | diff --git a/ansible_collections/community/zabbix/docs/ZABBIX_SERVER_ROLE.md b/ansible_collections/community/zabbix/docs/ZABBIX_SERVER_ROLE.md index 9557281c3..20f462c48 100644 --- a/ansible_collections/community/zabbix/docs/ZABBIX_SERVER_ROLE.md +++ b/ansible_collections/community/zabbix/docs/ZABBIX_SERVER_ROLE.md @@ -79,6 +79,7 @@ See the following list of supported Operating systems with the Zabbix releases: |---------------------|-----|-----|-----| | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | | | V | diff --git a/ansible_collections/community/zabbix/docs/ZABBIX_WEB_ROLE.md b/ansible_collections/community/zabbix/docs/ZABBIX_WEB_ROLE.md index aac6f9dc2..c1875f208 100644 --- a/ansible_collections/community/zabbix/docs/ZABBIX_WEB_ROLE.md +++ b/ansible_collections/community/zabbix/docs/ZABBIX_WEB_ROLE.md @@ -59,6 +59,7 @@ See the following list of supported Operating Systems with the Zabbix releases. |---------------------|-----|-----|-----| | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | | | V | diff --git a/ansible_collections/community/zabbix/molecule/requirements.txt b/ansible_collections/community/zabbix/molecule/requirements.txt index 9ccb5e157..814a46a91 100644 --- a/ansible_collections/community/zabbix/molecule/requirements.txt +++ b/ansible_collections/community/zabbix/molecule/requirements.txt @@ -1,7 +1,7 @@ # Install CI dependencies for the Zabbix Roles -ansible==7.0.0 +#ansible==8.0.0 # commented out to avoid installing collections in site-packages/ansible_collections ansible-compat==3.0.0 -ansible-core==2.14.2 +ansible-core==2.15.11 docker==6.1.3 molecule<5 molecule-docker @ git+https://github.com/ansible-community/molecule-docker@main diff --git a/ansible_collections/community/zabbix/molecule/zabbix_agent_tests/common/molecule.yml b/ansible_collections/community/zabbix/molecule/zabbix_agent_tests/common/molecule.yml index a48b6ae60..4666f0192 100644 --- a/ansible_collections/community/zabbix/molecule/zabbix_agent_tests/common/molecule.yml +++ b/ansible_collections/community/zabbix/molecule/zabbix_agent_tests/common/molecule.yml @@ -28,8 +28,6 @@ provisioner: inventory: group_vars: all: - zabbix_agent_src_reinstall: false - zabbix_install_pip_packages: false zabbix_agent_server: 192.168.3.33 zabbix_agent_serveractive: 192.168.3.33 zabbix_agent_listenip: 0.0.0.0 diff --git a/ansible_collections/community/zabbix/molecule/zabbix_agent_tests/molecule/agent2/molecule.yml b/ansible_collections/community/zabbix/molecule/zabbix_agent_tests/molecule/agent2/molecule.yml index 76edc902e..3d28d94c9 100644 --- a/ansible_collections/community/zabbix/molecule/zabbix_agent_tests/molecule/agent2/molecule.yml +++ b/ansible_collections/community/zabbix/molecule/zabbix_agent_tests/molecule/agent2/molecule.yml @@ -9,6 +9,7 @@ provisioner: zabbix_agent2: true zabbix_agent2_tlsconnect: psk zabbix_agent2_tlsaccept: psk + zabbix_agent2_tlspsk_auto: True zabbix_agent2_tlspskidentity: my_Identity zabbix_agent2_tlspskfile: /data/certs/zabbix.psk zabbix_agent2_tlspsk_secret: 97defd6bd126d5ba7fa5f296595f82eac905d5eda270207a580ab7c0cb9e8eab @@ -16,4 +17,4 @@ provisioner: - name: SystemRun options: - parameter: LogRemoteCommands - value: 0
\ No newline at end of file + value: 0 diff --git a/ansible_collections/community/zabbix/molecule/zabbix_proxy/Dockerfile.debian.j2 b/ansible_collections/community/zabbix/molecule/zabbix_proxy/Dockerfile.debian.j2 new file mode 100644 index 000000000..b3d90f2a5 --- /dev/null +++ b/ansible_collections/community/zabbix/molecule/zabbix_proxy/Dockerfile.debian.j2 @@ -0,0 +1,3 @@ +FROM {{ item.base_image }} +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip systemd-sysv +CMD ["/sbin/init"] diff --git a/ansible_collections/community/zabbix/molecule/zabbix_proxy/Dockerfile.redhat.j2 b/ansible_collections/community/zabbix/molecule/zabbix_proxy/Dockerfile.redhat.j2 new file mode 100644 index 000000000..dd48ee3b7 --- /dev/null +++ b/ansible_collections/community/zabbix/molecule/zabbix_proxy/Dockerfile.redhat.j2 @@ -0,0 +1,3 @@ +FROM {{ item.base_image }} +RUN yum install -y python3-pip +CMD ["/sbin/init"] diff --git a/ansible_collections/community/zabbix/molecule/zabbix_proxy/molecule.yml b/ansible_collections/community/zabbix/molecule/zabbix_proxy/molecule.yml index 4eadd60ab..0002a0a49 100644 --- a/ansible_collections/community/zabbix/molecule/zabbix_proxy/molecule.yml +++ b/ansible_collections/community/zabbix/molecule/zabbix_proxy/molecule.yml @@ -3,10 +3,11 @@ driver: name: docker platforms: - name: zabbix-proxy-${MY_MOLECULE_VERSION:-v64}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8} - image: geerlingguy/docker-${MY_MOLECULE_IMAGE:-rockylinux8}-ansible:latest + dockerfile: Dockerfile.${MY_MOLECULE_OS_FAMILY:-redhat}.j2 + base_image: ${MY_MOLECULE_IMAGE:-rockylinux/rockylinux:8-ubi-init} + image: ${MY_MOLECULE_CONTAINER:-rockylinux8} privileged: true - pre_build_image: true - command: ${MOLECULE_DOCKER_COMMAND:-""} + command: /sbin/init networks: - name: zabbix volumes: @@ -22,10 +23,8 @@ provisioner: ANSIBLE_ROLES_PATH: $HOME/.ansible/collections/ansible_collections/community/zabbix/roles inventory: group_vars: - python3: + all: ansible_python_interpreter: /usr/bin/python3 - python: - ansible_python_interpreter: /usr/bin/python v64: zabbix_proxy_version: 6.4 v62: diff --git a/ansible_collections/community/zabbix/molecule/zabbix_proxy/prepare.yml b/ansible_collections/community/zabbix/molecule/zabbix_proxy/prepare.yml index 1ff492d62..5a3c3139f 100644 --- a/ansible_collections/community/zabbix/molecule/zabbix_proxy/prepare.yml +++ b/ansible_collections/community/zabbix/molecule/zabbix_proxy/prepare.yml @@ -95,19 +95,3 @@ dest: /etc/sudoers line: "Defaults !requiretty" state: present - - - name: "Make sure the docs can be installed. (RedHat)" - ansible.builtin.lineinfile: - dest: /etc/yum.conf - line: "tsflags=nodocs" - state: absent - when: - - ansible_os_family == 'RedHat' - - - name: "Make sure the docs can be installed. (Debian)" - ansible.builtin.lineinfile: - path: /etc/dpkg/dpkg.cfg.d/excludes - state: absent - regexp: "path-exclude=/usr/share/doc/*" - when: - - ansible_os_family != 'RedHat' diff --git a/ansible_collections/community/zabbix/molecule/zabbix_server/molecule.yml b/ansible_collections/community/zabbix/molecule/zabbix_server/molecule.yml index 52df5ac4e..4638adfe2 100644 --- a/ansible_collections/community/zabbix/molecule/zabbix_server/molecule.yml +++ b/ansible_collections/community/zabbix/molecule/zabbix_server/molecule.yml @@ -14,7 +14,6 @@ platforms: groups: - ${MY_MOLECULE_DATABASE:-mysql} - ${MY_MOLECULE_VERSION:-v64} - - ${MY_MOLECULE_INTERPRETER:-python3} provisioner: name: ansible @@ -23,23 +22,18 @@ provisioner: ANSIBLE_ROLES_PATH: $HOME/.ansible/collections/ansible_collections/community/zabbix/roles inventory: group_vars: - python3: + all: ansible_python_interpreter: /usr/bin/python3 - python: - ansible_python_interpreter: /usr/bin/python v64: zabbix_server_version: 6.4 v62: zabbix_server_version: 6.2 v60: zabbix_server_version: 6.0 - v50: - zabbix_server_version: 5.0 mysql: zabbix_server_dbname: zabbix zabbix_server_dbuser: zabbix-dbuser zabbix_server_database: mysql - zabbix_server_dbport: 3306 zabbix_server_dbhost: "{{ inventory_hostname }}-db" zabbix_server_dbhost_run_install: false zabbix_server_privileged_host: "%" @@ -49,7 +43,6 @@ provisioner: zabbix_server_mysql_login_port: 3306 pgsql: zabbix_server_database: pgsql - zabbix_server_dbport: 5432 zabbix_server_dbhost: "{{ inventory_hostname }}-db" zabbix_server_dbhost_run_install: false zabbix_server_pgsql_login_host: "{{ inventory_hostname }}-db" diff --git a/ansible_collections/community/zabbix/molecule/zabbix_web/prepare.yml b/ansible_collections/community/zabbix/molecule/zabbix_web/prepare.yml index d3dcc1ad0..7d8142763 100644 --- a/ansible_collections/community/zabbix/molecule/zabbix_web/prepare.yml +++ b/ansible_collections/community/zabbix/molecule/zabbix_web/prepare.yml @@ -83,7 +83,7 @@ when: ansible_version.full is version("2.14", "<") - name: "Apt update" - ansible.builtin.shell: "apt-get update && echo exit 0 > /usr/sbin/policy-rc.d" + ansible.builtin.shell: "apt-get update" args: warn: "{{ produce_warn | default(omit) }}" register: installation_dependencies @@ -162,7 +162,14 @@ - ansible_distribution_major_version >= '22' - ansible_os_family == "Debian" - - name: Set PHP packages (Ubuntu 2204) + - name: Set PHP Version (Ubuntu 2404) + ansible.builtin.set_fact: + __php_default_version_debian: "8.3" + when: + - ansible_distribution_major_version >= '24' + - ansible_os_family == "Debian" + + - name: Set PHP packages (Ubuntu 2204 & 2404) ansible.builtin.set_fact: __php_packages: - php{{ __php_default_version_debian }}-common diff --git a/ansible_collections/community/zabbix/plugins/modules/zabbix_discoveryrule.py b/ansible_collections/community/zabbix/plugins/modules/zabbix_discoveryrule.py new file mode 100644 index 000000000..725fd43e3 --- /dev/null +++ b/ansible_collections/community/zabbix/plugins/modules/zabbix_discoveryrule.py @@ -0,0 +1,460 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = r''' +--- +module: zabbix_discoveryrule +short_description: Create/delete Zabbix discovery rules +description: + - Create discoveryrules if they do not exist. + - Delete existing discoveryrules if they exist. +author: + - "Andrew Lathrop (@aplathrop)" +requirements: + - "python >= 2.6" + +options: + state: + description: + - Create or delete discovery rule. + required: false + type: str + default: "present" + choices: [ "present", "absent" ] + name: + description: + - Name of discovery rule to create or delete. + required: true + type: str + host_name: + description: + - Name of host to add discovery rule to. + - Required when I(template_name) is not used. + - Mutually exclusive with I(template_name). + required: false + type: str + template_name: + description: + - Name of template to add discovery rule to. + - Required when I(host_name) is not used. + - Mutually exclusive with I(host_name). + required: false + type: str + params: + description: + - Parameters to create/update discovery rule with. + - Required if state is "present". + - Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/discoveryrule/object + - Additionally supported parameters are below + required: false + type: dict + suboptions: + key: + description: + - LLD rule key. + - Alias for "key_" in API docs + required: false + type: str + interval: + description: + - Update interval of the LLD rule. + - Alias for "delay" in API docs + required: false + type: str + status: + description: + - Status of the LLD rule. + required: false + type: str + choices: [ "enabled", "disabled" ] + enabled: + description: + - Status of the LLD rule. + - Overrides "status" in API docs + required: false + type: bool + type: + description: + - Type of the LLD rule. + - Required if state is "present". + required: false + type: str + choices: + - zabbix_agent + - zabbix_trapper + - simple_check + - zabbix_internal + - zabbix_agent_active + - web_item + - external_check + - database_monitor + - ipmi_agent + - ssh_agent + - telnet_agent + - calculated + - jmx_agent + - snmp_trap + - dependent_item + - http_agent + - snmp_agent + - script + preprocessing: + description: + - discovery rules preprocessing options. + - Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/discoveryrule/object#lld-rule-preprocessing + - Additionally supported parameters are below + required: false + type: list + elements: dict + suboptions: + type: + description: + - The preprocessing option type. + required: true + type: str + choices: + - xml_xpath + - jsonpath + - does_not_match_regular_expression + - not_match_regex + - check_for_error_in_json + - check_for_json_error + - check_for_error_in_xml + - check_for_xml_error + - discard_unchanged_with_heartbeat + - javascript + - prometheus_to_json + - csv_to_json + - replace + - xml_to_json + - snmp_walk_value + - snmp_walk_to_json + error_handler: + description: + - Action type used in case of preprocessing step failure. + required: false + type: str + choices: + - zabbix_server + - discard + - set_custom_value + - set_custom_error_message + +extends_documentation_fragment: +- community.zabbix.zabbix +''' + +EXAMPLES = r''' + +# If you want to use Username and Password to be authenticated by Zabbix Server +- name: Set credentials to access Zabbix Server API + ansible.builtin.set_fact: + ansible_user: Admin + ansible_httpapi_pass: zabbix + +# If you want to use API token to be authenticated by Zabbix Server +# https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/administration/general#api-tokens +- name: Set API token + ansible.builtin.set_fact: + ansible_zabbix_auth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895 + +# Create LLD rule on example_host +- name: create rule + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_discoveryrule: + name: mounted_filesystem_discovery + host_name: example_host + params: + type: zabbix_agent + key: 'vfs.fs.discovery' + interval: 1h + enabled: True + state: present + +# Create LLD rule on example_template +- name: create rule + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_discoveryrule: + name: mounted_filesystem_discovery + template_name: example_template + params: + type: zabbix_agent + key: 'vfs.fs.discovery' + interval: 1h + enabled: True + state: present + +# Add tags to the existing Zabbix LLD rule +- name: update rule + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_discoveryrule: + name: mounted_filesystem_discovery + template_name: example_template + params: + type: zabbix_agent + key: 'vfs.fs.discovery' + interval: 1h + enabled: True + tags: + - tag: class + value: application + state: present + +# Delete LLD rule +- name: delete rule + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_discoveryrule: + name: mounted_filesystem_discovery + template_name: example_template + state: absent +''' + +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.community.zabbix.plugins.module_utils.base import ZabbixBase +import ansible_collections.community.zabbix.plugins.module_utils.helpers as zabbix_utils + + +class Discoveryrule(ZabbixBase): + ITEM_TYPES = {'zabbix_agent': 0, + 'zabbix_trapper': 2, + 'simple_check': 3, + 'zabbix_internal': 5, + 'zabbix_agent_active': 7, + 'web_item': 9, + 'external_check': 10, + 'database_monitor': 11, + 'ipmi_agent': 12, + 'ssh_agent': 13, + 'telnet_agent': 14, + 'calculated': 15, + 'jmx_agent': 16, + 'snmp_trap': 17, + 'dependent_item': 18, + 'http_agent': 19, + 'snmp_agent': 20, + 'script': 21} + + PREPROCESSING_TYPES = {'regex': 5, + 'xml_xpath': 11, + 'jsonpath': 12, + 'does_not_match_regular_expression': 15, + 'not_match_regex': 15, + 'check_for_error_in_json': 16, + 'check_for_json_error': 16, + 'check_for_error_in_xml': 17, + 'check_for_xml_error': 17, + 'discard_unchanged_with_heartbeat': 20, + 'javascript': 21, + 'prometheus_to_json': 23, + 'csv_to_json': 24, + 'replace': 25, + 'xml_to_json': 27, + 'snmp_walk_value': 28, + 'snmp_walk_to_json': 29} + + PREPROCESSING_ERROR_HANDLERS = {'zabbix_server': 0, + 'discard': 1, + 'set_custom_value': 2, + 'set_custom_error_message': 3} + + def get_hosts_templates(self, host_name, template_name): + if host_name is not None: + try: + return self._zapi.host.get({"filter": {"host": host_name}}) + except Exception as e: + self._module.fail_json(msg="Failed to get host: %s" % e) + else: + try: + return self._zapi.template.get({"filter": {"host": template_name}}) + except Exception as e: + self._module.fail_json(msg="Failed to get template: %s" % e) + + def get_discoveryrules(self, discoveryrule_name, host_name, template_name): + if host_name is not None: + host = host_name + else: + host = template_name + discoveryrules = [] + try: + discoveryrules = self._zapi.discoveryrule.get({'filter': {'name': discoveryrule_name, 'host': host}}) + except Exception as e: + self._module.fail_json(msg="Failed to get discovery rules: %s" % e) + return discoveryrules + + def sanitize_params(self, name, params): + params['name'] = name + if 'key' in params: + params['key_'] = params['key'] + params.pop("key") + if 'type' in params: + item_type_int = self.ITEM_TYPES[params['type']] + params['type'] = item_type_int + if 'interval' in params: + params['delay'] = params['interval'] + params.pop("interval") + if 'enabled' in params: + if params['enabled']: + params['status'] = 'enabled' + else: + params['status'] = 'disabled' + params.pop("enabled") + if 'status' in params: + status = params['status'] + if status == 'enabled': + params['status'] = 0 + elif status == 'disabled': + params['status'] = 1 + else: + self._module.fail_json(msg="Status must be 'enabled' or 'disabled', got %s" % status) + if 'preprocessing' in params: + for param in params['preprocessing']: + preprocess_type_int = self.PREPROCESSING_TYPES[param['type']] + param['type'] = preprocess_type_int + if 'error_handler' in param: + error_handler_int = self.PREPROCESSING_ERROR_HANDLERS[param['error_handler']] + param['error_handler'] = error_handler_int + + def add_discoveryrule(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.discoveryrule.create(params) + except Exception as e: + self._module.fail_json(msg="Failed to create discoveryrule: %s" % e) + return results + + def update_discoveryrule(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.discoveryrule.update(params) + except Exception as e: + self._module.fail_json(msg="Failed to update discoveryrule: %s" % e) + return results + + def check_discoveryrule_changed(self, old_discoveryrule): + try: + new_discoveryrule = self._zapi.discoveryrule.get({'itemids': "%s" % old_discoveryrule['itemid']})[0] + except Exception as e: + self._module.fail_json(msg="Failed to get discoveryrule: %s" % e) + return old_discoveryrule != new_discoveryrule + + def delete_discoveryrule(self, discoveryrule_id): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.discoveryrule.delete(discoveryrule_id) + except Exception as e: + self._module.fail_json(msg="Failed to delete discoveryrule: %s" % e) + return results + + +def main(): + argument_spec = zabbix_utils.zabbix_common_argument_spec() + argument_spec.update(dict( + name=dict(type='str', required=True), + host_name=dict(type='str', required=False), + template_name=dict(type='str', required=False), + params=dict(type='dict', required=False), + state=dict(type='str', default="present", choices=['present', 'absent']), + )) + module = AnsibleModule( + argument_spec=argument_spec, + required_one_of=[ + ['host_name', 'template_name'] + ], + mutually_exclusive=[ + ['host_name', 'template_name'] + ], + required_if=[ + ['state', 'present', ['params']] + ], + supports_check_mode=True + ) + + name = module.params['name'] + host_name = module.params['host_name'] + template_name = module.params['template_name'] + params = module.params['params'] + state = module.params['state'] + + discoveryrule = Discoveryrule(module) + + if state == "absent": + discoveryrules = discoveryrule.get_discoveryrules(name, host_name, template_name) + if len(discoveryrules) == 0: + module.exit_json(changed=False, result="No discoveryrule to delete.") + else: + delete_ids = [] + for d in discoveryrules: + delete_ids.append(d['itemid']) + results = discoveryrule.delete_discoveryrule(delete_ids) + module.exit_json(changed=True, result=results) + + elif state == "present": + discoveryrule.sanitize_params(name, params) + discoveryrules = discoveryrule.get_discoveryrules(name, host_name, template_name) + results = [] + if len(discoveryrules) == 0: + hosts_templates = discoveryrule.get_hosts_templates(host_name, template_name) + for host_template in hosts_templates: + if 'hostid' in host_template: + params['hostid'] = host_template['hostid'] + elif 'templateid' in host_template: + params['hostid'] = host_template['templateid'] + else: + module.fail_json(msg="host/template did not return id") + results.append(discoveryrule.add_discoveryrule(params)) + module.exit_json(changed=True, result=results) + else: + changed = False + for d in discoveryrules: + params['itemid'] = d['itemid'] + results.append(discoveryrule.update_discoveryrule(params)) + changed_rule = discoveryrule.check_discoveryrule_changed(d) + if changed_rule: + changed = True + module.exit_json(changed=changed, result=results) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/community/zabbix/plugins/modules/zabbix_host_events_update.py b/ansible_collections/community/zabbix/plugins/modules/zabbix_host_events_update.py new file mode 100644 index 000000000..ec0025467 --- /dev/null +++ b/ansible_collections/community/zabbix/plugins/modules/zabbix_host_events_update.py @@ -0,0 +1,244 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = r''' +--- +module: zabbix_host_events_update +short_description: update the status of event(s). +description: + - Updates the status of event(s). +author: + - "Andrew Lathrop (@aplathrop)" +requirements: + - "python >= 2.6" + +options: + params: + description: + - Parameters to update event(s) with. + - Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/event/acknowledge + - Additionally supported parameters are below + required: true + type: dict + suboptions: + action: + description: + - action to update the event with + - Overrides "action" in API docs + - Required when I(actions) is not used. + - Mutually exclusive with I(actions). + required: false + type: str + choices: + - close_problem + - close + - acknowledge_event + - acknowledge + - ack + - add_message + - message + - msg + - change_severity + - severity + - unacknowledge_event + - unacknowledge + - unack + - suppress_event + - suppress + - unsuppress_event + - unsuppress + - change_event_rank_to_cause + - convert_to_cause + - change_event_rank_to_symptom + - convert_to_symptom + actions: + description: + - actions to update the event with + - Overrides "action" in API docs + - Required when I(action) is not used. + - Mutually exclusive with I(action). + required: false + type: list + elements: str + choices: + - close_problem + - close + - acknowledge_event + - acknowledge + - ack + - add_message + - message + - msg + - change_severity + - severity + - unacknowledge_event + - unacknowledge + - unack + - suppress_event + - suppress + - unsuppress_event + - unsuppress + - change_event_rank_to_cause + - convert_to_cause + - change_event_rank_to_symptom + - convert_to_symptom + severity: + description: + - New severity for events. + - Overrides "severity" in API docs + required: False + type: str + choices: + - not_classified + - information + - warning + - average + - high + - disaster + msg: + description: + - Text of the message. + - Alias for "message" in API docs + required: False + type: str + +extends_documentation_fragment: +- community.zabbix.zabbix +''' + +EXAMPLES = r''' + +# If you want to use Username and Password to be authenticated by Zabbix Server +- name: Set credentials to access Zabbix Server API + ansible.builtin.set_fact: + ansible_user: Admin + ansible_httpapi_pass: zabbix + +# If you want to use API token to be authenticated by Zabbix Server +# https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/administration/general#api-tokens +- name: Set API token + ansible.builtin.set_fact: + ansible_zabbix_auth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895 + +# Acknowledge single event +- name: ack event + community.zabbix.zabbix_host_events_update: + params: + eventids: 12345 + actions: ack + +- name: ack and close event with a message + community.zabbix.zabbix_host_events_update: + params: + eventids: [12345, 67890] + actions: ['ack', 'msg', 'close'] + msg: 'closed by user' + +''' + +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.community.zabbix.plugins.module_utils.base import ZabbixBase +import ansible_collections.community.zabbix.plugins.module_utils.helpers as zabbix_utils + + +class Hosteventsupdate(ZabbixBase): + ACTIONS = {'close_problem': 1, + 'close': 1, + 'acknowledge_event': 2, + 'acknowledge': 2, + 'ack': 2, + 'add_message': 4, + 'message': 4, + 'msg': 4, + 'change_severity': 8, + 'severity': 8, + 'unacknowledge_event': 16, + 'unacknowledge': 16, + 'unack': 16, + 'suppress_event': 32, + 'suppress': 32, + 'unsuppress_event': 64, + 'unsuppress': 64, + 'change_event_rank_to_cause': 128, + 'convert_to_cause': 128, + 'change_event_rank_to_symptom': 256, + 'convert_to_symptom': 256} + + SEVERITY_TYPES = {'not_classified': 0, + 'information': 1, + 'warning': 2, + 'average': 3, + 'high': 4, + 'disaster': 5} + + def get_events(self, eventids): + try: + results = self._zapi.event.get({'eventids': eventids}) + except Exception as e: + self._module.fail_json(msg="Failed to get event: %s" % e) + return results + + def update_event(self, params): + if 'severity' in params: + if params['severity'] not in self.SEVERITY_TYPES: + self._module.fail_json(msg="%s is not a valid severity type" % params['severity']) + severity = self.SEVERITY_TYPES[params['severity']] + params['severity'] = severity + if 'action' in params: + if params['action'] not in self.ACTIONS: + self._module.fail_json(msg="%s is not a valid action" % params['action']) + action_id = self.ACTIONS[params['action']] + elif 'actions' in params: + action_id = 0 + for action in params['actions']: + if action not in self.ACTIONS: + self._module.fail_json(msg="%s is not a valid action" % action) + action_id += self.ACTIONS[action] + params.pop('actions') + else: + self._module.fail_json(msg="params must contain either 'action' or 'actions'") + params['action'] = action_id + if 'msg' in params: + params['message'] = params['msg'] + params.pop('msg') + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.event.acknowledge(params) + except Exception as e: + self._module.fail_json(msg="Failed to update event: %s" % e) + return results + + def check_events_changed(self, eventids, old_events): + new_events = self.get_events(eventids) + return old_events != new_events + + +def main(): + argument_spec = zabbix_utils.zabbix_common_argument_spec() + argument_spec.update( + params=dict(type='dict', required=True)) + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True + ) + + params = module.params['params'] + + hosteventsupdate = Hosteventsupdate(module) + + events = hosteventsupdate.get_events(params['eventids']) + results = hosteventsupdate.update_event(params) + changed = hosteventsupdate.check_events_changed(params['eventids'], events) + module.exit_json(changed=changed, result=results) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/community/zabbix/plugins/modules/zabbix_item.py b/ansible_collections/community/zabbix/plugins/modules/zabbix_item.py new file mode 100644 index 000000000..2d6bb95eb --- /dev/null +++ b/ansible_collections/community/zabbix/plugins/modules/zabbix_item.py @@ -0,0 +1,579 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = r''' +--- +module: zabbix_item +short_description: Create/delete Zabbix items +description: + - Create items if they do not exist. + - Delete existing items if they exist. +author: + - "Andrew Lathrop (@aplathrop)" +requirements: + - "python >= 2.6" + +options: + state: + description: + - Create or delete item. + required: false + type: str + default: "present" + choices: [ "present", "absent" ] + name: + description: + - Name of item to create or delete. + required: true + type: str + host_name: + description: + - Name of host to add item to. + - Required when I(template_name) is not used. + - Mutually exclusive with I(template_name). + required: false + type: str + template_name: + description: + - Name of template to add item to. + - Required when I(host_name) is not used. + - Mutually exclusive with I(host_name). + required: false + type: str + params: + description: + - Parameters to create/update item with. + - Required if state is "present". + - Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/item/object + - Additionally supported parameters are below + required: false + type: dict + suboptions: + key: + description: + - Item key. + - Alias for "key_" in API docs + required: false + type: str + interval: + description: + - Update interval of the item. + - Alias for "delay" in API docs + required: false + type: str + status: + description: + - Status of the item. + required: false + type: str + choices: [ "enabled", "disabled" ] + enabled: + description: + - Status of the item. + - Overrides "status" in API docs + required: false + type: bool + type: + description: + - Type of the item. + - Required if state is "present". + required: false + type: str + choices: + - zabbix_agent + - zabbix_trapper + - simple_check + - zabbix_internal + - zabbix_agent_active + - web_item + - external_check + - database_monitor + - ipmi_agent + - ssh_agent + - telnet_agent + - calculated + - jmx_agent + - snmp_trap + - dependent_item + - http_agent + - snmp_agent + - script + value_type: + description: + - Type of information of the item. + - Required if state is "present". + required: false + type: str + choices: + - numeric_float + - character + - log + - numeric_unsigned + - text + master_item: + description: + - item that is the master of the current one + - Overrides "master_itemid" in API docs + required: false + type: dict + suboptions: + item_name: + description: + - name of the master item + required: true + type: str + host_name: + description: + - name of the host the master item belongs to + - Required when I(template_name) is not used. + - Mutually exclusive with I(template_name). + required: false + template_name: + description: + - name of the template the master item belongs to + - Required when I(host_name) is not used. + - Mutually exclusive with I(host_name). + preprocessing: + description: + - Item preprocessing options. + - Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/item/object#item-preprocessing + - Additionally supported parameters are below + required: false + type: list + elements: dict + suboptions: + type: + description: + - The preprocessing option type. + required: true + type: str + choices: + - custom_multiplier + - right_trim + - left_trim + - trim + - regular_expressions + - regex + - boolean_to_decimal + - octal_to_decimal + - hexadecimal_to_decimal + - simple_change + - change_per_second + - xml_xpath + - jsonpath + - in_range + - matches_regular_expression + - matches_regex + - does_not_match_regular_expression + - not_match_regex + - check_for_error_in_json + - check_for_json_error + - check_for_error_in_xml + - check_for_xml_error + - check_for_error_using_regular_expression + - check_for_error_regex + - discard_unchanged + - discard_unchanged_with_heartbeat + - javascript + - prometheus_pattern + - prometheus_to_json + - csv_to_json + - replace + - check_unsupported + - xml_to_json + - snmp_walk_value + - snmp_walk_to_json + error_handler: + description: + - Action type used in case of preprocessing step failure. + required: false + type: str + choices: + - zabbix_server + - discard + - set_custom_value + - set_custom_error_message + +extends_documentation_fragment: +- community.zabbix.zabbix +''' + +EXAMPLES = r''' + +# If you want to use Username and Password to be authenticated by Zabbix Server +- name: Set credentials to access Zabbix Server API + ansible.builtin.set_fact: + ansible_user: Admin + ansible_httpapi_pass: zabbix + +# If you want to use API token to be authenticated by Zabbix Server +# https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/administration/general#api-tokens +- name: Set API token + ansible.builtin.set_fact: + ansible_zabbix_auth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895 + +# Create ping item on example_host +- name: create ping item + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_item: + name: agent_ping + host_name: example_host + params: + type: zabbix_agent + key: agent.ping + value_type: numeric_unsigned + interval: 1m + state: present + +# Create ping item on example_template +- name: create ping item + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_item: + name: agent_ping + template_name: example_template + params: + type: zabbix_agent + key: agent.ping + value_type: numeric_unsigned + interval: 1m + state: present + +- name: Add tags to the existing Zabbix item + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: "zabbixeu" # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_item: + name: agent_ping + template_name: example_template + params: + type: zabbix_agent + key: agent.ping + value_type: numeric_unsigned + interval: 1m + tags: + - tag: class + value: application + state: present + +- name: create a dependent item + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: "zabbixeu" # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_item: + name: depend_item + host_name: example_host + params: + type: dependent_item + key: vfs.fs.pused + value_type: numeric_float + units: '%' + master_item: + item_name: example_item + host_name: example_host + preprocessing: + - type: jsonpath + params: '$[?(@.fstype == "ext4")]' + error_handler: zabbix_server + - type: jsonpath + params: "$[*].['bytes', 'inodes'].pused.max()" + error_handler: zabbix_server + state: present + +- name: Delete Zabbix item + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: "zabbixeu" # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_item: + name: agent_ping + template_name: example_template + state: absent +''' + +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.community.zabbix.plugins.module_utils.base import ZabbixBase +import ansible_collections.community.zabbix.plugins.module_utils.helpers as zabbix_utils + + +class Item(ZabbixBase): + ITEM_TYPES = {'zabbix_agent': 0, + 'zabbix_trapper': 2, + 'simple_check': 3, + 'zabbix_internal': 5, + 'zabbix_agent_active': 7, + 'web_item': 9, + 'external_check': 10, + 'database_monitor': 11, + 'ipmi_agent': 12, + 'ssh_agent': 13, + 'telnet_agent': 14, + 'calculated': 15, + 'jmx_agent': 16, + 'snmp_trap': 17, + 'dependent_item': 18, + 'http_agent': 19, + 'snmp_agent': 20, + 'script': 21} + + VALUE_TYPES = {'numeric_float': 0, + 'character': 1, + 'log': 2, + 'numeric_unsigned': 3, + 'text': 4} + + PREPROCESSING_TYPES = {'custom_multiplier': 1, + 'right_trim': 2, + 'left_trim': 3, + 'trim': 4, + 'regular_expressions': 5, + 'regex': 5, + 'boolean_to_decimal': 6, + 'octal_to_decimal': 7, + 'hexadecimal_to_decimal': 8, + 'simple_change': 9, + 'change_per_second': 10, + 'xml_xpath': 11, + 'jsonpath': 12, + 'in_range': 13, + 'matches_regular_expression': 14, + 'matches_regex': 14, + 'does_not_match_regular_expression': 15, + 'not_match_regex': 15, + 'check_for_error_in_json': 16, + 'check_for_json_error': 16, + 'check_for_error_in_xml': 17, + 'check_for_xml_error': 17, + 'check_for_error_using_regular_expression': 18, + 'check_for_error_regex': 18, + 'discard_unchanged': 19, + 'discard_unchanged_with_heartbeat': 20, + 'javascript': 21, + 'prometheus_pattern': 22, + 'prometheus_to_json': 23, + 'csv_to_json': 24, + 'replace': 25, + 'check_unsupported': 26, + 'xml_to_json': 27, + 'snmp_walk_value': 28, + 'snmp_walk_to_json': 29} + + PREPROCESSING_ERROR_HANDLERS = {'zabbix_server': 0, + 'discard': 1, + 'set_custom_value': 2, + 'set_custom_error_message': 3} + + def get_hosts_templates(self, host_name, template_name): + if host_name is not None: + try: + return self._zapi.host.get({"filter": {"host": host_name}}) + except Exception as e: + self._module.fail_json(msg="Failed to get host: %s" % e) + else: + try: + return self._zapi.template.get({"filter": {"host": template_name}}) + except Exception as e: + self._module.fail_json(msg="Failed to get template: %s" % e) + + def get_items(self, item_name, host_name, template_name): + if host_name is not None: + host = host_name + else: + host = template_name + items = [] + try: + items = self._zapi.item.get({'filter': {'name': item_name, 'host': host}}) + except Exception as e: + self._module.fail_json(msg="Failed to get item: %s" % e) + return items + + def sanitize_params(self, name, params): + params['name'] = name + if 'key' in params: + params['key_'] = params['key'] + params.pop("key") + if 'type' in params: + item_type_int = self.ITEM_TYPES[params['type']] + params['type'] = item_type_int + if 'value_type' in params: + value_type_int = self.VALUE_TYPES[params['value_type']] + params['value_type'] = value_type_int + if 'interval' in params: + params['delay'] = params['interval'] + params.pop("interval") + if 'enabled' in params: + if params['enabled']: + params['status'] = 'enabled' + else: + params['status'] = 'disabled' + params.pop("enabled") + if 'status' in params: + status = params['status'] + if status == 'enabled': + params['status'] = 0 + elif status == 'disabled': + params['status'] = 1 + else: + self._module.fail_json(msg="Status must be 'enabled' or 'disabled', got %s" % status) + if 'master_item' in params: + if 'host_name' not in params['master_item']: + params['master_item']['host_name'] = None + if 'template_name' not in params['master_item']: + params['master_item']['template_name'] = None + master_items = self.get_items(params['master_item']['item_name'], params['master_item']['host_name'], params['master_item']['template_name']) + if len(master_items) == 0: + self._module.fail_json(msg="No items with the name %s exist to depend on" % params['master_item']['item_name']) + params['master_itemid'] = master_items[0]['itemid'] + params.pop('master_item') + if 'preprocessing' in params: + for param in params['preprocessing']: + preprocess_type_int = self.PREPROCESSING_TYPES[param['type']] + param['type'] = preprocess_type_int + if 'error_handler' in param: + error_handler_int = self.PREPROCESSING_ERROR_HANDLERS[param['error_handler']] + param['error_handler'] = error_handler_int + + def add_item(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.item.create(params) + except Exception as e: + self._module.fail_json(msg="Failed to create item: %s" % e) + return results + + def update_item(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.item.update(params) + except Exception as e: + self._module.fail_json(msg="Failed to update item: %s" % e) + return results + + def check_item_changed(self, old_item): + try: + new_item = self._zapi.item.get({'itemids': "%s" % old_item['itemid']})[0] + except Exception as e: + self._module.fail_json(msg="Failed to get item: %s" % e) + return old_item != new_item + + def delete_item(self, item_id): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.item.delete(item_id) + except Exception as e: + self._module.fail_json(msg="Failed to delete item: %s" % e) + return results + + +def main(): + argument_spec = zabbix_utils.zabbix_common_argument_spec() + argument_spec.update(dict( + name=dict(type='str', required=True), + host_name=dict(type='str', required=False), + template_name=dict(type='str', required=False), + params=dict(type='dict', required=False), + state=dict(type='str', default="present", choices=['present', 'absent']), + )) + module = AnsibleModule( + argument_spec=argument_spec, + required_one_of=[ + ['host_name', 'template_name'] + ], + mutually_exclusive=[ + ['host_name', 'template_name'] + ], + required_if=[ + ['state', 'present', ['params']] + ], + supports_check_mode=True + ) + + name = module.params['name'] + host_name = module.params['host_name'] + template_name = module.params['template_name'] + params = module.params['params'] + state = module.params['state'] + + item = Item(module) + + if state == "absent": + items = item.get_items(name, host_name, template_name) + if len(items) == 0: + module.exit_json(changed=False, result="No item to delete.") + else: + delete_ids = [] + for i in items: + delete_ids.append(i['itemid']) + results = item.delete_item(delete_ids) + module.exit_json(changed=True, result=results) + + elif state == "present": + item.sanitize_params(name, params) + items = item.get_items(name, host_name, template_name) + results = [] + if len(items) == 0: + hosts_templates = item.get_hosts_templates(host_name, template_name) + for host_template in hosts_templates: + if 'hostid' in host_template: + params['hostid'] = host_template['hostid'] + elif 'templateid' in host_template: + params['hostid'] = host_template['templateid'] + else: + module.fail_json(msg="host/template did not return id") + results.append(item.add_item(params)) + module.exit_json(changed=True, result=results) + else: + changed = False + for i in items: + params['itemid'] = i['itemid'] + results.append(item.update_item(params)) + changed_item = item.check_item_changed(i) + if changed_item: + changed = True + module.exit_json(changed=changed, result=results) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/community/zabbix/plugins/modules/zabbix_itemprototype.py b/ansible_collections/community/zabbix/plugins/modules/zabbix_itemprototype.py new file mode 100644 index 000000000..1fe5b9560 --- /dev/null +++ b/ansible_collections/community/zabbix/plugins/modules/zabbix_itemprototype.py @@ -0,0 +1,609 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = r''' +--- +module: zabbix_itemprototype +short_description: Create/delete Zabbix item prototypes +description: + - Create item prototypes if they do not exist. + - Delete existing item prototypes if they exist. +author: + - "Andrew Lathrop (@aplathrop)" +requirements: + - "python >= 2.6" + +options: + state: + description: + - Create or delete item prototype. + required: false + type: str + default: "present" + choices: [ "present", "absent" ] + name: + description: + - Name of item prototype to create or delete. + required: true + type: str + host_name: + description: + - Name of host to add item prototype to. + - Required when I(template_name) is not used. + - Mutually exclusive with I(template_name). + required: false + type: str + template_name: + description: + - Name of template to add item prototype to. + - Required when I(host_name) is not used. + - Mutually exclusive with I(host_name). + required: false + type: str + discoveryrule_name: + description: + - Name of the LLD rule that the item belongs to. + required: true + type: str + params: + description: + - Parameters to create/update item prototype with. + - Required if state is "present". + - Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/itemprototype/object + - Additionally supported parameters are below + required: false + type: dict + suboptions: + key: + description: + - Item prototype key. + - Alias for "key_" in API docs + required: false + type: str + interval: + description: + - Update interval of the item prototype. + - Alias for "delay" in API docs + required: false + type: str + status: + description: + - Status of the item prototype. + required: false + type: str + choices: [ "enabled", "disabled" ] + enabled: + description: + - Status of the item prototype. + - Overrides "status" in API docs + required: false + type: bool + type: + description: + - Type of the item prototype. + - Required if state is "present". + required: false + type: str + choices: + - zabbix_agent + - zabbix_trapper + - simple_check + - zabbix_internal + - zabbix_agent_active + - web_item + - external_check + - database_monitor + - ipmi_agent + - ssh_agent + - telnet_agent + - calculated + - jmx_agent + - snmp_trap + - dependent_item + - http_agent + - snmp_agent + - script + value_type: + description: + - Type of information of the item prototype. + - Required if state is "present". + required: false + type: str + choices: + - numeric_float + - character + - log + - numeric_unsigned + - text + master_item: + description: + - item that is the master of the current one + - Overrides "master_itemid" in API docs + required: false + type: dict + suboptions: + item_name: + description: + - name of the master item + required: true + type: str + discovery_rule: + description: + - name of the discovery rule the master item belongs to + required: true + type: str + host_name: + description: + - name of the host the master item belongs to + - Required when I(template_name) is not used. + - Mutually exclusive with I(template_name). + required: false + template_name: + description: + - name of the template the master item belongs to + - Required when I(host_name) is not used. + - Mutually exclusive with I(host_name). + preprocessing: + description: + - Item preprocessing options. + - Parameters as defined at + - https://www.zabbix.com/documentation/current/en/manual/api/reference/itemprototype/object#item-prototype-preprocessing + - Additionally supported parameters are below + required: false + type: list + elements: dict + suboptions: + type: + description: + - The preprocessing option type. + required: true + type: str + choices: + - custom_multiplier + - right_trim + - left_trim + - trim + - regular_expressions + - regex + - boolean_to_decimal + - octal_to_decimal + - hexadecimal_to_decimal + - simple_change + - change_per_second + - xml_xpath + - jsonpath + - in_range + - matches_regular_expression + - matches_regex + - does_not_match_regular_expression + - not_match_regex + - check_for_error_in_json + - check_for_json_error + - check_for_error_in_xml + - check_for_xml_error + - check_for_error_using_regular_expression + - check_for_error_regex + - discard_unchanged + - discard_unchanged_with_heartbeat + - javascript + - prometheus_pattern + - prometheus_to_json + - csv_to_json + - replace + - check_unsupported + - xml_to_json + - snmp_walk_value + - snmp_walk_to_json + error_handler: + description: + - Action type used in case of preprocessing step failure. + required: false + type: str + choices: + - zabbix_server + - discard + - set_custom_value + - set_custom_error_message + +extends_documentation_fragment: +- community.zabbix.zabbix +''' + +EXAMPLES = r''' + + +# If you want to use Username and Password to be authenticated by Zabbix Server +- name: Set credentials to access Zabbix Server API + ansible.builtin.set_fact: + ansible_user: Admin + ansible_httpapi_pass: zabbix + +# If you want to use API token to be authenticated by Zabbix Server +# https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/administration/general#api-tokens +- name: Set API token + ansible.builtin.set_fact: + ansible_zabbix_auth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895 + +# Create item prototype on example_host using example_rule +- name: create item prototype + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:Used space{% endraw %}' + discoveryrule_name: example_rule + host_name: example_host + params: + type: zabbix_agent + key: "{% raw %}vfs.fs.size[{#FSNAME},used]{% endraw %}" + value_type: numeric_unsigned + interval: 1m + state: present + +# Create item prototype on example_template using example_rule +- name: create item prototype + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:Used space{% endraw %}' + discoveryrule_name: example_rule + template_name: example_template + params: + type: zabbix_agent + key: "{% raw %}vfs.fs.size[{#FSNAME},used]{% endraw %}" + value_type: numeric_unsigned + interval: 1m + state: present + + +# Add tags to the existing Zabbix item prototype +- name: update item prototype + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:Used space{% endraw %}' + discoveryrule_name: example_rule + template_name: example_template + params: + type: zabbix_agent + key: "{% raw %}vfs.fs.size[{#FSNAME},used]{% endraw %}" + value_type: numeric_unsigned + interval: 1m + tags: + - tag: class + value: application + state: present + +- name: create dependent item + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:example_depend_item_prototype{% endraw %}' + discoveryrule_name: example_rule + host_name: example_host + params: + type: dependent_item + key: '{% raw %}vfs.fs.size.half[{#FSNAME}]{% endraw %}' + value_type: numeric_float + units: B + master_item: + item_name: '{% raw %}{#FSNAME}:example_item_prototype{% endraw %}' + discoveryrule_name: example_rule + host_name: example_host + preprocessing: + - type: javascript + params: 'return value / 2;' + error_handler: zabbix_server + state: present + +- name: Delete Zabbix item prototype + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:Used space{% endraw %}' + discoveryrule_name: example_rule + template_name: example_template + state: absent +''' + +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.community.zabbix.plugins.module_utils.base import ZabbixBase +import ansible_collections.community.zabbix.plugins.module_utils.helpers as zabbix_utils + + +class Itemprototype(ZabbixBase): + ITEM_TYPES = {'zabbix_agent': 0, + 'zabbix_trapper': 2, + 'simple_check': 3, + 'zabbix_internal': 5, + 'zabbix_agent_active': 7, + 'web_item': 9, + 'external_check': 10, + 'database_monitor': 11, + 'ipmi_agent': 12, + 'ssh_agent': 13, + 'telnet_agent': 14, + 'calculated': 15, + 'jmx_agent': 16, + 'snmp_trap': 17, + 'dependent_item': 18, + 'http_agent': 19, + 'snmp_agent': 20, + 'script': 21} + + VALUE_TYPES = {'numeric_float': 0, + 'character': 1, + 'log': 2, + 'numeric_unsigned': 3, + 'text': 4} + + PREPROCESSING_TYPES = {'custom_multiplier': 1, + 'right_trim': 2, + 'left_trim': 3, + 'trim': 4, + 'regular_expressions': 5, + 'regex': 5, + 'boolean_to_decimal': 6, + 'octal_to_decimal': 7, + 'hexadecimal_to_decimal': 8, + 'simple_change': 9, + 'change_per_second': 10, + 'xml_xpath': 11, + 'jsonpath': 12, + 'in_range': 13, + 'matches_regular_expression': 14, + 'matches_regex': 14, + 'does_not_match_regular_expression': 15, + 'not_match_regex': 15, + 'check_for_error_in_json': 16, + 'check_for_json_error': 16, + 'check_for_error_in_xml': 17, + 'check_for_xml_error': 17, + 'check_for_error_using_regular_expression': 18, + 'check_for_error_regex': 18, + 'discard_unchanged': 19, + 'discard_unchanged_with_heartbeat': 20, + 'javascript': 21, + 'prometheus_pattern': 22, + 'prometheus_to_json': 23, + 'csv_to_json': 24, + 'replace': 25, + 'check_unsupported': 26, + 'xml_to_json': 27, + 'snmp_walk_value': 28, + 'snmp_walk_to_json': 29} + + PREPROCESSING_ERROR_HANDLERS = {'zabbix_server': 0, + 'discard': 1, + 'set_custom_value': 2, + 'set_custom_error_message': 3} + + def get_hosts_templates(self, host_name, template_name): + if host_name is not None: + try: + return self._zapi.host.get({"filter": {"host": host_name}}) + except Exception as e: + self._module.fail_json(msg="Failed to get host: %s" % e) + else: + try: + return self._zapi.template.get({"filter": {"host": template_name}}) + except Exception as e: + self._module.fail_json(msg="Failed to get template: %s" % e) + + def get_discoveryrules(self, discoveryrule_name, host_name, template_name): + if host_name is not None: + host = host_name + else: + host = template_name + discoveryrules = [] + try: + discoveryrules = self._zapi.discoveryrule.get({'filter': {'name': discoveryrule_name, 'host': host}}) + except Exception as e: + self._module.fail_json(msg="Failed to get discovery rules: %s" % e) + return discoveryrules + + def get_itemprototypes(self, itemprototype_name, discoveryrule_name, host_name, template_name): + if host_name is not None: + host = host_name + else: + host = template_name + discoveryrules = self.get_discoveryrules(discoveryrule_name, host_name, template_name) + rule_ids = [] + for d in discoveryrules: + rule_ids.append(d['itemid']) + itemprototypes = [] + try: + itemprototypes = self._zapi.itemprototype.get({'filter': {'name': itemprototype_name, 'host': host, 'discoveryids': rule_ids}}) + except Exception as e: + self._module.fail_json(msg="Failed to get item: %s" % e) + return itemprototypes + + def sanitize_params(self, name, discoveryrule_name, params, host_name=None, template_name=None): + params['name'] = name + if 'key' in params: + params['key_'] = params['key'] + params.pop("key") + rules = self.get_discoveryrules(discoveryrule_name, host_name, template_name) + if len(rules) == 0: + self._module.fail_json(msg="Failed to get discoveryrule: %s" % discoveryrule_name) + params['ruleid'] = self.get_discoveryrules(discoveryrule_name, host_name, template_name)[0]['itemid'] + if 'type' in params: + item_type_int = self.ITEM_TYPES[params['type']] + params['type'] = item_type_int + if 'value_type' in params: + value_type_int = self.VALUE_TYPES[params['value_type']] + params['value_type'] = value_type_int + if 'interval' in params: + params['delay'] = params['interval'] + params.pop("interval") + if 'enabled' in params: + params['status'] = params['enabled'] + params.pop('enabled') + if 'master_item' in params: + if 'host_name' not in params['master_item']: + params['master_item']['host_name'] = None + if 'template_name' not in params['master_item']: + params['master_item']['template_name'] = None + master_items = self.get_itemprototypes(params['master_item']['item_name'], params['master_item']['discoveryrule_name'], + params['master_item']['host_name'], params['master_item']['template_name']) + if len(master_items) == 0: + self._module.fail_json(msg="No items with the name %s exist to depend on" % params['master_item']['item_name']) + params['master_itemid'] = master_items[0]['itemid'] + params.pop('master_item') + if 'preprocessing' in params: + for param in params['preprocessing']: + preprocess_type_int = self.PREPROCESSING_TYPES[param['type']] + param['type'] = preprocess_type_int + if 'error_handler' in param: + error_handler_int = self.PREPROCESSING_ERROR_HANDLERS[param['error_handler']] + param['error_handler'] = error_handler_int + + def add_itemprototype(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.itemprototype.create(params) + except Exception as e: + self._module.fail_json(msg="Failed to create itemprototype: %s" % e) + return results + + def update_itemprototype(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.itemprototype.update(params) + except Exception as e: + self._module.fail_json(msg="Failed to update itemprototype: %s" % e) + return results + + def check_itemprototype_changed(self, old_itemprototype): + try: + new_itemprototype = self._zapi.itemprototype.get({'itemids': '%s' % old_itemprototype['itemid']})[0] + except Exception as e: + self._module.fail_json(msg="Failed to get itemprototype: %s" % e) + return old_itemprototype != new_itemprototype + + def delete_itemprototype(self, itemprototype_id): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.itemprototype.delete(itemprototype_id) + except Exception as e: + self._module.fail_json(msg="Failed to delete itemprototype: %s" % e) + return results + + +def main(): + argument_spec = zabbix_utils.zabbix_common_argument_spec() + argument_spec.update(dict( + name=dict(type='str', required=True), + discoveryrule_name=dict(type='str', required=True), + host_name=dict(type='str', required=False), + template_name=dict(type='str', required=False), + params=dict(type='dict', required=False), + state=dict(type='str', default="present", choices=['present', 'absent']), + )) + module = AnsibleModule( + argument_spec=argument_spec, + required_one_of=[ + ['host_name', 'template_name'] + ], + mutually_exclusive=[ + ['host_name', 'template_name'] + ], + required_if=[ + ['state', 'present', ['params']] + ], + supports_check_mode=True + ) + + name = module.params['name'] + discoveryrule_name = module.params['discoveryrule_name'] + host_name = module.params['host_name'] + template_name = module.params['template_name'] + params = module.params['params'] + state = module.params['state'] + + itemprototype = Itemprototype(module) + + if state == "absent": + itemprototypes = itemprototype.get_itemprototypes(name, discoveryrule_name, host_name, template_name) + if len(itemprototypes) == 0: + module.exit_json(changed=False, result="No itemprototype to delete.") + else: + delete_ids = [] + for i in itemprototypes: + delete_ids.append(i['itemid']) + results = itemprototype.delete_itemprototype(delete_ids) + module.exit_json(changed=True, result=results) + + elif state == "present": + itemprototype.sanitize_params(name, discoveryrule_name, params, host_name, template_name) + itemprototypes = itemprototype.get_itemprototypes(name, discoveryrule_name, host_name, template_name) + results = [] + if len(itemprototypes) == 0: + hosts_templates = itemprototype.get_hosts_templates(host_name, template_name) + for host_template in hosts_templates: + if 'hostid' in host_template: + params['hostid'] = host_template['hostid'] + elif 'templateid' in host_template: + params['hostid'] = host_template['templateid'] + else: + module.fail_json(msg="host/template did not return id") + results.append(itemprototype.add_itemprototype(params)) + module.exit_json(changed=True, result=results) + else: + changed = False + params.pop('ruleid') + for i in itemprototypes: + params['itemid'] = i['itemid'] + results.append(itemprototype.update_itemprototype(params)) + changed_item = itemprototype.check_itemprototype_changed(i) + if changed_item: + changed = True + module.exit_json(changed=changed, result=results) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/community/zabbix/plugins/modules/zabbix_script.py b/ansible_collections/community/zabbix/plugins/modules/zabbix_script.py index 643851885..402ec10a8 100644 --- a/ansible_collections/community/zabbix/plugins/modules/zabbix_script.py +++ b/ansible_collections/community/zabbix/plugins/modules/zabbix_script.py @@ -26,15 +26,15 @@ options: type: str script_type: description: - - Script type. + - Script type. Required when state is 'present'. type: str - required: true + required: false choices: ["script", "ipmi", "ssh", "telnet", "webhook"] command: description: - - Command to run. + - Command to run. Required when state is 'present' type: str - required: true + required: false scope: description: - Script scope. @@ -137,9 +137,9 @@ options: suboptions: name: description: - - Parameter name. + - Parameter name. Required when 'parameters' is specified for a 'webhook' script. type: str - required: true + required: false value: description: - Parameter value. Supports macros. @@ -292,24 +292,16 @@ class Script(ZabbixBase): request["confirmation"] = confirmation if script_type == "ssh": - if authtype is None: - self._module.fail_json(changed=False, msg="authtype must be provided for ssh script type") request["authtype"] = str(zabbix_utils.helper_to_numeric_value([ "password", "public_key"], authtype)) if authtype == "public_key": - if publickey is None or privatekey is None: - self._module.fail_json(changed=False, msg="publickey and privatekey must be provided for ssh script type with publickey authtype") request["publickey"] = publickey request["privatekey"] = privatekey if script_type in ["ssh", "telnet"]: - if username is None: - self._module.fail_json(changed=False, msg="username must be provided for 'ssh' and 'telnet' script types") request["username"] = username if (script_type == "ssh" and authtype == "password") or script_type == "telnet": - if password is None: - self._module.fail_json(changed=False, msg="password must be provided for telnet script type or ssh script type with password autheype") request["password"] = password if port is not None: request["port"] = port @@ -317,6 +309,9 @@ class Script(ZabbixBase): if script_type == "webhook": request["timeout"] = script_timeout if parameters: + for parameter in parameters: + if "name" not in parameter.keys() or parameter["name"] is None: + self._module.fail_json(msg="When providing parameters to a webhook script, the 'name' option is required.") request["parameters"] = parameters return request @@ -347,56 +342,59 @@ def main(): name=dict(type="str", required=True), script_type=dict( type="str", - required=True, choices=["script", "ipmi", "ssh", "telnet", "webhook"]), - command=dict(type="str", required=True), + command=dict(type="str"), scope=dict( type="str", - required=False, choices=["action_operation", "manual_host_action", "manual_event_action"], default="action_operation"), execute_on=dict( type="str", - required=False, choices=["zabbix_agent", "zabbix_server", "zabbix_server_proxy"], default="zabbix_server_proxy"), - menu_path=dict(type="str", required=False), + menu_path=dict(type="str"), authtype=dict( type="str", - required=False, choices=["password", "public_key"]), - username=dict(type="str", required=False), - password=dict(type="str", required=False, no_log=True), - publickey=dict(type="str", required=False), - privatekey=dict(type="str", required=False, no_log=True), - port=dict(type="str", required=False), - host_group=dict(type="str", required=False, default="all"), - user_group=dict(type="str", required=False, default="all"), + username=dict(type="str"), + password=dict(type="str", no_log=True), + publickey=dict(type="str"), + privatekey=dict(type="str", no_log=True), + port=dict(type="str"), + host_group=dict(type="str", default="all"), + user_group=dict(type="str", default="all"), host_access=dict( type="str", - required=False, choices=["read", "write"], default="read"), - confirmation=dict(type="str", required=False), - script_timeout=dict(type="str", default="30s", required=False), + confirmation=dict(type="str"), + script_timeout=dict(type="str", default="30s"), parameters=dict( type="list", elements="dict", options=dict( - name=dict(type="str", required=True), - value=dict(type="str", required=False, default="") + name=dict(type="str"), + value=dict(type="str", default="") ) ), - description=dict(type="str", required=False), + description=dict(type="str"), state=dict( type="str", - required=False, default="present", choices=["present", "absent"]) )) + required_if = [ + ("state", "present", ("script_type", "command",)), + ("script_type", "ssh", ("authtype", "username",)), + ("authtype", "password", ("password",)), + ("authtype", "public_key", ("publickey", "privatekey",)), + ("script_type", "telnet", ("username", "password")), + ] + module = AnsibleModule( argument_spec=argument_spec, + required_if=required_if, supports_check_mode=True ) diff --git a/ansible_collections/community/zabbix/plugins/modules/zabbix_trigger.py b/ansible_collections/community/zabbix/plugins/modules/zabbix_trigger.py new file mode 100644 index 000000000..9a84448c6 --- /dev/null +++ b/ansible_collections/community/zabbix/plugins/modules/zabbix_trigger.py @@ -0,0 +1,444 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = r''' +--- +module: zabbix_trigger +short_description: Create/delete Zabbix triggers +description: + - Create triggers if they do not exist. + - Delete existing triggers if they exist. +author: + - "Andrew Lathrop (@aplathrop)" +requirements: + - "python >= 2.6" + +options: + state: + description: + - Create or delete trigger. + required: false + type: str + default: "present" + choices: [ "present", "absent" ] + name: + description: + - Name of trigger to create or delete. + - Overrides "description" in API docs. + - Cannot be changed. If a trigger's name needs to be changed, it needs to deleted and recreated + required: true + type: str + host_name: + description: + - Name of host to add trigger to. + - Required when I(template_name) is not used. + - Mutually exclusive with I(template_name). + required: false + type: str + template_name: + description: + - Name of template to add trigger to. + - Required when I(host_name) is not used. + - Mutually exclusive with I(host_name). + required: false + type: str + desc: + description: + - Additional description of the trigger. + - Overrides "comments" in API docs. + required: false + type: str + aliases: [ "description" ] + dependencies: + description: + - list of triggers that this trigger is dependent on + required: false + type: list + elements: dict + suboptions: + name: + description: + - Name of dependent trigger. + required: true + type: str + host_name: + description: + - Name of host containing dependent trigger. + - Required when I(template_name) is not used. + - Mutually exclusive with I(template_name). + required: false + type: str + template_name: + description: + - Name of template containing dependent trigger. + - Required when I(host_name) is not used. + - Mutually exclusive with I(host_name). + required: false + type: str + params: + description: + - Parameters to create/update trigger with. + - Required if state is "present". + - Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/trigger/object + - Additionally supported parameters are below. + required: false + type: dict + suboptions: + severity: + description: + - Severity of the trigger. + - Alias for "priority" in API docs. + required: false + type: str + aliases: [ "priority" ] + choices: + - not_classified + - information + - warning + - average + - high + - disaster + status: + description: + - Status of the trigger. + required: false + type: str + choices: [ "enabled", "disabled" ] + enabled: + description: + - Status of the trigger. + - Overrides "status" in API docs. + required: false + type: bool + generate_multiple_events: + description: + - Whether the trigger can generate multiple problem events. + - Alias for "type" in API docs. + required: false + type: bool + recovery_mode: + description: + - OK event generation mode. + - Overrides "recovery_mode" in API docs. + required: false + type: str + choices: + - expression + - recovery_expression + - none + correlation_mode: + description: + - OK event closes. + - Overrides "correlation_mode" in API docs. + required: false + type: str + choices: [ "all", "tag" ] + manual_close: + description: + - Allow manual close. + - Overrides "manual_close" in API docs. + required: false + type: bool + +extends_documentation_fragment: +- community.zabbix.zabbix +''' + +EXAMPLES = r''' + +# If you want to use Username and Password to be authenticated by Zabbix Server +- name: Set credentials to access Zabbix Server API + ansible.builtin.set_fact: + ansible_user: Admin + ansible_httpapi_pass: zabbix + +# If you want to use API token to be authenticated by Zabbix Server +# https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/administration/general#api-tokens +- name: Set API token + ansible.builtin.set_fact: + ansible_zabbix_auth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895 + +# Create ping trigger on example_host +- name: create ping trigger + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_trigger: + name: agent_ping + host_name: example_host + params: + severity: high + expression: 'nodata(/example_host/agent.ping,1m)=1' + manual_close: True + enabled: True + state: present + +# Create ping trigger on example_template +- name: create ping trigger + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_trigger: + name: agent_ping + host_name: example_template + params: + severity: high + expression: 'nodata(/example_template/agent.ping,1m)=1' + manual_close: True + enabled: True + state: present + +# Add tags to the existing Zabbix trigger +- name: update ping trigger + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_trigger: + name: agent_ping + host_name: example_template + params: + severity: high + expression: 'nodata(/example_template/agent.ping,1m)=1' + manual_close: True + enabled: True + tags: + - tag: class + value: application + state: present + +# delete Zabbix trigger +- name: delete ping trigger + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_trigger: + name: agent_ping + host_name: example_template + state: absent +''' + +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.community.zabbix.plugins.module_utils.base import ZabbixBase +import ansible_collections.community.zabbix.plugins.module_utils.helpers as zabbix_utils + + +class Trigger(ZabbixBase): + + PRIORITY_TYPES = {'not_classified': 0, + 'information': 1, + 'warning': 2, + 'average': 3, + 'high': 4, + 'disaster': 5} + + RECOVERY_MODES = {'expression': 0, + 'recovery_expression': 1, + 'none': 2} + + def get_triggers(self, trigger_name, host_name, template_name): + if host_name is not None: + host = host_name + else: + host = template_name + triggers = [] + try: + triggers = self._zapi.trigger.get({'filter': {'description': trigger_name, 'host': host}}) + except Exception as e: + self._module.fail_json(msg="Failed to get trigger: %s" % e) + return triggers + + def sanitize_params(self, name, params, desc=None, dependencies=None): + params['description'] = name + if desc is not None: + params['comments'] = desc + if 'severity' in params: + params['priority'] = params['severity'] + params.pop("severity") + if 'priority' in params: + priority_id = self.PRIORITY_TYPES[params['priority']] + params['priority'] = priority_id + if 'enabled' in params: + if params['enabled']: + params['status'] = 'enabled' + else: + params['status'] = 'disabled' + params.pop("enabled") + if 'status' in params: + status = params['status'] + if status == 'enabled': + params['status'] = 0 + elif status == 'disabled': + params['status'] = 1 + else: + self._module.fail_json(msg="Status must be 'enabled' or 'disabled', got %s" % status) + if 'generate_multiple_events' in params: + multiple_event_type = params['generate_multiple_events'] + if multiple_event_type: + params['type'] = 1 + else: + params['type'] = 0 + if 'recovery_mode' in params: + recovery_mode_id = self.RECOVERY_MODES[params['recovery_mode']] + params['recovery_mode'] = recovery_mode_id + if 'correlation_mode' in params: + correlation_mode = params['correlation_mode'] + if correlation_mode == 'all': + params['correlation_mode'] = 0 + elif correlation_mode == 'tag': + params['correlation_mode'] = 1 + else: + self._module.fail_json(msg="correlation_mode must be all or tag, got %s" % correlation_mode) + if 'manual_close' in params: + manual_close = params['manual_close'] + if manual_close: + params['manual_close'] = 1 + else: + params['manual_close'] = 0 + if dependencies is not None: + params['dependencies'] = [] + for dependency in dependencies: + host_name = None + template_name = None + if 'host_name' in dependency: + host_name = dependency + elif 'template_name' in dependency: + template_name = dependency + else: + self._module.fail_json(msg="Each dependency must contain either the host_name or the template_name") + triggers = self.get_triggers(dependency['name'], host_name, template_name) + for trigger in triggers: + params['dependencies'].append({'triggerid': trigger['triggerid']}) + + def add_trigger(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.trigger.create(params) + except Exception as e: + self._module.fail_json(msg="Failed to create trigger: %s" % e) + return results + + def update_trigger(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.trigger.update(params) + except Exception as e: + self._module.fail_json(msg="Failed to update trigger: %s" % e) + return results + + def check_trigger_changed(self, old_trigger): + try: + new_trigger = self._zapi.trigger.get({"triggerids": "%s" % old_trigger['triggerid']})[0] + except Exception as e: + self._module.fail_json(msg="Failed to get trigger: %s" % e) + return old_trigger != new_trigger + + def delete_trigger(self, trigger_id): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.trigger.delete(trigger_id) + except Exception as e: + self._module.fail_json(msg="Failed to delete trigger: %s" % e) + return results + + +def main(): + argument_spec = zabbix_utils.zabbix_common_argument_spec() + argument_spec.update(dict( + name=dict(type='str', required=True), + host_name=dict(type='str', required=False), + template_name=dict(type='str', required=False), + params=dict(type='dict', required=False), + desc=dict(type='str', required=False, aliases=['description']), + dependencies=dict(type='list', elements='dict', required=False), + state=dict(type='str', default="present", choices=['present', 'absent']), + )) + module = AnsibleModule( + argument_spec=argument_spec, + required_one_of=[ + ['host_name', 'template_name'] + ], + mutually_exclusive=[ + ['host_name', 'template_name'] + ], + required_if=[ + ['state', 'present', ['params']] + ], + supports_check_mode=True + ) + + name = module.params['name'] + host_name = module.params['host_name'] + template_name = module.params['template_name'] + params = module.params['params'] + desc = module.params['desc'] + dependencies = module.params['dependencies'] + state = module.params['state'] + + trigger = Trigger(module) + + if state == "absent": + triggers = trigger.get_triggers(name, host_name, template_name) + if len(triggers) == 0: + module.exit_json(changed=False, result="No trigger to delete.") + else: + delete_ids = [] + for t in triggers: + delete_ids.append(t['triggerid']) + results = trigger.delete_trigger(delete_ids) + module.exit_json(changed=True, result=results) + + elif state == "present": + trigger.sanitize_params(name, params, desc, dependencies) + triggers = trigger.get_triggers(name, host_name, template_name) + if len(triggers) == 0: + results = trigger.add_trigger(params) + module.exit_json(changed=True, result=results) + else: + results = [] + changed = False + for t in triggers: + params['triggerid'] = t['triggerid'] + params.pop('description') + results.append(trigger.update_trigger(params)) + changed_trigger = trigger.check_trigger_changed(t) + if changed_trigger: + changed = True + module.exit_json(changed=changed, result=results) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/community/zabbix/plugins/modules/zabbix_triggerprototype.py b/ansible_collections/community/zabbix/plugins/modules/zabbix_triggerprototype.py new file mode 100644 index 000000000..410955be9 --- /dev/null +++ b/ansible_collections/community/zabbix/plugins/modules/zabbix_triggerprototype.py @@ -0,0 +1,448 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = r''' +--- +module: zabbix_triggerprototype +short_description: Create/delete Zabbix triggerprototypes +description: + - Create triggerprototypes if they do not exist. + - Delete existing triggerprototypes if they exist. +author: + - "Andrew Lathrop (@aplathrop)" +requirements: + - "python >= 2.6" + +options: + state: + description: + - Create or delete trigger prototype. + required: false + type: str + default: "present" + choices: [ "present", "absent" ] + name: + description: + - Name of trigger prototype to create or delete. + - Overrides "description" in API docs. + - Cannot be changed. If a trigger prototype's name needs to be changed, it needs to deleted and recreated + required: true + type: str + host_name: + description: + - Name of host to add trigger prototype to. + - Required when I(template_name) is not used. + - Mutually exclusive with I(template_name). + required: false + type: str + template_name: + description: + - Name of template to add trigger prototype to. + - Required when I(host_name) is not used. + - Mutually exclusive with I(host_name). + required: false + type: str + desc: + description: + - Additional description of the trigger prototype. + - Overrides "comments" in API docs. + required: false + type: str + aliases: [ "description" ] + dependencies: + description: + - list of trigger prototypes that this trigger prototype is dependent on + required: false + type: list + elements: dict + suboptions: + name: + description: + - Name of dependent trigger. + required: true + type: str + host_name: + description: + - Name of host containing dependent trigger. + - Required when I(template_name) is not used. + - Mutually exclusive with I(template_name). + required: false + type: str + template_name: + description: + - Name of template containing dependent trigger. + - Required when I(host_name) is not used. + - Mutually exclusive with I(host_name). + required: false + type: str + + params: + description: + - Parameters to create/update trigger prototype with. + - Required if state is "present". + - Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/triggerprototype/object + - Additionally supported parameters are below. + required: false + type: dict + suboptions: + severity: + description: + - Severity of the trigger prototype. + - Alias for "priority" in API docs. + required: false + type: str + aliases: [ "priority" ] + choices: + - not_classified + - information + - warning + - average + - high + - disaster + status: + description: + - Status of the trigger prototype. + required: false + type: str + choices: [ "enabled", "disabled" ] + enabled: + description: + - Status of the trigger prototype. + - Overrides "status" in API docs. + required: false + type: bool + generate_multiple_events: + description: + - Whether the trigger prototype can generate multiple problem events. + - Alias for "type" in API docs. + required: false + type: bool + recovery_mode: + description: + - OK event generation mode. + - Overrides "recovery_mode" in API docs. + required: false + type: str + choices: + - expression + - recovery_expression + - none + correlation_mode: + description: + - OK event closes. + - Overrides "correlation_mode" in API docs. + required: false + type: str + choices: [ "all", "tag" ] + manual_close: + description: + - Allow manual close. + - Overrides "manual_close" in API docs. + required: false + type: bool + +extends_documentation_fragment: +- community.zabbix.zabbix +''' + +EXAMPLES = r''' + +# If you want to use Username and Password to be authenticated by Zabbix Server +- name: Set credentials to access Zabbix Server API + ansible.builtin.set_fact: + ansible_user: Admin + ansible_httpapi_pass: zabbix + +# If you want to use API token to be authenticated by Zabbix Server +# https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/administration/general#api-tokens +- name: Set API token + ansible.builtin.set_fact: + ansible_zabbix_auth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895 + +# Create trigger prototype on example_host using example_rule +- name: create trigger prototype + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + host_name: example_host + params: + severity: high + expression: "{% raw %}last(/example_host/vfs.fs.size[{#FSNAME}, pused])>80{% endraw %}" + recovery_mode: none + manual_close: True + enabled: True + state: present + +# Create trigger prototype on example_template using example_rule +- name: create trigger prototype + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + template_name: example_template + params: + severity: high + expression: "{% raw %}last(/example_host/vfs.fs.size[{#FSNAME}, pused])>80{% endraw %}" + recovery_mode: none + manual_close: True + enabled: True + state: present + +# Add tags to the existing Zabbix trigger prototype +- name: update trigger prototype + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + template_name: example_template + params: + severity: high + expression: "{% raw %}last(/example_host/vfs.fs.size[{#FSNAME}, pused])>80{% endraw %}" + recovery_mode: none + manual_close: True + enabled: True + tags: + - tag: class + value: application + state: present + +# Delete Zabbix trigger prototype +- name: delete trigger prototype + # set task level variables as we change ansible_connection plugin here + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: 'zabbixeu' # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu + ansible_host: zabbix-example-fqdn.org + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + template_name: example_template + state: absent +''' + +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.community.zabbix.plugins.module_utils.base import ZabbixBase +import ansible_collections.community.zabbix.plugins.module_utils.helpers as zabbix_utils + + +class Triggerprototype(ZabbixBase): + + PRIORITY_TYPES = {'not_classified': 0, + 'information': 1, + 'warning': 2, + 'average': 3, + 'high': 4, + 'disaster': 5} + + RECOVERY_MODES = {'expression': 0, + 'recovery_expression': 1, + 'none': 2} + + def get_triggerprototypes(self, triggerprototype_name, host_name, template_name): + if host_name is not None: + host = host_name + else: + host = template_name + triggerprototypes = [] + try: + triggerprototypes = self._zapi.triggerprototype.get({'filter': {'description': triggerprototype_name, 'host': host}}) + except Exception as e: + self._module.fail_json(msg="Failed to get triggerprototype: %s" % e) + return triggerprototypes + + def sanitize_params(self, name, params, desc=None, dependencies=None): + params['description'] = name + if desc is not None: + params['comments'] = desc + if 'severity' in params: + params['priority'] = params['severity'] + params.pop('severity') + if 'priority' in params: + priority_id = self.PRIORITY_TYPES[params['priority']] + params['priority'] = priority_id + if 'enabled' in params: + if params['enabled']: + params['status'] = 'enabled' + else: + params['status'] = 'disabled' + params.pop('enabled') + if 'status' in params: + status = params['status'] + if status == 'enabled': + params['status'] = 0 + elif status == 'disabled': + params['status'] = 1 + else: + self._module.fail_json(msg="Status must be 'enabled' or 'disabled', got %s" % status) + if 'generate_multiple_events' in params: + multiple_event_type = params['generate_multiple_events'] + if multiple_event_type: + params['type'] = 1 + else: + params['type'] = 0 + if 'recovery_mode' in params: + recovery_mode_id = self.RECOVERY_MODES[params['recovery_mode']] + params['recovery_mode'] = recovery_mode_id + if 'correlation_mode' in params: + correlation_mode = params['correlation_mode'] + if correlation_mode == 'all': + params['correlation_mode'] = 0 + elif correlation_mode == 'tag': + params['correlation_mode'] = 1 + else: + self._module.fail_json(msg="correlation_mode must be all or tag, got %s" % correlation_mode) + if 'manual_close' in params: + manual_close = params['manual_close'] + if manual_close: + params['manual_close'] = 1 + else: + params['manual_close'] = 0 + if dependencies is not None: + params['dependencies'] = [] + for dependency in dependencies: + host_name = None + template_name = None + if 'host_name' in dependency: + host_name = dependency + elif 'template_name' in dependency: + template_name = dependency + else: + self._module.fail_json(msg="Each dependency must contain either the host_name or the template_name") + triggers = self.get_triggerprototypes(dependency['name'], host_name, template_name) + for trigger in triggers: + params['dependencies'].append({'triggerid': trigger['triggerid']}) + + def add_triggerprototype(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.triggerprototype.create(params) + except Exception as e: + self._module.fail_json(msg="Failed to create triggerprototype: %s" % e) + return results + + def update_triggerprototype(self, params): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.triggerprototype.update(params) + except Exception as e: + self._module.fail_json(msg="Failed to update triggerprototype: %s" % e) + return results + + def check_triggerprototype_changed(self, old_triggerprototype): + try: + new_triggerprototype = self._zapi.triggerprototype.get({'triggerids': '%s' % old_triggerprototype['triggerid']})[0] + except Exception as e: + self._module.fail_json(msg="Failed to get triggerprototype: %s" % e) + return old_triggerprototype != new_triggerprototype + + def delete_triggerprototype(self, trigger_id): + if self._module.check_mode: + self._module.exit_json(changed=True) + try: + results = self._zapi.triggerprototype.delete(trigger_id) + except Exception as e: + self._module.fail_json(msg="Failed to delete triggerprototype: %s" % e) + return results + + +def main(): + argument_spec = zabbix_utils.zabbix_common_argument_spec() + argument_spec.update(dict( + name=dict(type='str', required=True), + host_name=dict(type='str', required=False), + template_name=dict(type='str', required=False), + params=dict(type='dict', required=False), + desc=dict(type='str', required=False, aliases=['description']), + dependencies=dict(type='list', elements='dict', required=False), + state=dict(type='str', default="present", choices=['present', 'absent']), + )) + module = AnsibleModule( + argument_spec=argument_spec, + required_one_of=[ + ['host_name', 'template_name'] + ], + mutually_exclusive=[ + ['host_name', 'template_name'] + ], + required_if=[ + ['state', 'present', ['params']] + ], + supports_check_mode=True + ) + + name = module.params['name'] + host_name = module.params['host_name'] + template_name = module.params['template_name'] + params = module.params['params'] + desc = module.params['desc'] + dependencies = module.params['dependencies'] + state = module.params['state'] + + triggerprototype = Triggerprototype(module) + + if state == "absent": + triggerprototypes = triggerprototype.get_triggerprototypes(name, host_name, template_name) + if len(triggerprototypes) == 0: + module.exit_json(changed=False, result="No triggerprototype to delete.") + else: + delete_ids = [] + for t in triggerprototypes: + delete_ids.append(t['triggerid']) + results = triggerprototype.delete_triggerprototype(delete_ids) + module.exit_json(changed=True, result=results) + + elif state == "present": + triggerprototype.sanitize_params(name, params, desc, dependencies) + triggerprototypes = triggerprototype.get_triggerprototypes(name, host_name, template_name) + if len(triggerprototypes) == 0: + results = triggerprototype.add_triggerprototype(params) + module.exit_json(changed=True, result=results) + else: + results = [] + changed = False + for t in triggerprototypes: + params['triggerid'] = t['triggerid'] + params.pop('description') + results.append(triggerprototype.update_triggerprototype(params)) + changed_trigger = triggerprototype.check_triggerprototype_changed(t) + if changed_trigger: + changed = True + module.exit_json(changed=changed, result=results) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/README.md b/ansible_collections/community/zabbix/roles/zabbix_agent/README.md index fe4a601b3..f9a2fb5a5 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/README.md +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/README.md @@ -28,7 +28,6 @@ * [proxy](#proxy) - [Dependencies](#dependencies) - [Example Playbook](#example-playbook) - * [zabbix_agent2_plugins](#zabbix-agent2-plugins) * [agent_interfaces](#agent-interfaces) * [Other interfaces](#other-interfaces) * [Vars in role configuration](#vars-in-role-configuration) @@ -95,6 +94,7 @@ See the following list of supported Operating systems with the Zabbix releases: | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | | Red Hat Fam 7 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | V | V | V | @@ -104,24 +104,6 @@ See the following list of supported Operating systems with the Zabbix releases: You can bypass this matrix by setting `enable_version_check: false` -# Getting started - -## Minimal Configuration - -In order to get the Zabbix Agent running, you'll have to define the following properties before executing the role: - -* `zabbix_agent_version` -* `zabbix_agent(2)_server` -* `zabbix_agent(2)_serveractive` (When using active checks) - -The `zabbix_agent_version` is optional. The latest available major.minor version of Zabbix will be installed on the host(s). If you want to use an older version, please specify this in the major.minor format. Example: `zabbix_agent_version: 6.0`. - -The `zabbix_agent(2)_server` (and `zabbix_agent(2)_serveractive`) should contain the ip or fqdn of the host running the Zabbix Server. - -## Issues - -Due to issue discussed on [#291](https://github.com/dj-wasabi/ansible-zabbix-agent/issues/291), the Ansible Version 2.9.{0,1,2} isn't working correctly on Windows related targets. - # Role Variables ## Main variables @@ -133,114 +115,66 @@ The following is an overview of all available configuration default for this rol * `zabbix_agent_version`: This is the version of zabbix. Default: The highest supported version for the operating system. Can be overridden to 6.4, 6.2, or 6.0 * `zabbix_agent_version_minor`: When you want to specify a minor version to be installed. Is also used for `zabbix_sender` and `zabbix_get`. RedHat only. Default set to: `*` (latest available) * `zabbix_repo_yum`: A list with Yum repository configuration. +* `zabbix_repo_yum_gpgcheck`: If Yum should check GPG keys on installation * `zabbix_repo_yum_schema`: Default: `https`. Option to change the web schema for the yum repository(http/https) * `zabbix_agent_disable_repo`: A list of repos to disable during install. Default `epel`. * `zabbix_repo_deb_url`: The URL to the Zabbix repository. Default `http://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}/{{ ansible_distribution.lower() }}` * `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`. -* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`. +* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key. * `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`. ### SElinux * `zabbix_selinux`: Default: `False`. Enables an SELinux policy so that the server will run. +* `selinux_allow_zabbix_run_sudo`: Default: `False`. Enable Zabbix root access on system. ### Zabbix Agent -* `zabbix_agent_ip`: The IP address of the host. When not provided, it will be determined via the `ansible_default_ipv4` fact. * `zabbix_agent2`: Default: `False`. When you want to install the `Zabbix Agent2` instead of the "old" `Zabbix Agent`.zabbix_agent_version +* `zabbix_agent_apt_priority`: Add a weight (`Pin-Priority`) for the APT repository. +* `zabbix_agent_chassis`: Default: `false`. When set to `true`, it will give Zabbix Agent access to the Linux DMI table allowing system.hw.chassis info to populate. +* `zabbix_agent_conf_mode`: Default: `0644`. The "mode" for the Zabbix configuration file. +* `zabbix_agent_dont_detect_ip`: Default `false`. When set to `true`, it won't detect available ip addresses on the host and no need for the Python module `netaddr` to be installed. +* `zabbix_agent_get_package`: The name of the zabbix-get package. Default: `zabbix-get`. +* `zabbix_agent_include_mode`: The mode for the directory mentioned above. +* `zabbix_agent_install_agent_only`: Only install the Zabbix Agent and not the `zabbix-sender` and `zabbix-get` packages. Default: `False` * `zabbix_agent_listeninterface`: Interface zabbix-agent listens on. Leave blank for all. * `zabbix_agent_package_remove`: If `zabbix_agent2: True` and you want to remove the old installation. Default: `False`. -* `zabbix_agent_package`: The name of the zabbix-agent package. Default: `zabbix-agent`. In case for EPEL, it is automatically renamed. -* `zabbix_sender_package`: The name of the zabbix-sender package. Default: `zabbix-sender`. In case for EPEL, it is automatically renamed. -* `zabbix_get_package`: The name of the zabbix-get package. Default: `zabbix-get`. In case for EPEL, it is automatically renamed. -* `zabbix_agent_package_state`: If Zabbix-agent needs to be `present` or `latest`. -* `zabbix_agent_interfaces`: A list that configured the interfaces you can use when configuring via API. -* `zabbix_agent_install_agent_only`: Only install the Zabbix Agent and not the `zabbix-sender` and `zabbix-get` packages. Default: `False` +* `zabbix_agent_package_state`: If Zabbix-agent needs to be `present` (default) or `latest`. +* `zabbix_agent_package`: The name of the zabbix-agent package. Default: `zabbix-agent` if `zabbix_agent2` is fale and `zabbix-agent2` if `true`. +* `zabbix_agent_sender_package`: The name of the zabbix-sender package. Default: `zabbix-sender`. * `zabbix_agent_userparameters`: Default: `[]]`. List of userparameter names and scripts (if any). Detailed description is given in the [Deploying Userparameters](#deploying-userparameters) section. - * `name`: Userparameter name (should be the same with userparameter template file name) - * `scripts_dir`: Directory name of the custom scripts needed for userparameters -* `zabbix_agent_userparameters_templates_src`: indicates the relative path (from `templates/`) where userparameter templates are searched + * `name`: Userparameter name (should be the same with userparameter template file name) + * `scripts_dir`: Directory name of the custom scripts needed for userparameters * `zabbix_agent_userparameters_scripts_src`: indicates the relative path (from `files/`) where userparameter scripts are searched -* `zabbix_agent_runas_user`: Drop privileges to a specific, existing user on the system. Only has effect if run as 'root' and AllowRoot is disabled. -* `zabbix_agent_become_on_localhost`: Default: `True`. Set to `False` if you don't need to elevate privileges on localhost to install packages locally with pip. -* `zabbix_agent_apt_priority`: Add a weight (`Pin-Priority`) for the APT repository. -* `zabbix_agent_conf_mode`: Default: `0644`. The "mode" for the Zabbix configuration file. -* `zabbix_agent_dont_detect_ip`: Default `false`. When set to `true`, it won't detect available ip addresses on the host and no need for the Python module `netaddr` to be installed. -* `zabbix_agent_chassis`: Default: `false`. When set to `true`, it will give Zabbix Agent access to the Linux DMI table allowing system.hw.chassis info to populate. - -### Zabbix Agent vs Zabbix Agent 2 configuration - -The following provides an overview of all the properties that can be set in the Zabbix Agent configuration file. When `(2)` is used in the name of the property, like `zabbix_agent(2)_pidfile`, it will show that you can configure `zabbix_agent_pidfile` for the Zabbix Agent configuration file and `zabbix_agent2_pidfile` for the Zabbix Agent 2 configuration file. - -Otherwise it just for the Zabbix Agent or for the Zabbix Agent 2. - -* `zabbix_agent(2)_server`: The ip address for the zabbix-server or zabbix-proxy. -* `zabbix_agent(2)_serveractive`: The ip address for the zabbix-server or zabbix-proxy for active checks. -* `zabbix_agent(2)_allow_key`: list of AllowKey configurations. -* `zabbix_agent(2)_deny_key`: list of DenyKey configurations. -* `zabbix_agent(2)_pidfile`: name of pid file. -* `zabbix_agent(2)_logfile`: name of log file. -* `zabbix_agent(2)_logfilesize`: maximum size of log file in mb. -* `zabbix_agent(2)_additional_include`: A list of additional complete paths to include in configuration -* `zabbix_agent(2)_logtype`: Specifies where log messages are written to -* `zabbix_agent(2)_debuglevel`: specifies debug level -* `zabbix_agent(2)_sourceip`: source ip address for outgoing connections. -* `zabbix_agent_enableremotecommands`: whether remote commands from zabbix server are allowed. -* `zabbix_agent_logremotecommands`: enable logging of executed shell commands as warnings. -* `zabbix_agent(2)_listenport`: agent will listen on this port for connections from the server. -* `zabbix_agent2_statusport`: Agent will listen on this port for HTTP status requests. -* `zabbix_agent(2)_listenip`: list of comma delimited ip addresses that the agent should listen on. -* `zabbix_agent_startagents`: number of pre-forked instances of zabbix_agentd that process passive checks. -* `zabbix_agent(2)_hostname`: unique, case sensitive hostname. -* `zabbix_agent(2)_hostnameitem`: item used for generating hostname if it is undefined. -* `zabbix_agent(2)_hostmetadata`: optional parameter that defines host metadata. -* `zabbix_agent(2)_hostmetadataitem`: optional parameter that defines an item used for getting the metadata. -* `zabbix_agent(2)_refreshactivechecks`: how often list of active checks is refreshed, in seconds. -* `zabbix_agent(2)_buffersend`: do not keep data longer than n seconds in buffer. -* `zabbix_agent(2)_buffersize`: maximum number of values in a memory buffer. the agent will send all collected data to zabbix server or proxy if the buffer is full. -* `zabbix_agent2_enablepersistentbuffer`: 0 - disabled, in-memory buffer is used (default); 1 - use persistent buffer -* `zabbix_agent2_persistentbufferperiod`: Zabbix Agent2 will keep data for this time period in case of no connectivity with Zabbix server or proxy. Older data will be lost. Log data will be preserved. -* `zabbix_agent2_persistentbufferfile`: Zabbix Agent2 will keep SQLite database in this file * n is valid if `EnablePersistentBuffer=1` -* `zabbix_agent_maxlinespersecond`: maximum number of new lines the agent will send per second to zabbix server or proxy processing 'log' and 'logrt' active checks. -* `zabbix_agent_allowroot`: allow the agent to run as 'root'. if disabled and the agent is started by 'root', the agent will try to switch to user 'zabbix' instead. has no effect if started under a regular user. -* `zabbix_agent(2)_zabbix_alias`: sets an alias for parameter. it can be useful to substitute long and complex parameter name with a smaller and simpler one. Can be both a string as an list. -* `zabbix_agent(2)_timeout`: spend no more than timeout seconds on processing -* `zabbix_agent(2)_include`: you may include individual files or all files in a directory in the configuration file. -* `zabbix_agent(2)_include_pattern`: Optional file pattern used for included files. -* `zabbix_agent(2)_include_mode`: The mode for the directory mentioned above. -* `zabbix_agent(2)_unsafeuserparameters`: allow all characters to be passed in arguments to user-defined parameters. -* `zabbix_agent_loadmodulepath`: Full path to location of agent modules. -* `zabbix_agent_loadmodule`: Module to load at agent startup. Modules are used to extend functionality of the agent. -* `zabbix_agent2_controlsocket`: The control socket, used to send runtime commands with '-R' option. -* `zabbix_agent_allowroot`: Allow the agent to run as 'root'. 0 - do not allow, 1 - allow -* `zabbix_agent2_plugins`: A list containing plugin configuration. -* `zabbix_agent(2)_listenbacklog`: The maximum number of pending connections in the queue. +* `zabbix_agent_userparameters_templates_src`: indicates the relative path (from `templates/`) where userparameter templates are searched ## TLS Specific configuration +* `zabbix_agent_tlspsk_auto`: Enables auto generation and storing of individual pre-shared keys and identities on clients. Is false by default. If set to true and if `zabbix_agent_tlspskfile` and `zabbix_agent_tlspsk_secret` are undefined, it generates the files `/etc/zabbix/tls_psk_auto.identity` and `/etc/zabbix/tls_psk_auto.secret`, which are populated by values automatically (identity is set to hostname, underscore and 4 random alphanumeric digits; secret is 64 random alphanumeric digits) in such a way that the values are generated once and are never overwritten. -These variables are specific for Zabbix 3.0 and higher. When `(2)` is used in the name of the property, like `zabbix_agent(2)_tlsconnect`, it will show that you can configure `zabbix_agent_tlsconnect` for the Zabbix Agent configuration file and `zabbix_agent2_tlsconnect` for the Zabbix Agent 2 configuration file. - -* `zabbix_agent(2)_tlsconnect`: How the agent should connect to server or proxy. Used for active checks. +* `zabbix_agent_tlsconnect`: How the agent should connect to server or proxy. Used for active checks. Possible values: * unencrypted * psk * cert -* `zabbix_agent(2)_tlsaccept`: What incoming connections to accept. +* `zabbix_agent_tlsaccept`: What incoming connections to accept. Possible values: * unencrypted * psk * cert -* `zabbix_agent(2)_tlscafile`: Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. -* `zabbix_agent(2)_tlscrlfile`: Full pathname of a file containing revoked certificates. -* `zabbix_agent(2)_tlsservercertissuer`: Allowed server certificate issuer. -* `zabbix_agent(2)_tlsservercertsubject`: Allowed server certificate subject. -* `zabbix_agent(2)_tlscertfile`: Full pathname of a file containing the agent certificate or certificate chain. -* `zabbix_agent(2)_tlskeyfile`: Full pathname of a file containing the agent private key. -* `zabbix_agent(2)_tlspskidentity`: Unique, case sensitive string used to identify the pre-shared key. -* `zabbix_agent(2)_tlspskidentity_file`: Full pathname of a file containing the pre-shared key identity. -* `zabbix_agent(2)_tlspskfile`: Full pathname of a file containing the pre-shared key. -* `zabbix_agent(2)_tlspsk_secret`: The pre-shared secret key that should be placed in the file configured with `agent_tlspskfile`. -* `zabbix_agent(2)_tlspsk_auto`: Enables auto generation and storing of individual pre-shared keys and identities on clients. Is false by default. If set to true and if `zabbix_agent_tlspskfile` and `zabbix_agent_tlspsk_secret` are undefined, it generates the files `/etc/zabbix/tls_psk_auto.identity` and `/etc/zabbix/tls_psk_auto.secret`, which are populated by values automatically (identity is set to hostname, underscore and 4 random alphanumeric digits; secret is 64 random alphanumeric digits) in such a way that the values are generated once and are never overwritten. + +* `zabbix_agent_tlscafile`: Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. +* `zabbix_agent_tlscertfile`: Full pathname of a file containing the agent certificate or certificate chain. +* `zabbix_agent_tlscrlfile`: Full pathname of a file containing revoked certificates. +* `zabbix_agent_tlskeyfile`: Full pathname of a file containing the agent private key. +* `zabbix_agent_tlspskfile`: Full pathname of a file containing the pre-shared key. +* `zabbix_agent_tlspskidentity`: Unique, case sensitive string used to identify the pre-shared key. +* `zabbix_agent_tlspskidentity_file`: Full pathname of a file containing the pre-shared key identity. +* `zabbix_agent_tlspsk_secret`: The pre-shared secret key for the agent. +* `zabbix_agent_tlsservercertissuer`: Allowed server certificate issuer. +* `zabbix_agent_tlsservercertsubject`: Allowed server certificate subject. +* `zabbix_agent_tls_subject`: The subject of the TLS certificate. +* `zabbix_agent_visible_hostname` : Configure Zabbix visible name inside Zabbix web UI for the node. The results are stored in the Ansible variables `zabbix_agent_tlspskidentity` and `zabbix_agent_tlspsk_secret`, so that they may be used later in the code, for example with [zabbix_host](https://docs.ansible.com/ansible/latest/collections/community/zabbix/zabbix_host_module.html) to configure the Zabbix server or with `debug: msg:` to display them to the user. @@ -250,51 +184,49 @@ These variables need to be overridden when you want to make use of the Zabbix AP Host encryption configuration will be set to match agent configuration. -* `zabbix_api_server_host`: The IP or hostname/FQDN of Zabbix server. Example: zabbix.example.com -* `zabbix_api_use_ssl`: Is SSL required to connect to the Zabbix API server? Default: `false` -* `zabbix_api_server_port`: 80 if `zabbix_api_use_ssl` is `false` and 443 if `true` (Default) TCP port to use to connect to Zabbix server. Example: 8080 -* `zabbix_api_login_user`: Username of user which has API access. -* `zabbix_api_login_pass`: Password for the user which has API access. -* `zabbix_api_http_user`: The http user to access zabbix url with Basic Auth (if your Zabbix is behind a proxy with HTTP Basic Auth). -* `zabbix_api_http_password`: The http password to access zabbix url with Basic Auth (if your Zabbix is behind a proxy with HTTP Basic Auth). -* `zabbix_api_validate_certs`: yes (Default) if we need to validate tls certificates of the API. Use `no` in case self-signed certificates are used. -* `zabbix_api_timeout`: How many seconds to wait for API response (default 30s). -* `zabbix_api_create_hosts`: Default: `False`. When you want to enable the Zabbix API to create/delete the host. This has to be set to `True` if you want to make use of `zabbix_agent_host_state`. -* `zabbix_api_create_hostgroup`: When you want to enable the Zabbix API to create/delete the hostgroups. This has to be set to `True` if you want to make use of `zabbix_agent_hostgroups_state`.Default: `False` -* `ansible_zabbix_url_path`: URL path if Zabbix WebUI running on non-default (zabbix) path, e.g. if http://<FQDN>/zabbixeu then set to `zabbixeu` -* `zabbix_agent_hostgroups_state`: present (Default) if the hostgroup needs to be created or absent if you want to delete it. This only works when `zabbix_api_create_hostgroup` is set to `True`. -* `zabbix_host_status`: enabled (Default) when host in monitored, disabled when host is disabled for monitoring. +* `zabbix_agent_description`: Description of the host in Zabbix. * `zabbix_agent_host_state`: present (Default) if the host needs to be created or absent is you want to delete it. This only works when `zabbix_api_create_hosts` is set to `True`. * `zabbix_agent_host_update`: yes (Default) if the host should be updated if already present. This only works when `zabbix_api_create_hosts` is set to `True`. -* `zabbix_useuip`: 1 if connection to zabbix-agent is made via ip, 0 for fqdn. -* `zabbix_host_groups`: A list of hostgroups which this host belongs to. -* `zabbix_agent_link_templates`: A list of templates which needs to be link to this host. The templates should exist. +* `zabbix_agent_interfaces`: A list of interfaces and their configurations you can use when configuring via API. +* `zabbix_agent_inventory_mode`: Configure Zabbix inventory mode. Needed for building inventory data, manually when configuring a host or automatically by using some automatic population options. This has to be set to `automatic` if you want to make automatically building inventory data. Default `disabled` +* `zabbix_agent_inventory_zabbix`: Adds Facts for a zabbix inventory. Default `{}` +* `zabbix_agent_ip`: The IP address of the host. When not provided, it will be determined via the `ansible_default_ipv4` fact. +* `zabbix_agent_link_templates`: A list of templates which needs to be link to this host. The templates should exist. Default: "Templated Linux by Zabbix agent" * `zabbix_agent_macros`: A list with macro_key and macro_value for creating hostmacro's. +* `zabbix_agent_proxy`: The name of the Zabbix proxy (if used). Default `null` * `zabbix_agent_tags`: A list with tag and (optionally) value for creating host tags. -* `zabbix_agent_inventory_mode`: Configure Zabbix inventory mode. Needed for building inventory data, manually when configuring a host or automatically by using some automatic population options. This has to be set to `automatic` if you want to make automatically building inventory data. -* `zabbix_agent_visible_hostname` : Configure Zabbix visible name inside Zabbix web UI for the node. -* `zabbix_agent_description`: Description of the host in Zabbix. -* `zabbix_agent_inventory_zabbix`: Adds Facts for a zabbix inventory +* `zabbix_api_create_hostgroup`: When you want to enable the Zabbix API to create/delete the hostgroups. Default: `False` +* `zabbix_api_create_hosts`: Default: `False`. When you want to enable the Zabbix API to create/delete the host. This has to be set to `True` if you want to make use of `zabbix_agent_host_state`. +* `zabbix_api_http_password`: The http password to access zabbix url with Basic Auth (if your Zabbix is behind a proxy with HTTP Basic Auth). +* `zabbix_api_http_user`: The http user to access zabbix url with Basic Auth (if your Zabbix is behind a proxy with HTTP Basic Auth). +* `zabbix_api_login_pass`: Password for the user which has API access. +* `zabbix_api_login_user`: Username of user which has API access. +* `zabbix_api_server_host`: The IP or hostname/FQDN of Zabbix server. Example: zabbix.example.com +* `zabbix_api_server_port`: 80 if `zabbix_api_use_ssl` is `false` and 443 if `true` (Default) TCP port to use to connect to Zabbix server. Example: 8080 +* `zabbix_api_use_ssl`: Is SSL required to connect to the Zabbix API server? Default: `false` +* `zabbix_api_validate_certs`: `True` if we need to validate tls certificates of the API. Use `False` in case self-signed certificates are used. Default: `False` +* `zabbix_host_groups`: A list of hostgroups which this host belongs to. Default: "Linux Servers" +* `zabbix_host_status`: enabled (Default) when host in monitored, disabled when host is disabled for monitoring. +* `zabbix_useuip`: 1 if connection to zabbix-agent is made via ip, 0 for fqdn. ## Windows Variables **NOTE** -_Supporting Windows is a best effort (We don't have the possibility to either test/verify changes on the various amount of available Windows instances). PRs specific to Windows will almost immediately be merged, unless someone is able to provide a Windows test mechanism via Travis for Pull Requests._ -When `(2)` is used in the name of the property, like `zabbix_agent(2)_win_logfile`, it will show that you can configure `zabbix_agent_win_logfile` for the Zabbix Agent configuration file and `zabbix_agent2_win_logfile` for the Zabbix Agent 2 configuration file. +Supporting Windows is a best effort (We don't have the possibility to either test/verify changes on the various amount of available Windows instances). PRs specific to Windows will almost immediately be merged, unless someone is able to provide a Windows test mechanism via Travis for Pull Requests._ +When `` is used in the name of the property, like `zabbix_agent_win_logfile`, it will show that you can configure `zabbix_agent_win_logfile` for the Zabbix Agent configuration file and `zabbix_agent2_win_logfile` for the Zabbix Agent 2 configuration file. Otherwise it just for the Zabbix Agent or for the Zabbix Agent 2. -* `zabbix(2)_win_package`: file name pattern (zip only). This will be used to generate the `zabbix(2)_win_download_link` variable. -* `zabbix_version_long`: The long (major.minor.patch) version of the Zabbix Agent. This will be used to generate the `zabbix(2)_win_package` and `zabbix(2)_win_download_link` variables. This takes precedence over `zabbix_agent_version`. -* `zabbix(2)_win_download_link`: The download url to the `win.zip` file. +* `zabbix_agent_win_include`: The directory in which the Zabbix Agent specific configuration files are stored. +* `zabbix_agent_win_logfile`: The full path to the logfile for the Zabbix Agent. +* `zabbix_version_long`: The long (major.minor.patch) version of the Zabbix Agent. This will be used to generate the `zabbix_win_package` and `zabbix_win_download_link` variables. This takes precedence over `zabbix_agent_version`. +* `zabbix_win_download_link`: The download url to the `win.zip` file. +* `zabbix_win_firewall_management`: Enable Windows firewall management (add service and port to allow rules). Default: `True` * `zabbix_win_install_dir`: The directory where Zabbix needs to be installed. * `zabbix_win_install_dir_conf`: The directory where Zabbix configuration file needs to be installed. * `zabbix_win_install_dir_bin`: The directory where Zabbix binary file needs to be installed. -* `zabbix_agent(2)_win_logfile`: The full path to the logfile for the Zabbix Agent. -* `zabbix_agent_win_include`: The directory in which the Zabbix Agent specific configuration files are stored. -* `zabbix_agent_win_svc_recovery`: Enable Zabbix Agent service auto-recovery settings. -* `zabbix_win_firewall_management`: Enable Windows firewall management (add service and port to allow rules). Default: `True` +* `zabbix_win_package`: file name pattern (zip only). This will be used to generate the `zabbix_win_download_link` variable. ## macOS Variables @@ -302,8 +234,10 @@ Otherwise it just for the Zabbix Agent or for the Zabbix Agent 2. _Supporting Windows is a best effort (We don't have the possibility to either test/verify changes on the various amount of available Windows instances). PRs specific to Windows will almost immediately be merged, unless someone is able to provide a Windows test mechanism via Travis for Pull Requests._ -* `zabbix_version_long`: The long (major.minor.patch) version of the Zabbix Agent. This will be used to generate the `zabbix_mac_download_link` link. * `zabbix_mac_download_link`: The download url to the `pkg` file. +* `zabbix_mac_download_url`: The download url. Default `https://cdn.zabbix.com/zabbix/binaries/stable` +* `zabbix_mac_package`: The name of the mac install package. Default `zabbix_agent-{{ zabbix_version_long }}-macos-amd64-openssl.pkg` +* `zabbix_version_long`: The long (major.minor.patch) version of the Zabbix Agent. This will be used to generate the `zabbix_mac_download_link` link. ## Docker Variables @@ -324,19 +258,19 @@ The following directories are mounted in the Container: Keep in mind that using the Zabbix Agent in a Container requires changes to the Zabbix Template for Linux as `/proc`, `/sys` and `/etc` are mounted in a directory `/hostfs`. * `zabbix_agent_docker`: Default: `False`. When set to `True`, it will install a Docker container on the target host instead of installation on the target. -* `zabbix_agent_docker_state`: Default: `started` -* `zabbix_agent_docker_name`: The name of the Container. Default: `zabbix-agent` +* `zabbix_agent_docker_env`: A dict with all environment variables that needs to be set for the Container. * `zabbix_agent_docker_image`: The name of the Docker image. Default: `zabbix/zabbix-agent` * `zabbix_agent_docker_image_tag`: The tag of the Docker image. -* `zabbix_agent_docker_user_gid`: The group id of the zabbix user in the Container. -* `zabbix_agent_docker_user_uid`: The user id of the zabbix user in the Container. +* `zabbix_agent_docker_name`: The name of the Container. Default: `zabbix-agent` * `zabbix_agent_docker_network_mode`: The name of the (Docker) network that should be used for the Container. Default `host`. * `zabbix_agent_docker_restart_policy`: Default: `unless-stopped`. The restart policy of the Container. -* `zabbix_agent_docker_privileged`: When set to `True`, the container is running in privileged mode. -* `zabbix_agent_docker_ports`: A list with `<PORT>:<PORT>` values to open ports to the container. +* `zabbix_agent_docker_ports`: A list with `<PORT>:<PORT>` values to open ports to the container. Default `10050` +* `zabbix_agent_docker_privileged`: When set to `True`, the container is running in privileged mode. Default `false` * `zabbix_agent_docker_security_opts`: A list with available security options. +* `zabbix_agent_docker_state`: Default: `started` +* `zabbix_agent_docker_user_gid`: The group id of the zabbix user in the Container. +* `zabbix_agent_docker_user_uid`: The user id of the zabbix user in the Container. * `zabbix_agent_docker_volumes`: A list with all directories that needs to be available in the Container. -* `zabbix_agent_docker_env`: A dict with all environment variables that needs to be set for the Container. ## IPMI variables @@ -345,6 +279,77 @@ Keep in mind that using the Zabbix Agent in a Container requires changes to the * `zabbix_agent_ipmi_privilege`: IPMI privilege level. Possible values are 1 (callback), 2 (user), 3 (operator), 4 (admin), 5 (OEM), with 2 being the API default. * `zabbix_agent_ipmi_username`: IPMI username. +## Configuration Variables +The following table lists all variables that are exposed to modify the configuration of the zabbix_agent.conf file. Specific details of each variable can be found in the Zabbix documentation. + +**NOTE**: Only variables with a default value appear in the defaults file, all others must be added. + +| Zabbix Name | Variable Name | Default Value | Notes | +|-----------|------------------|--------|--------| +| Alias | zabbix_agent_aliases | | Can be a string or list | +| AllowKey | zabbix_agent_allowkeys | | | +| AllowRoot | zabbix_agent_allowroot | | Linux Systems Only | +| BufferSend | zabbix_agent_buffersend | 5 | | +| BufferSize | zabbix_agent_buffersize | 100 | | +| ControlSocket | zabbix_agent_controlsocket | /tmp/agent.sock | Agent 2 Only | +| DebugLevel | zabbix_agent_debuglevel | 3 | | +| DenyKey | zabbix_agent_denykeys | | Can be a string or a list | +| EnableRemoteCommands | zabbix_agent_enableremotecommands | 0 | Agent Only | +| ForceActiveChecksOnStart | zabbix_agent_forceactivechecksonstart | | Agent 2 Only | +| HeartbeatFrequency | zabbix_agent_heartbeatfrequency | 60 | Version >= 6.2 | +| HostInterface | zabbix_agent_hostinterface | | | +| HostInterfaceItem | zabbix_agent_hostinterfaceitem | | | +| HostMetadata | zabbix_agent_hostmetadata | | | +| HostMetadataItem | zabbix_agent_hostmetadataitem | | | +| Hostname | zabbix_agent_hostname | | `{{ inventory_hostname }}` | +| HostnameItem | zabbix_agent_hostnameitem | | | +| Include | zabbix_agent_include | /etc/zabbix/`{ agent version specific }`.d | | +| ListenBacklog | zabbix_agent_listenbacklog | | Agent Only | +| ListenIP | zabbix_agent_listenip | | list of IPs | +| ListenPort | zabbix_agent_listenport | 10050 | | +| LoadModule | zabbix_agent_loadmodule | | Agent On Linux Only | +| LoadModulePath | zabbix_agent_loadmodulepath | | Agent On Linux Only | +| LogFile | zabbix_agent_logfile | /var/log/zabbix/`{ agent version specific }`.log | | +| LogFileSize | zabbix_agent_logfilesize | 100 | | +| LogRemoteCommands | zabbix_agent_logremotecommands | | Agent Only | +| LogType | zabbix_agent_logtype | file | | +| MaxLinesPerSecond | zabbix_agent_maxlinespersecond | | Agent Only | +| PerfCounter | zabbix_agent_perfcounter | | Agent Only | +| PerfCounterEn | zabbix_agent_perfcounteren | | Agent Only | +| PersistentBufferFile | zabbix_agent_persistentbufferfile | | Agent 2 Only | +| PersistentBufferPeriod | zabbix_agent_persistentbufferperiod | 1h | Agent 2 Only | +| PidFile | zabbix_agent_pidfile | /var/run/zabbix/`{ agent version specific }`.pid | Linux Systems Only | +| Plugin | zabbix_agent_plugins | | | +| PluginSocket | zabbix_agent_pluginsocket | | | +| PluginTimeout | zabbix_agent_plugintimeout | | | +| RefreshActiveChecks | zabbix_agent_refreshactivechecks | 120 | | +| Server | zabbix_agent_server | | | +| ServerActive | zabbix_agent_serveractive | | | +| SourceIP | zabbix_agent_sourceip | | | +| StartAgents | zabbix_agent_startagents | | Agent Only | +| StatusPort | zabbix_agent_statusport | 9999 | Agent 2 Only | +| Timeout | zabbix_agent_timeout | 3 | | +| TLSAccept | zabbix_agent_tlsconnect | | | +| TLSCAFile | zabbix_agent_tlscafile | /etc/zabbix/tls_psk_auto.secret | | +| TLSCertFile | zabbix_agent_tlscertfile | | | +| TLSCipherAll | zabbix_agent_tlscipherall | | Agent on Linux Only | +| TLSCipherAll13 | zabbix_agent_tlscipherall13 | | Agent on Linux Only | +| TLSCipherCert | zabbix_agent_tlsciphercert | | Agent on Linux Only | +| TLSCipherCert13 | zabbix_agent_tlsciphercert13 | | Agent on Linux Only | +| TLSCipherPSK | zabbix_agent_tlscipherpsk | | Agent on Linux Only | +| TLSCipherPSK13 | zabbix_agent_tlscipherpsk13 | | Agent on Linux Only | +| TLSConnect | zabbix_agent_tlsconnect | | | +| TLSCRLFile | zabbix_agent_tlscrlfile | | | +| TLSKeyFile | zabbix_agent_tlskeyfile | | | +| TLSPSKFile | zabbix_agent_tlspskfile | | | +| TLSPSKIdentity | zabbix_agent_tlspskidentity | | | +| TLSServerCertIssuer | zabbix_agent_tlsservercertissuer | | | +| TLSServerCertSubject | zabbix_agent_tlsservercertsubject | | | +| UnsafeUserParameters | zabbix_agent_unsafeuserparameters | | | +| User | zabbix_agent_runas_user | | Agent on Linux Only | +| UserParameter | zabbix_agent_userparamater | 0 | | + + ## proxy When the target host does not have access to the internet, but you do have a proxy available then the following properties needs to be set to download the packages via the proxy: @@ -369,18 +374,6 @@ There are no dependencies on other roles. # Example Playbook -## zabbix_agent2_plugins - -Specifically for the Zabbix Agent 2, a list of extra plugins can be configured. The following provides an overview of configuring the `SystemRun` plugin by setting the `LogRemoteCommands` to `0`: - -```yaml -zabbix_agent2_plugins: - - name: SystemRun - options: - - parameter: LogRemoteCommands - value: 0 -``` - In the `zabbix_agent2.conf` an entry will be created with the following content: ``` diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/defaults/main.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/defaults/main.yml index 12424a6da..219182e96 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/defaults/main.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/defaults/main.yml @@ -2,27 +2,19 @@ # defaults file for zabbix_agent zabbix_agent2: false -# zabbix_agent_version: 6.4 zabbix_agent_version_minor: "*" zabbix_version_patch: 0 zabbix_agent_package_remove: false -zabbix_agent_package: zabbix-agent -zabbix_sender_package: zabbix-sender -zabbix_get_package: zabbix-get +zabbix_sender_package: zabbix-sender # Depricate in 3.0 +zabbix_agent_sender_package: "{{ zabbix_sender_package }}" +zabbix_get_package: zabbix-get # Depricate in 3.0 +zabbox_agent_get_package: "{{ zabbix_get_package }}" zabbix_agent_package_state: present -zabbix_agent_server: -zabbix_agent_serveractive: -zabbix_agent2_server: "{{ zabbix_agent_server }}" -zabbix_agent2_serveractive: "{{ zabbix_agent_serveractive }}" zabbix_selinux: false -zabbix_agent_apt_priority: zabbix_agent_conf_mode: "0644" zabbix_agent_dont_detect_ip: false -zabbix_agent_allow_key: [] -zabbix_agent_deny_key: [] -zabbix_agent2_allow_key: "{{ zabbix_agent_allow_key }}" -zabbix_agent2_deny_key: "{{ zabbix_agent_deny_key }}" +zabbix_agent_tlspskidentity_file: "/etc/zabbix/tls_psk_auto.identity" # Selinux related vars selinux_allow_zabbix_run_sudo: false @@ -30,18 +22,12 @@ zabbix_repo_deb_gpg_key_url: http://repo.zabbix.com/zabbix-official-repo.key zabbix_repo_deb_include_deb_src: true zabbix_agent_install_agent_only: false -zabbix_agent_packages: - - "{{ zabbix_agent_package }}" - - "{{ zabbix_sender_package }}" - - "{{ zabbix_get_package }}" # Zabbix role related vars zabbix_apt_force_apt_get: true zabbix_apt_install_recommends: false # Override Ansible specific facts -zabbix_agent_distribution_major_version: "{{ ansible_distribution_major_version }}" -zabbix_agent_distribution_release: "{{ ansible_distribution_release }}" zabbix_repo_yum_gpgcheck: 0 zabbix_repo_yum_schema: https zabbix_agent_disable_repo: @@ -49,21 +35,21 @@ zabbix_agent_disable_repo: zabbix_repo_yum: - name: zabbix description: Zabbix Official Repository - $basearch - baseurl: "{{ zabbix_repo_yum_schema }}://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}/rhel/{{ zabbix_agent_distribution_major_version }}/$basearch/" + baseurl: "{{ zabbix_repo_yum_schema }}://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}/rhel/{{ ansible_distribution_major_version }}/$basearch/" mode: "0644" gpgcheck: "{{ zabbix_repo_yum_gpgcheck }}" gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX state: present - name: zabbix-non-supported description: Zabbix Official Repository non-supported - $basearch - baseurl: "{{ zabbix_repo_yum_schema }}://repo.zabbix.com/non-supported/rhel/{{ zabbix_agent_distribution_major_version }}/$basearch/" + baseurl: "{{ zabbix_repo_yum_schema }}://repo.zabbix.com/non-supported/rhel/{{ ansible_distribution_major_version }}/$basearch/" mode: "0644" gpgcheck: "{{ zabbix_repo_yum_gpgcheck }}" gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX state: present - name: zabbix-agent2-plugins description: Zabbix Official Repository (Agent2 Plugins) - $basearch - baseurl: "{{ zabbix_repo_yum_schema }}://repo.zabbix.com/zabbix-agent2-plugins/1/rhel/{{ zabbix_agent_distribution_major_version }}/$basearch/" + baseurl: "{{ zabbix_repo_yum_schema }}://repo.zabbix.com/zabbix-agent2-plugins/1/rhel/{{ ansible_distribution_major_version }}/$basearch/" mode: "0644" gpgcheck: "{{ zabbix_repo_yum_gpgcheck }}" gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX @@ -74,7 +60,6 @@ zabbix_repo_deb_component: main # Zabbix API stuff zabbix_api_server_host: localhost -# zabbix_api_server_port: 80 zabbix_api_login_user: Admin zabbix_api_use_ssl: false zabbix_api_login_pass: !unsafe zabbix @@ -82,10 +67,10 @@ zabbix_api_validate_certs: false ansible_httpapi_pass: "{{ zabbix_api_login_pass }}" ansible_httpapi_port: "{{ zabbix_api_server_port }}" ansible_httpapi_validate_certs: "{{ zabbix_api_validate_certs }}" -zabbix_api_timeout: 30 + +# API Related Variables zabbix_api_create_hostgroup: false zabbix_api_create_hosts: false -zabbix_agent_hostgroups_state: present # or absent zabbix_agent_host_state: present # or absent zabbix_agent_host_update: true zabbix_host_status: enabled # or disabled @@ -106,67 +91,19 @@ zabbix_agent_interfaces: port: "{{ (zabbix_agent2 == True) | ternary(zabbix_agent2_listenport, zabbix_agent_listenport) }}" # Zabbix configuration variables -zabbix_agent_pidfile: /var/run/zabbix/zabbix_agentd.pid -zabbix_agent_logtype: file -zabbix_agent_logfile: /var/log/zabbix/zabbix_agentd.log -zabbix_agent_logfilesize: 100 -zabbix_agent_debuglevel: 3 -zabbix_agent_sourceip: -zabbix_agent_enableremotecommands: 0 -zabbix_agent_allowkeys: -zabbix_agent_denykeys: -zabbix_agent_logremotecommands: 0 -zabbix_agent_listenport: 10050 -zabbix_agent_jmx_listenport: zabbix_agent_listeninterface: -zabbix_agent_listenip: -zabbix_agent_startagents: 3 -zabbix_agent_hostname: "{{ inventory_hostname }}" -zabbix_agent_hostnameitem: -zabbix_agent_hostmetadata: -zabbix_agent_hostmetadataitem: -zabbix_agent_refreshactivechecks: 120 -zabbix_agent_buffersend: 5 -zabbix_agent_buffersize: 100 -zabbix_agent_maxlinespersecond: 100 -zabbix_agent_allowroot: 0 -zabbix_agent_zabbix_alias: -zabbix_agent_timeout: 3 -zabbix_agent_include: /etc/zabbix/zabbix_agentd.d -zabbix_agent_include_pattern: -zabbix_agent_include_mode: "0750" -zabbix_agent_unsafeuserparameters: 0 -zabbix_agent_userparameters: [] + +# statusportzabbix_agent_zabbix_alias: # Deprecate after 3.0 +zabbix_agent_alias: "{{ statusportzabbix_agent_zabbix_alias is defined | ternary(statusportzabbix_agent_zabbix_alias, zabbix_agent_alias) | default(omit) }}" zabbix_agent_userparameters_templates_src: "userparameters" zabbix_agent_userparameters_scripts_src: "scripts" -zabbix_agent_custom_scripts: false -zabbix_agent_loadmodulepath: ${libdir}/modules -zabbix_agent_loadmodule: -zabbix_agent_become_on_localhost: true -zabbix_agent_description: -zabbix_agent_inventory_zabbix: {} -zabbix_agent_heartbeatfrequency: 60 -zabbix_agent_macros: [] -zabbix_agent_tags: [] zabbix_agent_chassis: false -# TLS settings -zabbix_agent_tlsconnect: -zabbix_agent_tlsaccept: -zabbix_agent_tlscafile: -zabbix_agent_tlscrlfile: -zabbix_agent_tlsservercertissuer: -zabbix_agent_tlsservercertsubject: -zabbix_agent_tls_subject: "{{ zabbix_agent_tlsservercertsubject }}" # FIXME this is not correct and should be removed with 2.0.0, here only to prevent regression -zabbix_agent_tlscertfile: -zabbix_agent_tlskeyfile: -zabbix_agent_tlspskidentity: -zabbix_agent_tlspsk_auto: false - zabbix_agent_tls_config: unencrypted: "1" psk: "2" - cert: "4" + cert: + "4" # IPMI settings zabbix_agent_ipmi_authtype: -1 @@ -174,66 +111,22 @@ zabbix_agent_ipmi_password: zabbix_agent_ipmi_privilege: 2 zabbix_agent_ipmi_username: -# Zabbix Agent2 -zabbix_agent2_pidfile: /var/run/zabbix/zabbix_agent2.pid -zabbix_agent2_logfile: /var/log/zabbix/zabbix_agent2.log -zabbix_agent2_logtype: file -zabbix_agent2_statusport: 9999 -zabbix_agent2_include: /etc/zabbix/zabbix_agent2.d -zabbix_agent2_include_pattern: -zabbix_agent2_logfilesize: 100 -zabbix_agent2_debuglevel: 3 -zabbix_agent2_sourceip: -zabbix_agent2_listenport: 10050 -zabbix_agent2_listenip: -zabbix_agent2_hostname: "{{ inventory_hostname }}" -zabbix_agent2_hostnameitem: -zabbix_agent2_hostmetadata: -zabbix_agent2_hostmetadataitem: -zabbix_agent2_hostinterface: -zabbix_agent2_hostinterfaceitem: -zabbix_agent2_enablepersistentbuffer: 0 -zabbix_agent2_persistentbufferperiod: 1h -zabbix_agent2_persistentbufferfile: -zabbix_agent2_refreshactivechecks: 120 -zabbix_agent2_buffersend: 5 -zabbix_agent2_buffersize: 100 -zabbix_agent2_zabbix_alias: -zabbix_agent2_timeout: 3 -zabbix_agent2_include_mode: "0750" -zabbix_agent2_unsafeuserparameters: 0 -zabbix_agent2_controlsocket: /tmp/agent.sock -zabbix_agent2_plugins: [] +####### Agent 1 Stuff Only -# Zabbix Agent2 TLS settings -zabbix_agent2_tlsconnect: -zabbix_agent2_tlsaccept: -zabbix_agent2_tlscafile: -zabbix_agent2_tlscrlfile: -zabbix_agent2_tlsservercertissuer: -zabbix_agent2_tlsservercertsubject: -zabbix_agent2_tls_subject: "{{ zabbix_agent2_tlsservercertsubject }}" # FIXME this is not correct and should be removed with 2.0.0, here only to prevent regression -zabbix_agent2_tlscertfile: -zabbix_agent2_tlskeyfile: -zabbix_agent2_tlspskidentity: -zabbix_agent2_tlspsk_auto: false +zabbix_agent_loadmodulepath: ${libdir}/modules +zabbix_agent_logremotecommands: 0 +zabbix_agent_maxlinespersecond: 100 +zabbix_agent_startagents: 3 # Windows/macOS Related zabbix_version_long: 5.2.4 # Windows Related -zabbix_win_package: zabbix_agent-{{ zabbix_version_long }}-windows-amd64-openssl.zip -zabbix2_win_package: zabbix_agent2-{{ zabbix_version_long }}-windows-amd64-openssl-static.zip zabbix_win_download_url: https://cdn.zabbix.com/zabbix/binaries/stable -zabbix_win_download_link: "{{ zabbix_win_download_url }}/{{ zabbix_version_long | regex_search('^\\d+\\.\\d+') }}/{{ zabbix_version_long }}/{{ zabbix_win_package }}" -zabbix2_win_download_link: "{{ zabbix_win_download_url }}/{{ zabbix_version_long | regex_search('^\\d+\\.\\d+') }}/{{ zabbix_version_long }}/{{ zabbix2_win_package }}" zabbix_win_install_dir: 'C:\Zabbix' zabbix_win_install_dir_conf: '{{ zabbix_win_install_dir }}\\conf' zabbix_win_install_dir_bin: '{{ zabbix_win_install_dir }}\\bin' -zabbix_agent_win_logfile: "{{ zabbix_win_install_dir }}\\zabbix_agentd.log" zabbix_agent_win_include: "{{ zabbix_win_install_dir }}\\zabbix_agent.d\\" -zabbix_agent2_win_logfile: "{{ zabbix_win_install_dir }}\\zabbix_agent2.log" -zabbix_agent_win_svc_recovery: true zabbix_win_firewall_management: true # macOS Related diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Debian.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Debian.yml index 92d56b179..940f1e2f0 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Debian.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Debian.yml @@ -38,7 +38,7 @@ (ansible_distribution == "Debian" and ansible_distribution_major_version < "12") - name: "Debian | Download gpg key" - when: not ansible_check_mode # Because get_url always has changed status in check_mode. + when: not ansible_check_mode # Because get_url always has changed status in check_mode. ansible.builtin.get_url: url: "{{ zabbix_repo_deb_gpg_key_url }}" dest: "{{ zabbix_gpg_key }}" @@ -69,29 +69,28 @@ tags: - install -- name: "Debian | Create /etc/apt/preferences.d/" - ansible.builtin.file: - path: /etc/apt/preferences.d/ - state: directory - mode: "0755" +- name: Configure APT Prefrence when: + - zabbix_agent_apt_priority is defined - zabbix_agent_apt_priority | int - become: true - tags: - - install + block: + - name: "Debian | Create /etc/apt/preferences.d/" + ansible.builtin.file: + path: /etc/apt/preferences.d/ + state: directory + mode: "0755" + become: true -- name: "Debian | Configuring the weight for APT" - ansible.builtin.copy: - dest: "/etc/apt/preferences.d/zabbix-agent-{{ zabbix_underscore_version }}" - content: | - Package: {{ zabbix_agent_package }} - Pin: origin repo.zabbix.com - Pin-Priority: {{ zabbix_agent_apt_priority | int }} - owner: root - mode: "0644" - when: - - zabbix_agent_apt_priority | int - become: true + - name: "Debian | Configuring the weight for APT" + ansible.builtin.copy: + dest: "/etc/apt/preferences.d/zabbix-agent-{{ zabbix_underscore_version }}" + content: | + Package: {{ zabbix_agent_package }} + Pin: origin repo.zabbix.com + Pin-Priority: {{ zabbix_agent_apt_priority | int }} + owner: root + mode: "0644" + become: true tags: - install @@ -115,8 +114,8 @@ - name: "Debian | Installing zabbix-{sender,get}" ansible.builtin.apt: pkg: - - "{{ zabbix_sender_package }}" - - "{{ zabbix_get_package }}" + - "{{ zabbix_agent_sender_package }}" + - "{{ zabbox_agent_get_package }}" state: "{{ zabbix_agent_package_state }}" update_cache: true cache_valid_time: 0 diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Linux.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Linux.yml index c4c8fc401..aa8bca132 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Linux.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Linux.yml @@ -20,10 +20,6 @@ - name: "Set first public ip address for zabbix_agent_ip" ansible.builtin.set_fact: zabbix_agent_ip: "{{ ansible_all_ipv4_addresses | ansible.netcommon.ipaddr('public') | first }}" - zabbix_agent_server: "{{ zabbix_agent_server_public_ip | default(zabbix_agent_server) }}" - zabbix_agent_serveractive: "{{ zabbix_agent_serveractive_public_ip | default(zabbix_agent_serveractive) }}" - zabbix_agent2_server: "{{ zabbix_agent_server_public_ip | default(zabbix_agent2_server) }}" - zabbix_agent2_serveractive: "{{ zabbix_agent_serveractive_public_ip | default(zabbix_agent2_serveractive) }}" when: - zabbix_agent_ip is not defined - total_private_ip_addresses is defined @@ -55,7 +51,7 @@ network_interface: ansible_{{ zabbix_agent_listeninterface }} when: - (zabbix_agent_listeninterface) - - not zabbix_agent_listenip + - zabbix_agent_listenip is undefined tags: - config @@ -64,7 +60,7 @@ zabbix_agent_listenip: "{{ hostvars[inventory_hostname][network_interface]['ipv4'].address | default('0.0.0.0') }}" when: - (zabbix_agent_listeninterface) - - not zabbix_agent_listenip + - zabbix_agent_listenip is undefined tags: - config - api @@ -73,7 +69,7 @@ ansible.builtin.set_fact: zabbix_agent_listenip: "0.0.0.0" when: - - not (zabbix_agent_listenip) + - zabbix_agent_listenip is undefined tags: - config @@ -120,8 +116,8 @@ - name: "Configure zabbix-agent" ansible.builtin.template: - src: "{{ 'zabbix_agentd.conf.j2' if not zabbix_agent2 else 'zabbix_agent2.conf.j2' }}" - dest: "/etc/zabbix/{{ zabbix_agent_conf if not zabbix_agent2 else zabbix_agent2_conf }}" + src: agent.conf.j2 + dest: "/etc/zabbix/zabbix_agent{{ (zabbix_agent2 | bool) | ternary('2', 'd') }}.conf" owner: root group: root mode: "{{ zabbix_agent_conf_mode }}" @@ -133,74 +129,12 @@ tags: - config -- name: "Create directory for PSK file if not exist." - ansible.builtin.file: - path: "{{ zabbix_agent_tlspskfile | dirname }}" - mode: 0755 - state: directory - become: true - when: - - zabbix_agent_tlspskfile is defined - - zabbix_agent_tlspskfile # https://github.com/ansible-collections/community.zabbix/issues/680 - - not (zabbix_agent2 | bool) - tags: - - config - -- name: "Create directory for PSK file if not exist (zabbix-agent2)" - ansible.builtin.file: - path: "{{ zabbix_agent2_tlspskfile | dirname }}" - mode: 0755 - state: directory - become: true - when: - - zabbix_agent2_tlspskfile is defined - - zabbix_agent2_tlspskfile # https://github.com/ansible-collections/community.zabbix/issues/680 - - zabbix_agent2 | bool - tags: - - config - -- name: "Place TLS PSK File" - ansible.builtin.copy: - dest: "{{ zabbix_agent_tlspskfile }}" - content: "{{ zabbix_agent_tlspsk_secret }}" - owner: zabbix - group: zabbix - mode: 0400 - become: true - when: - - zabbix_agent_tlspskfile is defined - - zabbix_agent_tlspskfile # https://github.com/ansible-collections/community.zabbix/issues/680 - - zabbix_agent_tlspsk_secret is defined - - not (zabbix_agent2 | bool) - notify: - - restart zabbix-agent - tags: - - config - -- name: "Place TLS PSK File (zabbix-agent2)" - ansible.builtin.copy: - dest: "{{ zabbix_agent2_tlspskfile }}" - content: "{{ zabbix_agent2_tlspsk_secret }}" - owner: zabbix - group: zabbix - mode: 0400 - become: true - when: - - zabbix_agent2_tlspskfile is defined - - zabbix_agent2_tlspskfile # https://github.com/ansible-collections/community.zabbix/issues/680 - - zabbix_agent2_tlspsk_secret is defined - - zabbix_agent2 | bool - notify: - - restart zabbix-agent - tags: - - config - - name: "Create include dir zabbix-agent" ansible.builtin.file: - path: "{{ zabbix_agent_include if not zabbix_agent2 else zabbix_agent2_include }}" + path: "{{ zabbix_agent_include }}" owner: root group: zabbix - mode: "{{ zabbix_agent_include_mode if not zabbix_agent2 else zabbix_agent2_include_mode }}" + mode: "{{ zabbix_agent_include_mode }}" state: directory become: true tags: @@ -234,6 +168,8 @@ owner: root group: zabbix become: true - when: zabbix_agent_chassis | bool + when: + - zabbix_agent_chassis is defined + - zabbix_agent_chassis | bool tags: - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Windows.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Windows.yml index 9b7501d9a..2f9758249 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Windows.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Windows.yml @@ -1,4 +1,10 @@ --- +- name: "Windows | Set some variables" + ansible.builtin.set_fact: + zabbix_agent_win_download_link: "{{ zabbix_agent_win_download_link is defined | ternary(zabbix_agent_win_download_link, zabbix_agent2_win_download_link) | default(_win_download_link) }}" + zabbix_agent_win_logfile: "{{ zabbix_agent_win_logfile is defined | ternary(zabbix_agent_win_logfile, zabbix_agent2_win_logfile) | default(_win_logfile) }}" + zabbix_agent_win_package: "{{ zabbix_agent_win_package is defined | ternary(zabbix_agent_win_package, zabbix_agent2_win_package) | default(_win_package) }}" + - name: "Windows | Set default architecture" ansible.builtin.set_fact: windows_arch: 32 @@ -26,7 +32,7 @@ zabbix_win_config_name: "zabbix_agentd.conf" zabbix2_win_svc_name: Zabbix Agent 2 zabbix2_win_exe_path: '{{ zabbix_win_install_dir }}\bin\zabbix_agent2.exe' - zabbix2_win_config_name: "zabbix_agent2.conf" + zabbix2_win_config_name: "zabbix_agentd2.conf" tags: - always @@ -288,56 +294,6 @@ tags: - install -- name: "Create directory for PSK file if not exist." - ansible.windows.win_file: - path: "{{ zabbix_agent_tlspskfile | win_dirname }}" - state: directory - when: - - zabbix_agent_tlspskfile is defined - - zabbix_agent_tlspskfile - - not (zabbix_agent2 | bool) - tags: - - config - -- name: "Create directory for PSK file if not exist (zabbix-agent2)" - ansible.windows.win_file: - path: "{{ zabbix_agent2_tlspskfile | win_dirname }}" - state: directory - when: - - zabbix_agent2_tlspskfile is defined - - zabbix_agent2_tlspskfile - - zabbix_agent2 | bool - tags: - - config - -- name: "Place TLS PSK File" - ansible.windows.win_copy: - dest: "{{ zabbix_agent_tlspskfile }}" - content: "{{ zabbix_agent_tlspsk_secret }}" - when: - - zabbix_agent_tlspskfile is defined - - zabbix_agent_tlspskfile - - zabbix_agent_tlspsk_secret is defined - - not (zabbix_agent2 | bool) - notify: - - restart win zabbix agent - tags: - - config - -- name: "Place TLS PSK File (zabbix-agent2)" - ansible.windows.win_copy: - dest: "{{ zabbix_agent2_tlspskfile }}" - content: "{{ zabbix_agent2_tlspsk_secret }}" - when: - - zabbix_agent2_tlspskfile is defined - - zabbix_agent2_tlspskfile - - zabbix_agent2_tlspsk_secret is defined - - zabbix_agent2 | bool - notify: - - restart win zabbix agent - tags: - - config - - name: "Windows | Check if windows service exist" ansible.windows.win_service: name: "{{ zabbix_win_svc_name }}" diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Windows_conf.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Windows_conf.yml index 72dee230f..cc7c09d50 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Windows_conf.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/Windows_conf.yml @@ -1,4 +1,9 @@ --- +- name: "Set Log File Info" + ansible.builtin.set_fact: + zabbix_agent_logfile: "{{ zabbix_agent_win_logfile is defined | ternary(zabbix_agent_win_logfile, zabbix_agent2_win_logfile) | default(_win_logfile) }}" + when: zabbix_agent_logfile is undefined + - name: "Set default ip address for zabbix_agent_ip" ansible.builtin.set_fact: zabbix_agent_ip: "{{ hostvars[inventory_hostname]['ansible_ip_addresses'] | ansible.utils.ipv4 | first }}" diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/api.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/api.yml index 4de342645..0013f1783 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/api.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/api.yml @@ -1,8 +1,8 @@ --- - name: "API | Create host groups" community.zabbix.zabbix_group: - host_group: "{{ zabbix_host_groups }}" - state: "{{ zabbix_agent_hostgroups_state }}" + host_groups: "{{ zabbix_host_groups }}" + state: present when: - zabbix_api_create_hostgroup | bool register: zabbix_api_hostgroup_created @@ -35,43 +35,7 @@ ipmi_password: "{{ zabbix_agent_ipmi_password| default(omit) }}" ipmi_privilege: "{{ zabbix_agent_ipmi_privilege | default(omit) }}" ipmi_username: "{{ zabbix_agent_ipmi_username | default(omit) }}" - tags: "{{ zabbix_agent_tags }}" - when: - - not zabbix_agent2 - register: zabbix_api_host_created - until: zabbix_api_host_created is succeeded - delegate_to: "{{ zabbix_api_server_host }}" - changed_when: false - tags: - - api - -- name: "API | Create a new host using agent2 or update an existing host's info" - community.zabbix.zabbix_host: - host_name: "{{ zabbix_agent2_hostname }}" - host_groups: "{{ zabbix_host_groups }}" - link_templates: "{{ zabbix_agent_link_templates }}" - status: "{{ zabbix_host_status }}" - state: "{{ zabbix_agent_host_state }}" - force: "{{ zabbix_agent_host_update }}" - proxy: "{{ zabbix_agent_proxy }}" - inventory_mode: "{{ zabbix_agent_inventory_mode }}" - interfaces: "{{ zabbix_agent_interfaces }}" - visible_name: "{{ zabbix_agent_visible_hostname | default(zabbix_agent2_hostname) }}" - tls_psk: "{{ zabbix_agent2_tlspsk_secret | default(omit) }}" - tls_psk_identity: "{{ zabbix_agent2_tlspskidentity | default(omit) }}" - tls_issuer: "{{ zabbix_agent2_tlsservercertissuer | default(omit) }}" - tls_subject: "{{ zabbix_agent2_tls_subject | default(omit) }}" - tls_accept: "{{ zabbix_agent_tls_config[zabbix_agent2_tlsaccept if zabbix_agent2_tlsaccept else 'unencrypted'] }}" - tls_connect: "{{ zabbix_agent_tls_config[zabbix_agent2_tlsconnect if zabbix_agent2_tlsconnect else 'unencrypted'] }}" - description: "{{ zabbix_agent_description | default(omit) }}" - inventory_zabbix: "{{ zabbix_agent_inventory_zabbix | default({}) }}" - ipmi_authtype: "{{ zabbix_agent_ipmi_authtype | default(omit) }}" - ipmi_password: "{{ zabbix_agent_ipmi_password| default(omit) }}" - ipmi_privilege: "{{ zabbix_agent_ipmi_privilege | default(omit) }}" - ipmi_username: "{{ zabbix_agent_ipmi_username | default(omit) }}" - tags: "{{ zabbix_agent_tags }}" - when: - - zabbix_agent2 | bool + tags: "{{ zabbix_agent_tags | default(omit) }}" register: zabbix_api_host_created until: zabbix_api_host_created is succeeded delegate_to: "{{ zabbix_api_server_host }}" @@ -81,13 +45,12 @@ - name: "API | Updating host configuration with macros" community.zabbix.zabbix_hostmacro: - host_name: "{{ (zabbix_agent2 | bool) | ternary(zabbix_agent2_hostname, zabbix_agent_hostname) }}" + host_name: "{{ zabbix_agent_hostname }}" macro_name: "{{ item.macro_key }}" macro_value: "{{ item.macro_value }}" macro_type: "{{ item.macro_type|default('text') }}" with_items: "{{ zabbix_agent_macros | default([]) }}" when: - - zabbix_agent_macros is defined - item.macro_key is defined register: zabbix_api_hostmarcro_created until: zabbix_api_hostmarcro_created is succeeded diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/main.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/main.yml index c5fd06480..f6bbd0f2a 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/main.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/main.yml @@ -21,41 +21,89 @@ tags: - always +- name: Load Appropriate Defaults + ansible.builtin.include_vars: "agent{{ '2' if zabbix_agent2 is defined and zabbix_agent2|bool }}_vars.yml" + +- name: Set Variables + ansible.builtin.set_fact: + zabbix_agent_include: "{{ zabbix_agent_include is defined | ternary(zabbix_agent_include, zabbix_agent2_include) | default(_include) }}" + zabbix_agent_logfile: "{{ zabbix_agent_logfilee is defined | ternary(zabbix_agent_logfile, zabbix_agent2_logfile) | default(_logfile) }}" + zabbix_agent_package: "{{ zabbix_agent_package is defined | ternary(zabbix_agent_package, zabbix_agent2_package) | default(_agent_package) }}" + zabbix_agent_pidfile: "{{ zabbix_agent_pidfile is defined | ternary(zabbix_agent_pidfile, zabbix_agent2_pidfile) | default(_pidfile) }}" + zabbix_agent_service: "{{ zabbix_agent_service is defined | ternary(zabbix_agent_service, zabbix_agent2_service) | default(_agent_service) }}" + zabbix_agent_tls_subject: "{{ zabbix_agent_tls_subject is defined | ternary(zabbix_agent_tls_subject, zabbix_agent2_tls_subject) | default(_tls_subject) }}" + +- name: Set More Varaibles # Move to defaults after 3.0 + ansible.builtin.set_fact: + zabbix_agent_buffersend: "{{ zabbix_agent_buffersend is defined | ternary(zabbix_agent_buffersend, zabbix_agent2_buffersend) | default(5) }}" + zabbix_agent_buffersize: "{{ zabbix_agent_buffersize is defined | ternary(zabbix_agent_buffersize, zabbix_agent2_buffersize) | default(100) }}" + zabbix_agent_controlsocket: "{{ zabbix_agent_controlsocket is defined | ternary(zabbix_agent_controlsocket, zabbix_agent2_controlsocket) | default('/tmp/agent.sock') }}" + zabbix_agent_debuglevel: "{{ zabbix_agent_debuglevel is defined | ternary(zabbix_agent_debuglevel, zabbix_agent2_debuglevel) | default(3) }}" + zabbix_agent_enableremotecommands: "{{ zabbix_agent_enableremotecommands is defined | ternary(zabbix_agent_enableremotecommands, zabbix_agent2_enableremotecommands) | default(0) }}" + zabbix_agent_heartbeatfrequency: "{{ zabbix_agent_heartbeatfrequency is defined | ternary(zabbix_agent_heartbeatfrequency, zabbix_agent2_heartbeatfrequency) | default(60) }}" + zabbix_agent_hostname: "{{ zabbix_agent_hostname is defined | ternary(zabbix_agent_hostname, zabbix_agent2_hostname) | default(inventory_hostname) }}" + zabbix_agent_include_mode: "{{ zabbix_agent_include_mode is defined | ternary(zabbix_agent_include_mode, zabbix_agent2_include_mode) | default('0750') }}" + zabbix_agent_listenport: "{{ zabbix_agent_listenport is defined | ternary(zabbix_agent_listenport, zabbix_agent2_listenport) | default(10050) }}" + zabbix_agent_logfilesize: "{{ zabbix_agent_logfilesize is defined | ternary(zabbix_agent_logfilesize, zabbix_agent2_logfilesize) | default(100) }}" + zabbix_agent_logtype: "{{ zabbix_agent_logtype is defined | ternary(zabbix_agent_logtype, zabbix_agent2_logtype) | default('file') }}" + zabbix_agent_persistentbufferperiod: "{{ zabbix_agent_persistentbufferperiod is defined | ternary(zabbix_agent_persistentbufferperiod, zabbix_agent2_persistentbufferperiod) | default('1h') }}" + zabbix_agent_refreshactivechecks: "{{ zabbix_agent_refreshactivechecks is defined | ternary(zabbix_agent_refreshactivechecks, zabbix_agent2_refreshactivechecks) | default(120) }}" + zabbix_agent_statusport: "{{ zabbix_agent_statusport is defined | ternary(zabbix_agent_statusport, zabbix_agent2_statusport) | default(9999) }}" + zabbix_agent_timeout: "{{ zabbix_agent_timeout is defined | ternary(zabbix_agent_timeout, zabbix_agent2_timeout) | default(3) }}" + zabbix_agent_tlspsk_auto: "{{ zabbix_agent_tlspsk_auto is defined | ternary(zabbix_agent_tlspsk_auto, zabbix_agent2_tlspsk_auto) | default(false) }}" + zabbix_agent_tlspskfile: "{{ zabbix_agent_tlspskfile is defined | ternary(zabbix_agent_tlspskfile, zabbix_agent2_tlspskfile) | default('/etc/zabbix/tls_psk_auto.secret') }}" + zabbix_agent_unsafeuserparameters: "{{ zabbix_agent_unsafeuserparameters is defined | ternary(zabbix_agent_unsafeuserparameters, zabbix_agent2_unsafeuserparameters) | default(0) }}" + +- name: Set More Variables # Remove for 3.0 release + ansible.builtin.set_fact: + zabbix_agent_allowkeys: "{{ zabbix_agent_allowkeys is defined | ternary(zabbix_agent_allowkeys, zabbix_agent2_allow_key) | default(omit) }}" + zabbix_agent_denykeys: "{{ zabbix_agent_denykeys is defined | ternary(zabbix_agent_denykeys, zabbix_agent2_deny_key) | default(omit) }}" + zabbix_agent_hostinterface: "{{ zabbix_agent_hostinterface is defined | ternary(zabbix_agent_hostinterface, zabbix_agent2_hostinterface) | default(omit) }}" + zabbix_agent_hostinterfaceitem: "{{ zabbix_agent_hostinterfaceitem is defined | ternary(zabbix_agent_hostinterfaceitem, zabbix_agent2_hostinterfaceitem) | default(omit) }}" + zabbix_agent_hostmetadata: "{{ zabbix_agent_hostmetadata is defined | ternary(zabbix_agent_hostmetadata, zabbix_agent2_hostmetadata) | default(omit) }}" + zabbix_agent_hostmetadataitem: "{{ zabbix_agent_hostmetadataitem is defined | ternary(zabbix_agent_hostmetadataitem, zabbix_agent2_hostmetadataitem) | default(omit) }}" + zabbix_agent_hostnameitem: "{{ zabbix_agent_hostnameitem is defined | ternary(zabbix_agent_hostnameitem, zabbix_agent2_hostnameitem) | default(omit) }}" + zabbix_agent_listenip: "{{ zabbix_agent_listenip is defined | ternary(zabbix_agent_listenip, zabbix_agent2_listenip) | default(omit) }}" + zabbix_agent_persistentbufferfile: "{{ zabbix_agent_persistentbufferfile is defined | ternary(zabbix_agent_persistentbufferfile, zabbix_agent2_persistentbufferfile) | default(omit) }}" + zabbix_agent_plugins: "{{ zabbix_agent_plugins is defined | ternary(zabbix_agent_plugins, zabbix_agent2_plugins) | default(omit) }}" + zabbix_agent_server: "{{ zabbix_agent_server is defined | ternary(zabbix_agent_server, zabbix_agent2_server) | default(omit) }}" + zabbix_agent_serveractive: "{{ zabbix_agent_serveractive is defined | ternary(zabbix_agent_serveractive, zabbix_agent2_serveractive) | default(omit) }}" + zabbix_agent_sourceip: "{{ zabbix_agent_sourceip is defined | ternary(zabbix_agent_sourceip, zabbix_agent2_sourceip) | default(omit) }}" + zabbix_agent_tlsaccept: "{{ zabbix_agent_tlsaccept is defined | ternary(zabbix_agent_tlsaccept, zabbix_agent2_tlsaccept) | default(omit) }}" + zabbix_agent_tlscafile: "{{ zabbix_agent_tlscafile is defined | ternary(zabbix_agent_tlscafile, zabbix_agent2_tlscafile) | default(omit) }}" + zabbix_agent_tlscertfile: "{{ zabbix_agent_tlscertfile is defined | ternary(zabbix_agent_tlscertfile, zabbix_agent2_tlscertfile) | default(omit) }}" + zabbix_agent_tlsconnect: "{{ zabbix_agent_tlsconnect is defined | ternary(zabbix_agent_tlsconnect, zabbix_agent2_tlsconnect) | default(omit) }}" + zabbix_agent_tlscrlfile: "{{ zabbix_agent_tlscrlfile is defined | ternary(zabbix_agent_tlscrlfile, zabbix_agent2_tlscrlfile) | default(omit) }}" + zabbix_agent_tlskeyfile: "{{ zabbix_agent_tlskeyfile is defined | ternary(zabbix_agent_tlskeyfile, zabbix_agent2_tlskeyfile) | default(omit) }}" + zabbix_agent_tlspskidentity: "{{ zabbix_agent_tlspskidentity is defined | ternary(zabbix_agent_tlspskidentity, zabbix_agent2_tlspskidentity) | default(omit) }}" + zabbix_agent_tlspsk_secret: "{{ zabbix_agent_tlspsk_secret is defined | ternary(zabbix_agent_tlspsk_secret, zabbix_agent2_tlspsk_secret) | default(omit) }}" + zabbix_agent_tlsservercertissuer: "{{ zabbix_agent_tlsservercertissuer is defined | ternary(zabbix_agent_tlsservercertissuer, zabbix_agent2_tlsservercertissuer) | default(omit) }}" + zabbix_agent_tlsservercertsubject: "{{ zabbix_agent_tlsservercertsubject is defined | ternary(zabbix_agent_tlsservercertsubject, zabbix_agent2_tlsservercertsubject) | default(omit) }}" + zabbix_agent_aliases: "{{ zabbix_agent_aliases is defined | ternary(zabbix_agent_aliases, zabbix_agent_zabbix_alias) | default(omit) }}" + - name: Setting Zabbix API Server Port ansible.builtin.set_fact: zabbix_api_server_port: "{{ '443' if zabbix_api_use_ssl|bool else '80' }}" when: zabbix_api_server_port is undefined -- name: "Set variables specific for Zabbix Agent 2" - ansible.builtin.set_fact: - zabbix_agent_service: zabbix-agent2 - zabbix_agent_package: zabbix-agent2 - when: - - zabbix_agent2 is defined - - zabbix_agent2 - tags: - - always - - name: "Install the correct repository" ansible.builtin.include_tasks: "{{ ansible_os_family }}.yml" when: - not (zabbix_agent_docker | bool) -- name: "Encrypt with TLS PSK auto management" - ansible.builtin.include_tasks: tlspsk_auto.yml - when: - - not zabbix_agent2 - - zabbix_agent_tlspsk_auto | bool - - (zabbix_agent_tlspskfile is undefined) or (zabbix_agent_tlspskfile | length == '0') - - (zabbix_agent_tlspsk_secret is undefined) or (zabbix_agent_tlspsk_secret | length == '0') +- name: Gather PSK Secret Info + ansible.builtin.include_tasks: psk_secret.yml -- name: "Encrypt with TLS PSK auto management" - ansible.builtin.include_tasks: tlspsk_auto_agent2.yml - when: - - zabbix_agent2 | bool - - zabbix_agent2_tlspsk_auto | bool - - (zabbix_agent2_tlspskfile is undefined) or (zabbix_agent2_tlspskfile | length == '0') - - (zabbix_agent2_tlspsk_secret is undefined) or (zabbix_agent2_tlspsk_secret | length == '0') +- name: Gather PSK Identity Info + ansible.builtin.include_tasks: psk_identity.yml + +- name: AutoPSK | Default tlsaccept and tlsconnect to enforce PSK + ansible.builtin.set_fact: + zabbix_agent_tlsaccept: psk + zabbix_agent_tlsconnect: psk + when: zabbix_agent_tlspsk_auto | bool + tags: + - config - name: "Configure Agent" ansible.builtin.include_tasks: Windows_conf.yml @@ -85,6 +133,6 @@ - name: "Including userparameters" ansible.builtin.include_tasks: "userparameter.yml" - when: zabbix_agent_userparameters|length > 0 + when: zabbix_agent_userparameters | default ([]) | length > 0 tags: - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/psk_identity.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/psk_identity.yml new file mode 100644 index 000000000..12df8572b --- /dev/null +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/psk_identity.yml @@ -0,0 +1,84 @@ +- name: AutoPSK | Check for existing TLS PSK identity + block: + - name: AutoPSK | Check for existing TLS PSK identity | Windows + ansible.windows.win_stat: + path: "{{ zabbix_agent_tlspskidentity_file }}" + register: zabbix_agent_tlspskidentity_check + when: + - ansible_os_family == "Windows" + + - name: AutoPSK | Check for existing TLS PSK identity | Linux + ansible.builtin.stat: + path: "{{ zabbix_agent_tlspskidentity_file }}" + register: zabbix_agent_tlspskidentity_check + become: true + when: + - ansible_os_family != "Windows" + tags: + - config + +- name: AutoPSK | Read existing TLS PSK identity file + ansible.builtin.slurp: + src: "{{ zabbix_agent_tlspskidentity_file }}" + register: zabbix_agent_tlspskidentity_base64 + become: true + when: zabbix_agent_tlspskidentity_check.stat.exists + no_log: "{{ ansible_verbosity < 3 }}" + tags: + - config + +- name: AutoPSK | Use existing TLS PSK identity + ansible.builtin.set_fact: + zabbix_agent_tlspskidentity: "{{ zabbix_agent_tlspskidentity_base64['content'] | b64decode | trim }}" + when: + - zabbix_agent_tlspskidentity_check.stat.exists + no_log: "{{ ansible_verbosity < 3 }}" + tags: + - config + +- name: AutoPSK | Generate new TLS PSK identity + ansible.builtin.set_fact: + zabbix_agent_tlspskidentity: >- + {{ + zabbix_agent_visible_hostname + | default(zabbix_agent_hostname) + + '_' + + lookup('password', '/dev/null chars=hexdigits length=4') + }} + when: + - not zabbix_agent_tlspskidentity_check.stat.exists + - zabbix_agent_tlspskidentity is undefined + - zabbix_agent_tlspsk_auto | bool + no_log: "{{ ansible_verbosity < 3 }}" + tags: + - config + +- name: AutoPSK | Template PSK Identity + block: + - name: AutoPSK | Template PSK Identity | Windows + ansible.windows.win_copy: + dest: "{{ zabbix_agent_tlspskidentity_file }}" + content: "{{ zabbix_agent_tlspskidentity }}" + when: + - ansible_os_family == "Windows" + notify: + - restart win zabbix agent + + - name: AutoPSK | Template PSK Identity | Linux + ansible.builtin.copy: + dest: "{{ zabbix_agent_tlspskidentity_file }}" + content: "{{ zabbix_agent_tlspskidentity }}" + owner: zabbix + group: zabbix + mode: 0400 + become: true + when: + - ansible_os_family != "Windows" + notify: + - restart zabbix-agent + - restart mac zabbix agent + when: + - zabbix_agent_tlspskidentity_file is defined + - zabbix_agent_tlspskidentity is defined + tags: + - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/psk_secret.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/psk_secret.yml new file mode 100644 index 000000000..4fedb605a --- /dev/null +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/psk_secret.yml @@ -0,0 +1,112 @@ +- name: AutoPSK | Set Path Variables for Windows + ansible.builtin.set_fact: + zabbix_agent_tlspskfile: "{{ zabbix_win_install_dir }}\\tls_psk_auto.secret.txt" + zabbix_agent_tlspskidentity_file: "{{ zabbix_win_install_dir }}\\tls_psk_auto.identity.txt" + when: + - ansible_os_family == "Windows" + tags: + - config + +- name: AutoPSK | Check for existing TLS PSK file + block: + - name: AutoPSK | Check for existing TLS PSK file | Windows + ansible.windows.win_stat: + path: "{{ zabbix_agent_tlspskfile }}" + register: zabbix_agent_tlspskcheck + when: + - ansible_os_family == "Windows" + + - name: AutoPSK | Check for existing TLS PSK file | Linux + ansible.builtin.stat: + path: "{{ zabbix_agent_tlspskfile }}" + register: zabbix_agent_tlspskcheck + become: true + when: + - ansible_os_family != "Windows" + tags: + - config + +- name: AutoPSK | read existing TLS PSK file + ansible.builtin.slurp: + src: "{{ zabbix_agent_tlspskfile }}" + register: zabbix_agent_tlspsk_base64 + become: true + when: + - zabbix_agent_tlspskcheck.stat.exists + no_log: "{{ ansible_verbosity < 3 }}" + tags: + - config + +- name: AutoPSK | Save Existing PSK Secret + ansible.builtin.set_fact: + zabbix_agent_tlspsk_read: "{{ zabbix_agent_tlspsk_base64['content'] | b64decode | trim }}" + when: zabbix_agent_tlspskcheck.stat.exists + no_log: "{{ ansible_verbosity < 3 }}" + tags: + - config + +- name: AutoPSK | Use Existing PSK Secret + ansible.builtin.set_fact: + zabbix_agent_tlspsk_secret: "{{ zabbix_agent_tlspsk_read }}" + when: + - zabbix_agent_tlspskcheck.stat.exists + - zabbix_agent_tlspsk_read|length >= 32 + no_log: "{{ ansible_verbosity < 3 }}" + tags: + - config + +- name: AutoPSK | Generate New PSK Secret + ansible.builtin.set_fact: + zabbix_agent_tlspsk_secret: "{{ lookup('password', '/dev/null chars=hexdigits length=64') }}" + when: + - zabbix_agent_tlspsk_secret is undefined + - zabbix_agent_tlspsk_auto | bool + no_log: "{{ ansible_verbosity < 3 }}" + tags: + - config + +- name: AutoPSK | Template PSK Secret + block: + - name: Create Directory for PSK File | Windows + ansible.windows.win_file: + path: "{{ zabbix_agent_tlspskfile | win_dirname }}" + state: directory + when: + - ansible_os_family == "Windows" + + - name: AutoPSK | Template PSK Secret | Windows + ansible.windows.win_copy: + dest: "{{ zabbix_agent_tlspskfile }}" + content: "{{ zabbix_agent_tlspsk_secret }}" + when: + - ansible_os_family == "Windows" + notify: + - restart win zabbix agent + + - name: Create Directory for PSK File | Linux + ansible.builtin.file: + path: "{{ zabbix_agent_tlspskfile | dirname }}" + mode: 0755 + state: directory + become: true + when: + - ansible_os_family != "Windows" + + - name: AutoPSK | Template PSK Secret | Linux + ansible.builtin.copy: + dest: "{{ zabbix_agent_tlspskfile }}" + content: "{{ zabbix_agent_tlspsk_secret }}" + owner: zabbix + group: zabbix + mode: 0400 + become: true + when: + - ansible_os_family != "Windows" + notify: + - restart zabbix-agent + - restart mac zabbix agent + when: + - zabbix_agent_tlspskfile is defined + - zabbix_agent_tlspsk_secret is defined + tags: + - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/selinux.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/selinux.yml index 2b11d1a47..21e176db6 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/selinux.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/selinux.yml @@ -29,7 +29,7 @@ until: zabbix_agent_policycoreutils_installed is succeeded when: - ansible_os_family == "RedHat" - - (zabbix_agent_distribution_major_version == "6" or zabbix_agent_distribution_major_version == "7") + - ansible_distribution_major_version == "7" become: true tags: - install diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto.yml deleted file mode 100644 index ad7d49aa3..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- ansible.builtin.include_tasks: tlspsk_auto_linux.yml - when: (ansible_os_family != "Windows") or (zabbix_agent_docker | bool) - -- ansible.builtin.include_tasks: tlspsk_auto_windows.yml - when: ansible_os_family == "Windows" - -- name: AutoPSK | Default tlsaccept and tlsconnect to enforce PSK - ansible.builtin.set_fact: - zabbix_agent_tlsaccept: psk - zabbix_agent_tlsconnect: psk - when: zabbix_api_create_hosts - tags: - - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2.yml deleted file mode 100644 index 6e5f8dc4d..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- include_tasks: tlspsk_auto_agent2_linux.yml - when: (ansible_os_family != "Windows") or (zabbix_agent_docker | bool) - -- include_tasks: tlspsk_auto_agent2_windows.yml - when: ansible_os_family == "Windows" - -- name: AutoPSK | Default tlsaccept and tlsconnect to enforce PSK - ansible.builtin.set_fact: - zabbix_agent2_tlsaccept: psk - zabbix_agent2_tlsconnect: psk - when: zabbix_api_create_hosts - tags: - - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2_common.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2_common.yml deleted file mode 100644 index 3f6e0d2cd..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2_common.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# Process PSK Secret -- name: AutoPSK | Save existing TLS PSK secret - ansible.builtin.set_fact: - zabbix_agent2_tlspsk_read: "{{ zabbix_agent2_tlspsk_base64['content'] | b64decode | trim }}" - when: zabbix_agent2_tlspskcheck.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Use existing TLS PSK secret - ansible.builtin.set_fact: - zabbix_agent2_tlspsk_secret: "{{ zabbix_agent2_tlspsk_read }}" - when: - - zabbix_agent2_tlspskcheck.stat.exists - - zabbix_agent2_tlspsk_read|length >= 32 - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Generate new TLS PSK secret - ansible.builtin.set_fact: - zabbix_agent2_tlspsk_secret: "{{ lookup('password', '/dev/null chars=hexdigits length=64') }}" - when: - - not zabbix_agent2_tlspskcheck.stat.exists - - (zabbix_agent2_tlspsk_read is not defined) or (zabbix_agent2_tlspsk_read|length < 32) - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -# Process PSK Identity -- name: AutoPSK | Use existing TLS PSK identity - ansible.builtin.set_fact: - zabbix_agent2_tlspskidentity: "{{ zabbix_agent2_tlspskidentity_base64['content'] | b64decode | trim }}" - when: - - zabbix_agent2_tlspskidentity_check.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Generate new TLS PSK identity - ansible.builtin.set_fact: - zabbix_agent2_tlspskidentity: >- - {{ - zabbix_agent_visible_hostname - | default(((zabbix_agent2 == True) | ternary(zabbix_agent2_hostname, zabbix_agent_hostname))) - + '_' - + lookup('password', '/dev/null chars=hexdigits length=4') - }} - when: not zabbix_agent2_tlspskidentity_check.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2_linux.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2_linux.yml deleted file mode 100644 index aaff36128..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2_linux.yml +++ /dev/null @@ -1,80 +0,0 @@ ---- -- name: AutoPSK | Set default path variables (Linux) - ansible.builtin.set_fact: - zabbix_agent2_tlspskfile: "/etc/zabbix/tls_psk_auto.secret" - zabbix_agent2_tlspskidentity_file: "/etc/zabbix/tls_psk_auto.identity" - tags: - - config - -- name: AutoPSK | Check for existing TLS PSK file (Linux) - ansible.builtin.stat: - path: "{{ zabbix_agent2_tlspskfile }}" - register: zabbix_agent2_tlspskcheck - become: true - tags: - - config - -- name: AutoPSK | Check for existing TLS PSK identity (Linux) - ansible.builtin.stat: - path: "{{ zabbix_agent2_tlspskidentity_file }}" - register: zabbix_agent2_tlspskidentity_check - become: true - tags: - - config - -- name: AutoPSK | read existing TLS PSK file (Linux) - ansible.builtin.slurp: - src: "{{ zabbix_agent2_tlspskfile }}" - register: zabbix_agent2_tlspsk_base64 - become: true - when: - - zabbix_agent2_tlspskcheck.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Read existing TLS PSK identity file (Linux) - ansible.builtin.slurp: - src: "{{ zabbix_agent2_tlspskidentity_file }}" - register: zabbix_agent2_tlspskidentity_base64 - become: true - when: zabbix_agent2_tlspskidentity_check.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- include_tasks: tlspsk_auto_agent2_common.yml - -- name: AutoPSK | Template TLS PSK identity in file (Linux) - ansible.builtin.copy: - dest: "{{ zabbix_agent2_tlspskidentity_file }}" - content: "{{ zabbix_agent2_tlspskidentity }}" - owner: zabbix - group: zabbix - mode: 0400 - become: true - when: - - zabbix_agent2_tlspskidentity_file is defined - - zabbix_agent2_tlspskidentity is defined - notify: - - restart zabbix-agent - - restart mac zabbix agent - tags: - - config - -- name: AutoPSK | Template TLS PSK secret in file (Linux) - ansible.builtin.copy: - dest: "{{ zabbix_agent2_tlspskfile }}" - content: "{{ zabbix_agent2_tlspsk_secret }}" - owner: zabbix - group: zabbix - mode: 0400 - become: true - when: - - zabbix_agent2_tlspskfile is defined - - zabbix_agent2_tlspsk_secret is defined - notify: - - restart zabbix-agent - - restart mac zabbix agent - tags: - - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2_windows.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2_windows.yml deleted file mode 100644 index 3e1529e6b..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_agent2_windows.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -- name: AutoPSK | Set default path variables for Windows - ansible.builtin.set_fact: - zabbix_agent2_tlspskfile: "{{ zabbix_win_install_dir }}\\tls_psk_auto.secret.txt" - zabbix_agent2_tlspskidentity_file: "{{ zabbix_win_install_dir }}\\tls_psk_auto.identity.txt" - tags: - - config - -- name: AutoPSK | Check for existing TLS PSK file (Windows) - ansible.windows.win_stat: - path: "{{ zabbix_agent2_tlspskfile }}" - register: zabbix_agent2_tlspskcheck - tags: - - config - -- name: AutoPSK | Check for existing TLS PSK identity (Windows) - ansible.windows.win_stat: - path: "{{ zabbix_agent2_tlspskidentity_file }}" - register: zabbix_agent2_tlspskidentity_check - tags: - - config - -- name: AutoPSK | read existing TLS PSK file (Windows) - ansible.builtin.slurp: - src: "{{ zabbix_agent2_tlspskfile }}" - register: zabbix_agent2_tlspsk_base64 - when: - - zabbix_agent2_tlspskcheck.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Read existing TLS PSK identity file (Windows) - ansible.builtin.slurp: - src: "{{ zabbix_agent2_tlspskidentity_file }}" - register: zabbix_agent2_tlspskidentity_base64 - when: zabbix_agent2_tlspskidentity_check.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- ansible.builtin.include_tasks: tlspsk_auto_agent2_common.yml - -- name: Windows | AutoPSK | Template TLS PSK identity in file (Windows) - ansible.windows.win_copy: - dest: "{{ zabbix_agent2_tlspskidentity_file }}" - content: "{{ zabbix_agent2_tlspskidentity }}" - when: - - zabbix_agent2_tlspskidentity_file is defined - - zabbix_agent2_tlspskidentity is defined - notify: - - restart win zabbix agent - tags: - - config - -- name: AutoPSK | Template TLS PSK secret in file (Windows) - ansible.windows.win_copy: - dest: "{{ zabbix_agent2_tlspskfile }}" - content: "{{ zabbix_agent2_tlspsk_secret }}" - when: - - zabbix_agent2_tlspskfile is defined - - zabbix_agent2_tlspsk_secret is defined - notify: - - restart win zabbix agent - tags: - - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_common.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_common.yml deleted file mode 100644 index 05ef24d0e..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_common.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -# Process PSK Secret -- name: AutoPSK | Save existing TLS PSK secret - ansible.builtin.set_fact: - zabbix_agent_tlspsk_read: "{{ zabbix_agent_tlspsk_base64['content'] | b64decode | trim }}" - when: zabbix_agent_tlspskcheck.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Use existing TLS PSK secret - ansible.builtin.set_fact: - zabbix_agent_tlspsk_secret: "{{ zabbix_agent_tlspsk_read }}" - when: - - zabbix_agent_tlspskcheck.stat.exists - - zabbix_agent_tlspsk_read|length >= 32 - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Generate new TLS PSK secret - ansible.builtin.set_fact: - zabbix_agent_tlspsk_secret: "{{ lookup('password', '/dev/null chars=hexdigits length=64') }}" - when: - - (not zabbix_agent_tlspskcheck.stat.exists) or (zabbix_agent_tlspsk_read|length < 32) - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -# Process PSK Identity -- name: AutoPSK | Use existing TLS PSK identity - ansible.builtin.set_fact: - zabbix_agent_tlspskidentity: "{{ zabbix_agent_tlspskidentity_base64['content'] | b64decode | trim }}" - when: - - zabbix_agent_tlspskidentity_check.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Generate new TLS PSK identity - ansible.builtin.set_fact: - zabbix_agent_tlspskidentity: >- - {{ - zabbix_agent_visible_hostname - | default(((zabbix_agent2 != True) | ternary(zabbix_agent_hostname, zabbix_agent_hostname))) - + '_' - + lookup('password', '/dev/null chars=hexdigits length=4') - }} - when: not zabbix_agent_tlspskidentity_check.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_linux.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_linux.yml deleted file mode 100644 index 8cc711fcb..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_linux.yml +++ /dev/null @@ -1,80 +0,0 @@ ---- -- name: AutoPSK | Set default path variables (Linux) - ansible.builtin.set_fact: - zabbix_agent_tlspskfile: "/etc/zabbix/tls_psk_auto.secret" - zabbix_agent_tlspskidentity_file: "/etc/zabbix/tls_psk_auto.identity" - tags: - - config - -- name: AutoPSK | Check for existing TLS PSK file (Linux) - ansible.builtin.stat: - path: "{{ zabbix_agent_tlspskfile }}" - register: zabbix_agent_tlspskcheck - become: true - tags: - - config - -- name: AutoPSK | Check for existing TLS PSK identity (Linux) - ansible.builtin.stat: - path: "{{ zabbix_agent_tlspskidentity_file }}" - register: zabbix_agent_tlspskidentity_check - become: true - tags: - - config - -- name: AutoPSK | read existing TLS PSK file (Linux) - ansible.builtin.slurp: - src: "{{ zabbix_agent_tlspskfile }}" - register: zabbix_agent_tlspsk_base64 - become: true - when: - - zabbix_agent_tlspskcheck.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Read existing TLS PSK identity file (Linux) - ansible.builtin.slurp: - src: "{{ zabbix_agent_tlspskidentity_file }}" - register: zabbix_agent_tlspskidentity_base64 - become: true - when: zabbix_agent_tlspskidentity_check.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- include_tasks: tlspsk_auto_common.yml - -- name: AutoPSK | Template TLS PSK identity in file (Linux) - ansible.builtin.copy: - dest: "{{ zabbix_agent_tlspskidentity_file }}" - content: "{{ zabbix_agent_tlspskidentity }}" - owner: zabbix - group: zabbix - mode: 0400 - become: true - when: - - zabbix_agent_tlspskidentity_file is defined - - zabbix_agent_tlspskidentity is defined - notify: - - restart zabbix-agent - - restart mac zabbix agent - tags: - - config - -- name: AutoPSK | Template TLS PSK secret in file (Linux) - ansible.builtin.copy: - dest: "{{ zabbix_agent_tlspskfile }}" - content: "{{ zabbix_agent_tlspsk_secret }}" - owner: zabbix - group: zabbix - mode: 0400 - become: true - when: - - zabbix_agent_tlspskfile is defined - - zabbix_agent_tlspsk_secret is defined - notify: - - restart zabbix-agent - - restart mac zabbix agent - tags: - - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_windows.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_windows.yml deleted file mode 100644 index b9289ac49..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/tasks/tlspsk_auto_windows.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- -- name: AutoPSK | Set default path variables for Windows - ansible.builtin.set_fact: - zabbix_agent_tlspskfile: "{{ zabbix_win_install_dir }}\\tls_psk_auto.secret.txt" - zabbix_agent_tlspskidentity_file: "{{ zabbix_win_install_dir }}\\tls_psk_auto.identity.txt" - tags: - - config - -- name: AutoPSK | Check for existing TLS PSK file (Windows) - ansible.windows.win_stat: - path: "{{ zabbix_agent_tlspskfile }}" - register: zabbix_agent_tlspskcheck - tags: - - config - -- name: AutoPSK | Check for existing TLS PSK identity (Windows) - ansible.windows.win_stat: - path: "{{ zabbix_agent_tlspskidentity_file }}" - register: zabbix_agent_tlspskidentity_check - tags: - - config - -- name: AutoPSK | read existing TLS PSK file (Windows) - ansible.builtin.slurp: - src: "{{ zabbix_agent_tlspskfile }}" - register: zabbix_agent_tlspsk_base64 - when: - - zabbix_agent_tlspskcheck.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- name: AutoPSK | Read existing TLS PSK identity file (Windows) - ansible.builtin.slurp: - src: "{{ zabbix_agent_tlspskidentity_file }}" - register: zabbix_agent_tlspskidentity_base64 - when: zabbix_agent_tlspskidentity_check.stat.exists - no_log: "{{ ansible_verbosity < 3 }}" - tags: - - config - -- include_tasks: tlspsk_auto_common.yml - -- name: AutoPSK | Template TLS PSK identity in file (Windows) - ansible.windows.win_copy: - dest: "{{ zabbix_agent_tlspskidentity_file }}" - content: "{{ zabbix_agent_tlspskidentity }}" - when: - - zabbix_agent_tlspskidentity_file is defined - - zabbix_agent_tlspskidentity is defined - notify: - - restart win zabbix agent - tags: - - config - -- name: AutoPSK | Template TLS PSK secret in file (Windows) - ansible.windows.win_copy: - dest: "{{ zabbix_agent_tlspskfile }}" - content: "{{ zabbix_agent_tlspsk_secret }}" - when: - - zabbix_agent_tlspskfile is defined - - zabbix_agent_tlspsk_secret is defined - - ansible_os_family == "Windows" - notify: - - restart win zabbix agent - tags: - - config diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/templates/agent.conf.j2 b/ansible_collections/community/zabbix/roles/zabbix_agent/templates/agent.conf.j2 new file mode 100644 index 000000000..7cf1d97e4 --- /dev/null +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/templates/agent.conf.j2 @@ -0,0 +1,142 @@ +{{ ansible_managed | comment }} +# This is a configuration file for Zabbix Server process +# To get more information about Zabbix, visit http://www.zabbix.com + +# This configuration file is "minimalized", which means all the original comments +# are removed. The full documentation for your Zabbix Server can be found here: +# https://www.zabbix.com/documentation/{{ zabbix_agent_version }}/en/manual/appendix/config/ + +{% if zabbix_agent_aliases is defined and zabbix_agent_aliases %} +{% if zabbix_agent_aliases is string %} +Alias={{ zabbix_agent_aliases }} +{% else %} +{% for item in zabbix_agent_aliases %} +Alias={{ item }} +{% endfor %} +{% endif %} +{% else %} +# Alias= +{% endif %} +{% if zabbix_agent_allowkeys is defined and zabbix_agent_allowkeys %} +{% if zabbix_agent_allowkeys is string %} +AllowKey={{ zabbix_agent_allowkeys }} +{% else %} +{% for item in zabbix_agent_allowkeys %} +AllowKey={{ item }} +{% endfor %} +{% endif %} +{% else %} +# AllowKey= +{% endif %} +{% if not zabbix_agent2 and ansible_os_family != "Windows" %} +{{ (zabbix_agent_allowroot is defined and zabbix_agent_allowroot is not none) | ternary('', '# ') }}AllowRoot={{ zabbix_agent_allowroot | default('') }} +{% endif %} +{{ (zabbix_agent_buffersend is defined and zabbix_agent_buffersend is not none) | ternary('', '# ') }}BufferSend={{ zabbix_agent_buffersend | default('') }} +{{ (zabbix_agent_buffersize is defined and zabbix_agent_buffersize is not none) | ternary('', '# ') }}BufferSize={{ zabbix_agent_buffersize | default('') }} +{% if zabbix_agent2 %} +{{ (zabbix_agent_controlsocket is defined and zabbix_agent_controlsocket is not none) | ternary('', '# ') }}ControlSocket={{ zabbix_agent_controlsocket | default('') }} +{% endif %} +{{ (zabbix_agent_debuglevel is defined and zabbix_agent_debuglevel is not none) | ternary('', '# ') }}DebugLevel={{ zabbix_agent_debuglevel | default('') }} +{% if zabbix_agent_denykeys is defined and zabbix_agent_denykeys %} +{% if zabbix_agent_denykeys is string %} +DenyKey={{ zabbix_agent_denykeys }} +{% else %} +{% for item in zabbix_agent_denykeys %} +DenyKey={{ item }} +{% endfor %} +{% endif %} +{% else %} +# DenyKey= +{% endif %} +{% if not zabbix_agent2 %} +{{ (zabbix_agent_enableremotecommands is defined and zabbix_agent_enableremotecommands is not none) | ternary('', '# ') }}EnableRemoteCommands={{ zabbix_agent_enableremotecommands | default('') }} +{% endif %} +{% if zabbix_agent2 %} +{{ (zabbix_agent_forceactivechecksonstart is defined and zabbix_agent_forceactivechecksonstart is not none) | ternary('', '# ') }}ForceActiveChecksOnStart={{ zabbix_agent_forceactivechecksonstart | default('') }} +{% endif %} +{% if zabbix_agent_version is version_compare('6.2', '>=') %} +{{ (zabbix_agent_heartbeatfrequency is defined and zabbix_agent_heartbeatfrequency is not none) | ternary('', '# ') }}HeartbeatFrequency={{ zabbix_agent_heartbeatfrequency | default('') }} +{% endif %} +{{ (zabbix_agent_hostinterface is defined and zabbix_agent_hostinterface is not none) | ternary('', '# ') }}HostInterface={{ zabbix_agent_hostinterface | default('') }} +{{ (zabbix_agent_hostinterfaceitem is defined and zabbix_agent_hostinterfaceitem is not none) | ternary('', '# ') }}HostInterfaceItem={{ zabbix_agent_hostinterfaceitem | default('') }} +{{ (zabbix_agent_hostmetadata is defined and zabbix_agent_hostmetadata is not none) | ternary('', '# ') }}HostMetadata={{ zabbix_agent_hostmetadata | default('') }} +{{ (zabbix_agent_hostmetadataitem is defined and zabbix_agent_hostmetadataitem is not none) | ternary('', '# ') }}HostMetadataItem={{ zabbix_agent_hostmetadataitem | default('') }} +{{ (zabbix_agent_hostname is defined and zabbix_agent_hostname is not none) | ternary('', '# ') }}Hostname={{ zabbix_agent_hostname | default('') }} +{{ (zabbix_agent_hostnameitem is defined and zabbix_agent_hostnameitem is not none) | ternary('', '# ') }}HostnameItem={{ zabbix_agent_hostnameitem | default('') }} +{{ (zabbix_agent_include is defined and zabbix_agent_include is not none) | ternary('', '# ') }}Include={{ zabbix_agent_include | default('') }} +{% if not zabbix_agent2 %} +{{ (zabbix_agent_listenbacklog is defined and zabbix_agent_listenbacklog is not none) | ternary('', '# ') }}ListenBacklog={{ zabbix_agent_listenbacklog | default('') }} +{% endif %} +{{ (zabbix_agent_listenip is defined and zabbix_agent_listenip is not none) | ternary('', '# ') }}ListenIP={{ zabbix_agent_listenip | default('') }} +{{ (zabbix_agent_listenport is defined and zabbix_agent_listenport is not none) | ternary('', '# ') }}ListenPort={{ zabbix_agent_listenport | default('') }} +{% if not zabbix_agent2 and ansible_os_family != "Windows" %} +{{ (zabbix_agent_loadmodule is defined and zabbix_agent_loadmodule is not none) | ternary('', '# ') }}LoadModule={{ zabbix_agent_loadmodule | default('') }} +{{ (zabbix_agent_loadmodulepath is defined and zabbix_agent_loadmodulepath is not none) | ternary('', '# ') }}LoadModulePath={{ zabbix_agent_loadmodulepath | default('') }} +{% endif %} +{{ (zabbix_agent_logfile is defined and zabbix_agent_logfile is not none) | ternary('', '# ') }}LogFile={{ zabbix_agent_logfile | default('') }} +{{ (zabbix_agent_logfilesize is defined and zabbix_agent_logfilesize is not none) | ternary('', '# ') }}LogFileSize={{ zabbix_agent_logfilesize | default('') }} +{% if not zabbix_agent2 %} +{{ (zabbix_agent_logremotecommands is defined and zabbix_agent_logremotecommands is not none) | ternary('', '# ') }}LogRemoteCommands={{ zabbix_agent_logremotecommands | default('') }} +{% endif %} +{{ (zabbix_agent_logtype is defined and zabbix_agent_logtype is not none) | ternary('', '# ') }}LogType={{ zabbix_agent_logtype | default('') }} +{% if not zabbix_agent2 %} +{{ (zabbix_agent_maxlinespersecond is defined and zabbix_agent_maxlinespersecond is not none) | ternary('', '# ') }}MaxLinesPerSecond={{ zabbix_agent_maxlinespersecond | default('') }} +{% endif %} +{% if not zabbix_agent2 and ansible_os_family == "Windows" %} +{{ (zabbix_agent_perfcounter is defined and zabbix_agent_perfcounter is not none) | ternary('', '# ') }}PerfCounter={{ zabbix_agent_perfcounter | default('') }} +{{ (zabbix_agent_perfcounteren is defined and zabbix_agent_perfcounteren is not none) | ternary('', '# ') }}PerfCounterEn={{ zabbix_agent_perfcounteren | default('') }} +{% endif %} +{% if zabbix_agent2 %} +{{ (zabbix_agent_persistentbufferfile is defined and zabbix_agent_persistentbufferfile is not none) | ternary('', '# ') }}PersistentBufferFile={{ zabbix_agent_persistentbufferfile | default('') }} +{{ (zabbix_agent_persistentbufferperiod is defined and zabbix_agent_persistentbufferperiod is not none) | ternary('', '# ') }}PersistentBufferPeriod={{ zabbix_agent_persistentbufferperiod | default('') }} +{% endif %} +{% if ansible_os_family != "Windows" %} +{{ (zabbix_agent_pidfile is defined and zabbix_agent_pidfile is not none) | ternary('', '# ') }}PidFile={{ zabbix_agent_pidfile | default('') }} +{% endif %} +{% if zabbix_agent_plugins is defined and zabbix_agent_plugins %} +{% for entry in zabbix_agent_plugins %} +{% set my_name = entry['name'] %} +{% for property in entry['options'] %} +{% set param = property['parameter'] %} +{% set value = property['value'] %} +Plugins.{{ my_name }}.{{ param }}={{ value }} +{% endfor %} +{% endfor %} +{% endif %} +{{ (zabbix_agent_pluginsocket is defined and zabbix_agent_pluginsocket is not none) | ternary('', '# ') }}PluginSocket={{ zabbix_agent_pluginsocket | default('') }} +{{ (zabbix_agent_plugintimeout is defined and zabbix_agent_plugintimeout is not none) | ternary('', '# ') }}PluginTimeout={{ zabbix_agent_plugintimeout | default('') }} +{{ (zabbix_agent_refreshactivechecks is defined and zabbix_agent_refreshactivechecks is not none) | ternary('', '# ') }}RefreshActiveChecks={{ zabbix_agent_refreshactivechecks | default('') }} +{{ (zabbix_agent_server is defined and zabbix_agent_server is not none) | ternary('', '# ') }}Server={{ zabbix_agent_server | default('') }} +{{ (zabbix_agent_serveractive is defined and zabbix_agent_serveractive is not none) | ternary('', '# ') }}ServerActive={{ zabbix_agent_serveractive | default('') }} +{{ (zabbix_agent_sourceip is defined and zabbix_agent_sourceip is not none) | ternary('', '# ') }}SourceIP={{ zabbix_agent_sourceip | default('') }} +{% if not zabbix_agent2 %} +{{ (zabbix_agent_startagents is defined and zabbix_agent_startagents is not none) | ternary('', '# ') }}StartAgents={{ zabbix_agent_startagents | default('') }} +{% endif %} +{% if zabbix_agent2 %} +{{ (zabbix_agent_statusport is defined and zabbix_agent_statusport is not none) | ternary('', '# ') }}StatusPort={{ zabbix_agent_statusport | default('') }} +{% endif %} +{{ (zabbix_agent_timeout is defined and zabbix_agent_timeout is not none) | ternary('', '# ') }}Timeout={{ zabbix_agent_timeout | default('') }} +{{ (zabbix_agent_tlsconnect is defined and zabbix_agent_tlsconnect is not none) | ternary('', '# ') }}TLSAccept={{ zabbix_agent_tlsconnect | default('') }} +{{ (zabbix_agent_tlscafile is defined and zabbix_agent_tlscafile is not none) | ternary('', '# ') }}TLSCAFile={{ zabbix_agent_tlscafile | default('') }} +{{ (zabbix_agent_tlscertfile is defined and zabbix_agent_tlscertfile is not none) | ternary('', '# ') }}TLSCertFile={{ zabbix_agent_tlscertfile | default('') }} +{% if not zabbix_agent2 and ansible_os_family != "Windows" %} +{{ (zabbix_agent_tlscipherall is defined and zabbix_agent_tlscipherall is not none) | ternary('', '# ') }}TLSCipherAll={{ zabbix_agent_tlscipherall | default('') }} +{{ (zabbix_agent_tlscipherall13 is defined and zabbix_agent_tlscipherall13 is not none) | ternary('', '# ') }}TLSCipherAll13={{ zabbix_agent_tlscipherall13 | default('') }} +{{ (zabbix_agent_tlsciphercert is defined and zabbix_agent_tlsciphercert is not none) | ternary('', '# ') }}TLSCipherCert={{ zabbix_agent_tlsciphercert | default('') }} +{{ (zabbix_agent_tlsciphercert13 is defined and zabbix_agent_tlsciphercert13 is not none) | ternary('', '# ') }}TLSCipherCert13={{ zabbix_agent_tlsciphercert13 | default('') }} +{{ (zabbix_agent_tlscipherpsk is defined and zabbix_agent_tlscipherpsk is not none) | ternary('', '# ') }}TLSCipherPSK={{ zabbix_agent_tlscipherpsk | default('') }} +{{ (zabbix_agent_tlscipherpsk13 is defined and zabbix_agent_tlscipherpsk13 is not none) | ternary('', '# ') }}TLSCipherPSK13={{ zabbix_agent_tlscipherpsk13 | default('') }} +{% endif %} +{{ (zabbix_agent_tlsconnect is defined and zabbix_agent_tlsconnect is not none) | ternary('', '# ') }}TLSConnect={{ zabbix_agent_tlsconnect | default('') }} +{{ (zabbix_agent_tlscrlfile is defined and zabbix_agent_tlscrlfile is not none) | ternary('', '# ') }}TLSCRLFile={{ zabbix_agent_tlscrlfile | default('') }} +{{ (zabbix_agent_tlskeyfile is defined and zabbix_agent_tlskeyfile is not none) | ternary('', '# ') }}TLSKeyFile={{ zabbix_agent_tlskeyfile | default('') }} +{{ (zabbix_agent_tlspskfile is defined and zabbix_agent_tlspskfile is not none) | ternary('', '# ') }}TLSPSKFile={{ zabbix_agent_tlspskfile | default('') }} +{{ (zabbix_agent_tlspskidentity is defined and zabbix_agent_tlspskidentity is not none) | ternary('', '# ') }}TLSPSKIdentity={{ zabbix_agent_tlspskidentity | default('') }} +{{ (zabbix_agent_tlsservercertissuer is defined and zabbix_agent_tlsservercertissuer is not none) | ternary('', '# ') }}TLSServerCertIssuer={{ zabbix_agent_tlsservercertissuer | default('') }} +{{ (zabbix_agent_tlsservercertsubject is defined and zabbix_agent_tlsservercertsubject is not none) | ternary('', '# ') }}TLSServerCertSubject={{ zabbix_agent_tlsservercertsubject | default('') }} +{{ (zabbix_agent_unsafeuserparameters is defined and zabbix_agent_unsafeuserparameters is not none) | ternary('', '# ') }}UnsafeUserParameters={{ zabbix_agent_unsafeuserparameters | default('') }} +{% if not zabbix_agent2 and ansible_os_family != "Windows" %} +{{ (zabbix_agent_runas_user is defined and zabbix_agent_runas_user is not none) | ternary('', '# ') }}User={{ zabbix_agent_runas_user | default('') }} +{% endif %} +{{ (zabbix_agent_userparamater is defined and zabbix_agent_userparamater is not none) | ternary('', '# ') }}UserParameter={{ zabbix_agent_userparamater | default('') }} +{{ (zabbix_agent_userparamaterdir is defined and zabbix_agent_userparamaterdir is not none) | ternary('', '# ') }}UserParameterDir={{ zabbix_agent_userparamaterdir | default('') }} diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/templates/zabbix_agent2.conf.j2 b/ansible_collections/community/zabbix/roles/zabbix_agent/templates/zabbix_agent2.conf.j2 deleted file mode 100644 index ea60d032e..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/templates/zabbix_agent2.conf.j2 +++ /dev/null @@ -1,140 +0,0 @@ -{{ ansible_managed | comment }} -# This is a configuration file for Zabbix Agent 2 -# To get more information about Zabbix, visit http://www.zabbix.com - -# This configuration file is "minimalized", which means all the original comments -# are removed. The full documentation for your Zabbix Agent 2 can be found here: -# https://www.zabbix.com/documentation/{{ zabbix_agent_version }}/en/manual/appendix/config/zabbix_agent2{{ "_win" if ansible_os_family == "Windows" else "" }} - -{% if ansible_os_family != "Windows" %} -PidFile={{ zabbix_agent2_pidfile }} -{% endif %} -LogType={{ zabbix_agent2_logtype }} -{% if ansible_os_family == "Windows" %} -LogFile={{ zabbix_agent2_win_logfile }} -{% else %} -LogFile={{ zabbix_agent2_logfile }} -{% endif %} -LogFileSize={{ zabbix_agent2_logfilesize }} -DebugLevel={{ zabbix_agent2_debuglevel }} -{% if zabbix_agent2_sourceip is defined and zabbix_agent2_sourceip %} -SourceIP={{ zabbix_agent2_sourceip }} -{% endif %} -Server={{ zabbix_agent2_server }} -ListenPort={{ zabbix_agent2_listenport }} -{% if zabbix_agent2_listenip is defined and zabbix_agent2_listenip !='0.0.0.0' and zabbix_agent2_listenip %} -ListenIP={{ zabbix_agent2_listenip }} -{% endif %} -{% if zabbix_agent2_statusport is defined and zabbix_agent2_statusport %} -StatusPort={{ zabbix_agent2_statusport }} -{% endif %} -ServerActive={{ zabbix_agent2_serveractive }} -{% if zabbix_agent2_hostname is defined and zabbix_agent2_hostname %} -Hostname={{ zabbix_agent2_hostname }} -{% endif %} -{% if zabbix_agent2_hostnameitem is defined and zabbix_agent2_hostnameitem %} -HostnameItem={{ zabbix_agent2_hostnameitem }} -{% endif %} -{% if zabbix_agent2_hostmetadata is defined and zabbix_agent2_hostmetadata %} -HostMetadata={{ zabbix_agent2_hostmetadata }} -{% endif %} -{% if zabbix_agent2_hostmetadataitem is defined and zabbix_agent2_hostmetadataitem %} -HostMetadataItem={{ zabbix_agent2_hostmetadataitem }} -{% endif %} -{% if zabbix_agent2_hostinterface is defined and zabbix_agent2_hostinterface %} -HostInterface={{ zabbix_agent2_hostinterface }} -{% endif %} -{% if zabbix_agent2_hostinterfaceitem is defined and zabbix_agent2_hostinterfaceitem %} -HostInterfaceItem={{ zabbix_agent2_hostinterfaceitem }} -{% endif %} -{% if zabbix_agent2_allow_key is defined and zabbix_agent2_allow_key %} -{% for item in zabbix_agent2_allow_key %} -AllowKey={{ item }} -{% endfor %} -{% endif %} -{% if zabbix_agent2_deny_key is defined and zabbix_agent2_deny_key %} -{% for item in zabbix_agent2_deny_key %} -DenyKey={{ item }} -{% endfor %} -{% endif %} -RefreshActiveChecks={{ zabbix_agent2_refreshactivechecks }} -BufferSend={{ zabbix_agent2_buffersend }} -BufferSize={{ zabbix_agent2_buffersize }} -{% if zabbix_agent2_enablepersistentbuffer is defined and zabbix_agent2_enablepersistentbuffer %} -EnablePersistentBuffer={{ zabbix_agent2_enablepersistentbuffer }} -{% endif %} -{% if zabbix_agent2_persistentbufferperiod is defined and zabbix_agent2_persistentbufferperiod %} -PersistentBufferPeriod={{ zabbix_agent2_persistentbufferperiod }} -{% endif %} -{% if zabbix_agent2_persistentbufferfile is defined and zabbix_agent2_persistentbufferfile %} -PersistentBufferFile={{ zabbix_agent2_persistentbufferfile }} -{% endif %} -{% if zabbix_agent2_zabbix_alias is defined and zabbix_agent2_zabbix_alias %} -{% if zabbix_agent2_zabbix_alias is string %} -Alias={{ zabbix_agent2_zabbix_alias }} -{% else %} -{% for item in zabbix_agent2_zabbix_alias %} -Alias={{ item }} -{% endfor %} -{% endif %} -{% endif %} -Timeout={{ zabbix_agent2_timeout }} -{% if ansible_os_family == "Windows" %} -Include={{ zabbix_agent_win_include }} -{% else %} -Include={{ zabbix_agent2_include }}/{{ zabbix_agent2_include_pattern }} -{% endif %} -{% if zabbix_agent2_additional_include is defined and zabbix_agent2_additional_include is iterable and zabbix_agent2_additional_include is not string %} -{% for include in zabbix_agent2_additional_include %} -Include={{ include }} -{% endfor %} -{% endif %} -UnsafeUserParameters={{ zabbix_agent2_unsafeuserparameters }} -{% if ansible_os_family != "Windows" %} -ControlSocket={{ zabbix_agent2_controlsocket }} -{% endif %} -{% if zabbix_agent2_tlsconnect is defined and zabbix_agent2_tlsconnect %} -TLSConnect={{ zabbix_agent2_tlsconnect }} -{% endif %} -{% if zabbix_agent2_tlsaccept is defined and zabbix_agent2_tlsaccept %} -TLSAccept={{ zabbix_agent2_tlsaccept }} -{% endif %} -{% if zabbix_agent2_tlscafile is defined and zabbix_agent2_tlscafile %} -TLSCAFile={{ zabbix_agent2_tlscafile }} -{% endif %} -{% if zabbix_agent2_tlscrlfile is defined and zabbix_agent2_tlscrlfile %} -TLSCRLFile={{ zabbix_agent2_tlscrlfile }} -{% endif %} -{% if zabbix_agent2_tlsservercertissuer is defined and zabbix_agent2_tlsservercertissuer %} -TLSServerCertIssuer={{ zabbix_agent2_tlsservercertissuer }} -{% endif %} -{% if zabbix_agent2_tlsservercertsubject is defined and zabbix_agent2_tlsservercertsubject %} -TLSServerCertSubject={{ zabbix_agent2_tlsservercertsubject }} -{% endif %} -{% if zabbix_agent2_tlscertfile is defined and zabbix_agent2_tlscertfile %} -TLSCertFile={{ zabbix_agent2_tlscertfile }} -{% endif %} -{% if zabbix_agent2_tlskeyfile is defined and zabbix_agent2_tlskeyfile %} -TLSKeyFile={{ zabbix_agent2_tlskeyfile }} -{% endif %} -{% if zabbix_agent2_tlspskidentity is defined and zabbix_agent2_tlspskidentity %} -TLSPSKIdentity={{ zabbix_agent2_tlspskidentity }} -{% endif %} -{% if zabbix_agent2_tlspskfile is defined and zabbix_agent2_tlspskfile %} -TLSPSKFile={{ zabbix_agent2_tlspskfile }} -{% endif %} -{% if zabbix_agent2_plugins is defined and zabbix_agent2_plugins is iterable %} -{% for entry in zabbix_agent2_plugins %} -{% set my_name = entry['name'] %} -{% for property in entry['options'] %} -{% set param = property['parameter'] %} -{% set value = property['value'] %} -Plugins.{{ my_name }}.{{ param }}={{ value }} -{% endfor %} -{% endfor %} -{% endif %} -{% if zabbix_agent_version is version('6.0', '>=') %} -{% if zabbix_agent2_listenbacklog is defined and zabbix_agent2_listenbacklog %} -ListenBacklog={{ zabbix_agent2_listenbacklog }} -{% endif %} -{% endif %} diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/templates/zabbix_agentd.conf.j2 b/ansible_collections/community/zabbix/roles/zabbix_agent/templates/zabbix_agentd.conf.j2 deleted file mode 100644 index 24af45bc3..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/templates/zabbix_agentd.conf.j2 +++ /dev/null @@ -1,149 +0,0 @@ -{{ ansible_managed | comment }} -# This is a configuration file for Zabbix Agent -# To get more information about Zabbix, visit http://www.zabbix.com - -# This configuration file is "minimalized", which means all the original comments -# are removed. The full documentation for your Zabbix Agent can be found here: -# https://www.zabbix.com/documentation/{{ zabbix_agent_version }}/en/manual/appendix/config/zabbix_agentd{{ "_win" if ansible_os_family == "Windows" else "" }} - -{% if ansible_os_family != "Windows" %} -PidFile={{ zabbix_agent_pidfile }} -{% endif %} -{% if zabbix_agent_version is version('3.0', '>=') %} -LogType={{ zabbix_agent_logtype }} -{% endif %} -{% if ansible_os_family == "Windows" %} -LogFile={{ zabbix_agent_win_logfile }} -{% else %} -LogFile={{ zabbix_agent_logfile }} -{% endif %} -LogFileSize={{ zabbix_agent_logfilesize }} -DebugLevel={{ zabbix_agent_debuglevel }} -{% if zabbix_agent_sourceip is defined and zabbix_agent_sourceip %} -SourceIP={{ zabbix_agent_sourceip }} -{% endif %} -{% if zabbix_agent_version is version('6.0', '<=') %} -EnableRemoteCommands={{ zabbix_agent_enableremotecommands }} -{% else %} -{% if zabbix_agent_allowkeys is defined and zabbix_agent_allowkeys %} -AllowKey={{ zabbix_agent_allowkeys }} -{% endif %} -{% if zabbix_agent_denykeys is defined and zabbix_agent_denykeys %} -DenyKey={{ zabbix_agent_denykeys }} -{% endif %} -{% endif %} -LogRemoteCommands={{ zabbix_agent_logremotecommands }} -Server={{ zabbix_agent_server }} -ListenPort={{ zabbix_agent_listenport }} -{% if zabbix_agent_listenip is defined and zabbix_agent_listenip !='0.0.0.0' and zabbix_agent_listenip %} -ListenIP={{ zabbix_agent_listenip }} -{% endif %} -StartAgents={{ zabbix_agent_startagents }} -ServerActive={{ zabbix_agent_serveractive }} -{% if zabbix_agent_hostname is defined and zabbix_agent_hostname %} -Hostname={{ zabbix_agent_hostname }} -{% endif %} -{% if zabbix_agent_hostnameitem is defined and zabbix_agent_hostnameitem %} -HostnameItem={{ zabbix_agent_hostnameitem }} -{% endif %} -{% if zabbix_agent_hostmetadata is defined and zabbix_agent_hostmetadata %} -HostMetadata={{ zabbix_agent_hostmetadata }} -{% endif %} -{% if zabbix_agent_hostmetadataitem is defined and zabbix_agent_hostmetadataitem %} -HostMetadataItem={{ zabbix_agent_hostmetadataitem }} -{% endif %} -{% if zabbix_agent_allow_key is defined and zabbix_agent_allow_key %} -{% for item in zabbix_agent_allow_key %} -AllowKey={{ item }} -{% endfor %} -{% endif %} -{% if zabbix_agent_deny_key is defined and zabbix_agent_deny_key %} -{% for item in zabbix_agent_deny_key %} -DenyKey={{ item }} -{% endfor %} -{% endif %} -RefreshActiveChecks={{ zabbix_agent_refreshactivechecks }} -BufferSend={{ zabbix_agent_buffersend }} -BufferSize={{ zabbix_agent_buffersize }} -MaxLinesPerSecond={{ zabbix_agent_maxlinespersecond }} -{% if zabbix_agent_version is version_compare('6.2', '>=') %} -HeartbeatFrequency={{ zabbix_agent_heartbeatfrequency }} -{% endif %} -{% if zabbix_agent_zabbix_alias is defined and zabbix_agent_zabbix_alias %} -{% if zabbix_agent_zabbix_alias is string %} -Alias={{ zabbix_agent_zabbix_alias }} -{% else %} -{% for item in zabbix_agent_zabbix_alias %} -Alias={{ item }} -{% endfor %} -{% endif %} -{% endif %} -Timeout={{ zabbix_agent_timeout }} -{% if ansible_os_family != "Windows" %} -AllowRoot={{ zabbix_agent_allowroot }} -{% endif %} -{% if zabbix_agent_runas_user is defined and zabbix_agent_runas_user %} -User={{ zabbix_agent_runas_user }} -{% endif %} -{% if ansible_os_family == "Windows" %} -Include={{ zabbix_agent_win_include }} -{% else %} -Include={{ zabbix_agent_include }}/{{ zabbix_agent_include_pattern }} -{% endif %} -{% if zabbix_agent_additional_include is defined and zabbix_agent_additional_include is iterable and zabbix_agent_additional_include is not string %} -{% for include in zabbix_agent_additional_include %} -Include={{ include }} -{% endfor %} -{% endif %} -UnsafeUserParameters={{ zabbix_agent_unsafeuserparameters }} -{% if zabbix_agent_version is version_compare('2.2', '>=') %} -{% if ansible_os_family != "Windows" %} -LoadModulePath={{ zabbix_agent_loadmodulepath }} -{% endif %} -{% endif %} -{% if zabbix_agent_loadmodule is defined and zabbix_agent_loadmodule %} -{% if zabbix_agent_loadmodule is string %} -LoadModule={{ zabbix_agent_loadmodule }} -{% else %} -{% for module in zabbix_agent_loadmodule %} -LoadModule={{ module }} -{% endfor %} -{% endif %} -{% endif %} -{% if zabbix_agent_version is version_compare('3.0', '>=') %} -{% if zabbix_agent_tlsconnect is defined and zabbix_agent_tlsconnect %} -TLSConnect={{ zabbix_agent_tlsconnect }} -{% endif %} -{% if zabbix_agent_tlsaccept is defined and zabbix_agent_tlsaccept %} -TLSAccept={{ zabbix_agent_tlsaccept }} -{% endif %} -{% if zabbix_agent_tlscafile is defined and zabbix_agent_tlscafile %} -TLSCAFile={{ zabbix_agent_tlscafile }} -{% endif %} -{% if zabbix_agent_tlscrlfile is defined and zabbix_agent_tlscrlfile %} -TLSCRLFile={{ zabbix_agent_tlscrlfile }} -{% endif %} -{% if zabbix_agent_tlsservercertissuer is defined and zabbix_agent_tlsservercertissuer %} -TLSServerCertIssuer={{ zabbix_agent_tlsservercertissuer }} -{% endif %} -{% if zabbix_agent_tlsservercertsubject is defined and zabbix_agent_tlsservercertsubject %} -TLSServerCertSubject={{ zabbix_agent_tlsservercertsubject }} -{% endif %} -{% if zabbix_agent_tlscertfile is defined and zabbix_agent_tlscertfile %} -TLSCertFile={{ zabbix_agent_tlscertfile }} -{% endif %} -{% if zabbix_agent_tlskeyfile is defined and zabbix_agent_tlskeyfile %} -TLSKeyFile={{ zabbix_agent_tlskeyfile }} -{% endif %} -{% if zabbix_agent_tlspskidentity is defined and zabbix_agent_tlspskidentity %} -TLSPSKIdentity={{ zabbix_agent_tlspskidentity }} -{% endif %} -{% if zabbix_agent_tlspskfile is defined and zabbix_agent_tlspskfile %} -TLSPSKFile={{ zabbix_agent_tlspskfile }} -{% endif %} -{% endif %} -{% if zabbix_agent_version is version('6.0', '>=') %} -{% if zabbix_agent_listenbacklog is defined and zabbix_agent_listenbacklog %} -ListenBacklog={{ zabbix_agent_listenbacklog }} -{% endif %} -{% endif %} diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/vars/Debian.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/vars/Debian.yml index 4a88411f1..0a9b14650 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/vars/Debian.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/vars/Debian.yml @@ -2,9 +2,6 @@ # vars file for zabbix_agent (Debian) zabbix_agent: zabbix-agent -zabbix_agent_service: zabbix-agent -zabbix_agent_conf: zabbix_agentd.conf -zabbix_agent2_conf: zabbix_agent2.conf zabbix_valid_agent_versions: # Debian @@ -28,6 +25,10 @@ zabbix_valid_agent_versions: - 6.2 - 6.0 # Ubuntu + "24": + - 6.4 + - 6.0 + "22": - 6.4 - 6.2 diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/vars/RedHat.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/vars/RedHat.yml index 50f0b01ec..d4e6c6e3b 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_agent/vars/RedHat.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/vars/RedHat.yml @@ -2,9 +2,6 @@ # vars file for zabbix_agent (RedHat) zabbix_agent: zabbix-agent -zabbix_agent_service: zabbix-agent -zabbix_agent_conf: zabbix_agentd.conf -zabbix_agent2_conf: zabbix_agent2.conf zabbix_valid_agent_versions: "9": diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/vars/agent2_vars.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/vars/agent2_vars.yml new file mode 100644 index 000000000..8c03fa23b --- /dev/null +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/vars/agent2_vars.yml @@ -0,0 +1,9 @@ +_pidfile: /var/run/zabbix/zabbix_agent2.pid +_logfile: /var/log/zabbix/zabbix_agent2.log +_include: /etc/zabbix/zabbix_agent2.d +_tls_subject: "{{ zabbix_agent_tlsservercertsubject | default(omit) }}" # FIXME this is not correct and should be removed with 2.0.0, here only to prevent regression +_win_package: zabbix_agent2-{{ zabbix_version_long }}-windows-amd64-openssl-static.zip +_win_download_link: "{{ zabbix_win_download_url }}/{{ zabbix_version_long | regex_search('^\\d+\\.\\d+') }}/{{ zabbix_version_long }}/{{ zabbix2_win_package }}" +_win_logfile: "{{ zabbix_win_install_dir }}\\zabbix_agent2.log" +_agent_service: zabbix-agent2 +_agent_package: zabbix-agent2 diff --git a/ansible_collections/community/zabbix/roles/zabbix_agent/vars/agent_vars.yml b/ansible_collections/community/zabbix/roles/zabbix_agent/vars/agent_vars.yml new file mode 100644 index 000000000..c37a5ecc3 --- /dev/null +++ b/ansible_collections/community/zabbix/roles/zabbix_agent/vars/agent_vars.yml @@ -0,0 +1,10 @@ +_pidfile: /var/run/zabbix/zabbix_agentd.pid +_logfile: /var/log/zabbix/zabbix_agentd.log +_include: /etc/zabbix/zabbix_agentd.d +_tls_subject: "{{ zabbix_agent_tlsservercertsubject | default(omit) }}" # FIXME this is not correct and should be removed with 2.0.0, here only to prevent regression +_win_package: zabbix_agent-{{ zabbix_version_long }}-windows-amd64-openssl.zip +_win_download_link: "{{ zabbix_win_download_url }}/{{ zabbix_version_long | regex_search('^\\d+\\.\\d+') }}/{{ zabbix_version_long }}/{{ zabbix_win_package }}" +_win_logfile: "{{ zabbix_win_install_dir }}\\zabbix_agentd.log" +_agent_service: zabbix-agent +_agent_package: zabbix-agent +_sender_package: zabbix-sender diff --git a/ansible_collections/community/zabbix/roles/zabbix_javagateway/README.md b/ansible_collections/community/zabbix/roles/zabbix_javagateway/README.md index 47092a6a0..0de7af814 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_javagateway/README.md +++ b/ansible_collections/community/zabbix/roles/zabbix_javagateway/README.md @@ -39,6 +39,7 @@ See the following list of supported Operating systems with the Zabbix releases. | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | | Red Hat Fam 7 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | V | V | V | diff --git a/ansible_collections/community/zabbix/roles/zabbix_javagateway/tasks/Debian.yml b/ansible_collections/community/zabbix/roles/zabbix_javagateway/tasks/Debian.yml index ad762aa3b..fd970ab75 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_javagateway/tasks/Debian.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_javagateway/tasks/Debian.yml @@ -46,10 +46,15 @@ Components: {{ zabbix_repo_deb_component }} Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}} Signed-By: {{ zabbix_gpg_key }} + register: zabbix_repo become: true tags: - install +- name: "Debian | Update apt cache if repo was added" + ansible.builtin.apt: update_cache=yes + when: zabbix_repo is changed + - name: "Debian | Installing zabbix-java-gateway" ansible.builtin.apt: pkg: zabbix-java-gateway diff --git a/ansible_collections/community/zabbix/roles/zabbix_javagateway/vars/Debian.yml b/ansible_collections/community/zabbix/roles/zabbix_javagateway/vars/Debian.yml index 7c36d2d3a..0ea96ac7e 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_javagateway/vars/Debian.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_javagateway/vars/Debian.yml @@ -12,6 +12,9 @@ zabbix_valid_javagateway_versions: - 6.2 - 6.0 # Ubuntu + "24": + - 6.4 + - 6.0 "22": - 6.4 - 6.2 diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/README.md b/ansible_collections/community/zabbix/roles/zabbix_proxy/README.md index ee558c8b7..703ec6059 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/README.md +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/README.md @@ -82,6 +82,7 @@ See the following list of supported Operating systems with the Zabbix releases. | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | | Red Hat Fam 7 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | V | V | V | diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/defaults/main.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/defaults/main.yml index b2b74ebec..635c40f40 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/defaults/main.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/defaults/main.yml @@ -43,8 +43,6 @@ zabbix_repo_yum_schema: https zabbix_repo_yum_gpgcheck: 0 zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_proxy_version }}/{{ ansible_facts.lsb.id | default(ansible_facts['distribution']) | lower }}{% if ansible_facts['architecture'] == 'aarch64' and ansible_facts.lsb.id | default(ansible_facts['distribution']) in ['Debian', 'Ubuntu'] %}-arm64{% endif %}" zabbix_repo_deb_component: main -zabbix_proxy_disable_repo: - - epel zabbix_repo_yum: - name: zabbix description: Zabbix Official Repository - $basearch diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/Debian.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/Debian.yml index bef68b27a..94b56890c 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/Debian.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/Debian.yml @@ -2,7 +2,6 @@ - name: "Debian | Set short version name" ansible.builtin.set_fact: zabbix_short_version: "{{ zabbix_proxy_version | regex_replace('\\.', '') }}" - zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}" zabbix_underscore_version: "{{ zabbix_proxy_version | regex_replace('\\.', '_') }}" tags: - always @@ -102,108 +101,3 @@ become: true tags: - install - -- name: "Debian | Installing zabbix-proxy-{{ zabbix_proxy_database }}" - ansible.builtin.apt: - pkg: "zabbix-proxy-{{ zabbix_proxy_database }}" - update_cache: true - cache_valid_time: 0 - force: true - state: "{{ zabbix_proxy_package_state }}" - default_release: "{{ ansible_distribution_release }}" - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: is_zabbix_proxy_package_installed - until: is_zabbix_proxy_package_installed is succeeded - become: true - tags: - - install - -- name: "Debian | Installing zabbix-sql-scripts" - ansible.builtin.apt: - pkg: zabbix-sql-scripts - state: "{{ zabbix_proxy_package_state }}" - update_cache: true - cache_valid_time: 0 - default_release: "{{ ansible_distribution_release }}" - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_proxy_package_sql_installed - until: zabbix_proxy_package_sql_installed is succeeded - when: - - zabbix_proxy_version is version('6.0', '>=') - become: true - tags: - - install - -- name: "Debian | Install Ansible module dependencies" - ansible.builtin.apt: - name: "{{ zabbix_python_prefix }}-psycopg2" - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_proxy_dependencies_installed - until: zabbix_proxy_dependencies_installed is succeeded - become: true - when: - - zabbix_proxy_database_creation - tags: - - install - - dependencies - -- name: "Debian | Install Mysql Client package" - ansible.builtin.apt: - name: "{{ mysql_client_pkgs[ansible_distribution_major_version] }}" - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_proxy_dependencies_installed - until: zabbix_proxy_dependencies_installed is succeeded - become: true - when: - - zabbix_proxy_database == 'mysql' - - zabbix_proxy_install_database_client - tags: - - install - - dependencies - - database - -- name: "Debian | Install PostgreSQL Client package" - ansible.builtin.apt: - name: postgresql-client - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: are_zabbix_proxy_dependency_packages_installed - until: are_zabbix_proxy_dependency_packages_installed is succeeded - become: true - when: - - zabbix_proxy_database_creation or zabbix_proxy_database_sqlload - - zabbix_proxy_database == 'pgsql' - - zabbix_proxy_install_database_client - tags: - - install - - dependencies - - database - -- name: "Debian | Install sqlite3" - ansible.builtin.apt: - name: sqlite3 - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: are_zabbix_proxy_dependency_packages_installed - until: are_zabbix_proxy_dependency_packages_installed is succeeded - become: true - when: - - zabbix_proxy_database == 'sqlite3' - tags: - - install - - dependencies - - database diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/RedHat.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/RedHat.yml index f35b3c7b3..a51baee63 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/RedHat.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/RedHat.yml @@ -7,19 +7,6 @@ tags: - always -- name: "RedHat | Define package without version" - ansible.builtin.set_fact: - zabbix_proxy_package: "zabbix-proxy-{{ zabbix_proxy_database }}" - cacheable: true - tags: - - always - -- name: "RedHat | Set facts for Zabbix" - ansible.builtin.set_fact: - datafiles_path: "/usr/share/doc/zabbix-sql-scripts/{{ zabbix_proxy_db_long }}" - tags: - - always - - name: "RedHat | Make sure old file is absent" ansible.builtin.file: path: /etc/yum.repos.d/zabbix-supported.repo @@ -47,99 +34,10 @@ tags: - install -- name: Install packages for Zabbix Repository - block: - - name: "RedHat | Installing zabbix-proxy-{{ zabbix_proxy_database }}" - ansible.builtin.yum: - pkg: "{{ zabbix_proxy_package }}-{{ zabbix_proxy_version }}.{{ zabbix_proxy_version_minor }}" - state: "{{ zabbix_proxy_package_state }}" - disablerepo: "{{ zabbix_proxy_disable_repo | default(omit) }}" - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - become: true - register: is_zabbix_proxy_package_installed - until: is_zabbix_proxy_package_installed is succeeded - - - name: "RedHat | Installing zabbix-sql-scripts" - ansible.builtin.yum: - pkg: "zabbix-sql-scripts-{{ zabbix_proxy_version }}.{{ zabbix_proxy_version_minor }}" - state: "{{ zabbix_proxy_package_state }}" - disablerepo: "{{ zabbix_proxy_disable_repo | default(omit) }}" - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_proxy_sql_package_installed - until: zabbix_proxy_sql_package_installed is succeeded - become: true - tags: - - install - -- name: "RedHat | Install Ansible PostgreSQL Client package" +- name: "RedHat | Add EPEL Repo (Centos 7 Only)" + when: ansible_facts['distribution_major_version'] == '7' ansible.builtin.yum: - name: "{{ pgsql_depenencies[ansible_distribution_major_version] }}" - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - become: true - register: are_zabbix_proxy_pgsql_packages_installed - until: are_zabbix_proxy_pgsql_packages_installed is succeeded - when: - - zabbix_proxy_database_creation or zabbix_proxy_database_sqlload - - zabbix_proxy_database == 'pgsql' - tags: - - install - - database - - dependencies - -- name: "RedHat | Install Mysql Client Package" - block: - - name: "RedHat | Add Mysql Repo (Centos 7 Only)" - ansible.builtin.yum_repository: - name: mariadb - description: MariaDB 10.8 CentOS repository list - file: mariadb - baseurl: "https://mirror.rackspace.com/mariadb/yum/10.11/centos{{ ansible_distribution_major_version }}-amd64" - gpgcheck: no - when: ansible_distribution_major_version == '7' - - - name: "RedHat | Install Mysql Client package" - ansible.builtin.yum: - name: "{{ mysql_client_pkgs[ansible_distribution_major_version] }}" - state: installed - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - become: true - register: are_zabbix_proxy_mysql_packages_installed - until: are_zabbix_proxy_mysql_packages_installed is succeeded - when: - - zabbix_proxy_database_creation or zabbix_proxy_database_sqlload - - zabbix_proxy_install_database_client - - zabbix_proxy_database == 'mysql' - tags: - - install - - database - - dependencies - -- name: "RedHat | Install sqlite3" - ansible.builtin.yum: - name: - - sqlite - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_proxy_sqlite_packages_installed - until: zabbix_proxy_sqlite_packages_installed is succeeded - become: true - when: - - zabbix_proxy_database == 'sqlite3' - tags: - - install - - database - - dependencies + name: epel-release - name: "Configure SELinux when enabled" ansible.builtin.include_tasks: selinux.yml diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/initialize-mysql.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/initialize-mysql.yml new file mode 100644 index 000000000..e3b525a83 --- /dev/null +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/initialize-mysql.yml @@ -0,0 +1,144 @@ +--- +# task file for mysql +- name: "Install MySQL dependencies" + when: zabbix_proxy_database_creation or zabbix_proxy_database_sqlload + ansible.builtin.package: + name: "{{ _zabbix_proxy_mysql_dependencies[ ansible_facts['distribution_major_version'] ] | select | list }}" + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + become: true + register: _zabbix_proxy_dependencies_installed + until: _zabbix_proxy_dependencies_installed is succeeded + tags: + - install + - database + - dependencies + +# NOTE: Upgrading system-packages with pip is generally a bad idea, but +# these packaged older versions seems to have a problem with mysql 8 and above +- name: Upgrade pymysql + when: + - ansible_facts['distribution'] in ['CentOS', 'Debian', 'Ubuntu'] + - ansible_facts['distribution_release'] in ['Core', 'buster', 'bullseye', 'bionic', 'focal'] + ansible.builtin.pip: + name: "pymysql>=0.10.0,<0.11.0" + state: latest + +- name: "MySQL Database prep" + when: zabbix_proxy_database_creation | bool + delegate_to: "{{ zabbix_proxy_real_dbhost | default(zabbix_proxy_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname)) }}" + vars: + delegated_dbhost: "{{ (zabbix_proxy_dbhost == 'localhost') | ternary(inventory_hostname, zabbix_proxy_dbhost) }}" + tags: + - database + - skip_ansible_lint + block: + - name: "MySQL | Create database" + community.mysql.mysql_db: + login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" + login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" + login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" + login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" + login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" + name: "{{ zabbix_proxy_dbname }}" + encoding: "{{ zabbix_proxy_dbencoding }}" + collation: "{{ zabbix_proxy_dbcollation }}" + state: present + register: zabbix_database_created + + - name: "MySQL | Create database user" + community.mysql.mysql_user: + login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" + login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" + login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" + login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" + login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" + name: "{{ zabbix_proxy_dbuser }}" + password: "{{ zabbix_proxy_dbpassword }}" + priv: "{{ zabbix_proxy_dbname }}.*:ALL" + host: "{{ zabbix_proxy_privileged_host }}" + plugin: "{{ 'mysql_native_password' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') else omit }}" + state: present + +- name: "MySQL verify or create schema" + when: zabbix_proxy_database_sqlload | bool + tags: + - database + block: + - name: "MySQL | Get current database version" + community.mysql.mysql_query: + login_user: "{{ zabbix_proxy_dbuser }}" + login_password: "{{ zabbix_proxy_dbpassword }}" + login_host: "{{ zabbix_proxy_dbhost }}" + login_port: "{{ zabbix_proxy_dbport }}" + login_db: "{{ zabbix_proxy_dbname }}" + query: 'SELECT mandatory FROM dbversion' + rescue: + - name: "MySQL | Get and set schema import overrides" + delegate_to: "{{ zabbix_proxy_real_dbhost | default(zabbix_proxy_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname)) }}" + vars: + delegated_dbhost: "{{ (zabbix_proxy_dbhost == 'localhost') | ternary(inventory_hostname, zabbix_proxy_dbhost) }}" + block: + - name: "MySQL | Get current value for variables" + community.mysql.mysql_variables: + variable: "{{ name }}" + login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" + login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" + login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" + login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" + login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" + loop: + - innodb_default_row_format + - log_bin_trust_function_creators + loop_control: + loop_var: name + register: _mysql_variable_defaults + + - name: "MySQL | Set variable overrides for schema import" + when: item.msg != _mysql_schema_import_overrides[item.name] + community.mysql.mysql_variables: + variable: "{{ item.name }}" + value: "{{ _mysql_schema_import_overrides[item.name] }}" + login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" + login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" + login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" + login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" + login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" + loop: "{{ _mysql_variable_defaults.results }}" + loop_control: + label: "{{ item.name }}: {{ _mysql_schema_import_overrides[item.name] }}" + vars: + _mysql_schema_import_overrides: + innodb_default_row_format: "dynamic" + log_bin_trust_function_creators: "ON" + + - name: "MySQL | Import schema" + community.mysql.mysql_db: + login_user: "{{ zabbix_proxy_dbuser }}" + login_password: "{{ zabbix_proxy_dbpassword }}" + login_host: "{{ zabbix_proxy_dbhost }}" + login_port: "{{ zabbix_proxy_dbport }}" + name: "{{ zabbix_proxy_dbname }}" + encoding: "{{ zabbix_proxy_dbencoding }}" + collation: "{{ zabbix_proxy_dbcollation }}" + state: import + target: /usr/share/zabbix-sql-scripts/mysql/proxy.sql + + always: + - name: "MySQL | Revert variable overrides for schema import" + when: _mysql_variable_defaults is defined + delegate_to: "{{ zabbix_proxy_real_dbhost | default(zabbix_proxy_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname)) }}" + vars: + delegated_dbhost: "{{ (zabbix_proxy_dbhost == 'localhost') | ternary(inventory_hostname, zabbix_proxy_dbhost) }}" + community.mysql.mysql_variables: + variable: "{{ item.name }}" + value: "{{ item.msg }}" + login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" + login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" + login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" + login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" + login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" + loop: "{{ _mysql_variable_defaults.results | default([]) }}" + loop_control: + label: "{{ item.name }}: {{ item.msg }}" diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/initialize-pgsql.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/initialize-pgsql.yml new file mode 100644 index 000000000..fc2c675ab --- /dev/null +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/initialize-pgsql.yml @@ -0,0 +1,73 @@ +--- +# task file for postgresql +- name: "Install PostgreSQL dependencies" + when: zabbix_proxy_database_creation or zabbix_proxy_database_sqlload + ansible.builtin.package: + name: "{{ _zabbix_proxy_pgsql_dependencies | select | list }}" + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + become: true + register: _zabbix_proxy_pgsql_packages_installed + until: _zabbix_proxy_pgsql_packages_installed is succeeded + tags: + - install + - database + - dependencies + +- name: "PostgreSQL Database prep" + when: zabbix_proxy_database_creation | bool + become: "{{ zabbix_proxy_dbhost_run_install }}" + become_user: postgres + delegate_to: "{{ zabbix_proxy_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname) }}" + vars: + delegated_dbhost: "{{ (zabbix_proxy_dbhost == 'localhost') | ternary(inventory_hostname, zabbix_proxy_dbhost) }}" + tags: + - database + block: + - name: "PostgreSQL | Create database" + community.postgresql.postgresql_db: + login_user: "{{ zabbix_proxy_pgsql_login_user | default(omit) }}" + login_password: "{{ zabbix_proxy_pgsql_login_password | default(omit) }}" + login_host: "{{ zabbix_proxy_pgsql_login_host | default(omit) }}" + port: "{{ zabbix_proxy_dbport }}" + login_unix_socket: "{{ zabbix_proxy_pgsql_login_unix_socket | default(omit) }}" + name: "{{ zabbix_proxy_dbname }}" + state: present + + - name: "PostgreSQL | Create database user" + community.postgresql.postgresql_user: + login_user: "{{ zabbix_proxy_pgsql_login_user | default(omit) }}" + login_password: "{{ zabbix_proxy_pgsql_login_password | default(omit) }}" + login_host: "{{ zabbix_proxy_pgsql_login_host | default(omit) }}" + port: "{{ zabbix_proxy_dbport }}" + name: "{{ zabbix_proxy_dbuser }}" + password: "{{ ('md5' + (zabbix_proxy_dbpassword + zabbix_proxy_dbuser)|hash('md5')) if zabbix_proxy_dbpassword_hash_method == 'md5' else zabbix_proxy_dbpassword }}" + db: "{{ zabbix_proxy_dbname }}" + priv: ALL + state: present + encrypted: true + +- name: "PostgreSQL verify or create schema" + when: zabbix_proxy_database_sqlload | bool + tags: + - database + block: + - name: "PostgreSQL | Get current database version" + community.postgresql.postgresql_query: + login_user: "{{ zabbix_proxy_dbuser }}" + login_password: "{{ zabbix_proxy_dbpassword }}" + login_host: "{{ zabbix_proxy_dbhost }}" + port: "{{ zabbix_proxy_dbport }}" + db: "{{ zabbix_proxy_dbname }}" + query: 'SELECT mandatory FROM dbversion' + rescue: + - name: "PostgreSQL | Import schema" + community.postgresql.postgresql_db: + login_user: "{{ zabbix_proxy_dbuser }}" + login_password: "{{ zabbix_proxy_dbpassword }}" + login_host: "{{ zabbix_proxy_dbhost }}" + port: "{{ zabbix_proxy_dbport }}" + db: "{{ zabbix_proxy_dbname }}" + state: restore + target: /usr/share/zabbix-sql-scripts/postgresql/proxy.sql diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/initialize-sqlite3.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/initialize-sqlite3.yml new file mode 100644 index 000000000..ae8f8602b --- /dev/null +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/initialize-sqlite3.yml @@ -0,0 +1,62 @@ +--- +# task file for sqlite3 +- name: "Install SQLite3 dependencies" + when: zabbix_proxy_database_creation or zabbix_proxy_database_sqlload + ansible.builtin.package: + name: "{{ _zabbix_proxy_sqlite3_dependencies }}" + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + become: true + register: _zabbix_proxy_sqlite3_packages_installed + until: _zabbix_proxy_sqlite3_packages_installed is succeeded + tags: + - install + - database + - dependencies + +- name: "SQLite3 | Set path for default dbname" + when: zabbix_proxy_dbname == "zabbix_proxy" + ansible.builtin.set_fact: + zabbix_proxy_dbname: /var/lib/zabbix/zabbix_proxy.db + tags: + - database + +- name: "SQLite3 Database prep" + when: zabbix_proxy_database_creation | bool + become: true + tags: + - database + block: + - name: "SQLite3 | Create path directories" + ansible.builtin.file: + state: directory + name: "{{ zabbix_proxy_dbname | dirname }}" + mode: "0744" + owner: "{{ zabbix_os_user }}" + group: "{{ zabbix_os_user }}" + seuser: system_u + serole: object_r + setype: zabbix_var_lib_t + + - name: "SQLite3 | Import schema" + when: zabbix_proxy_database_sqlload + become_user: "{{ zabbix_os_user }}" + ansible.builtin.shell: | + set -euxo pipefail + sqlite3 {{ zabbix_proxy_dbname }} < /usr/share/zabbix-sql-scripts/sqlite3/proxy.sql + args: + creates: "{{ zabbix_proxy_dbname }}" + executable: /bin/bash + + - name: "Sqlite3 | Fix zabbix db file permission (SELinux)" + when: ansible_selinux.status == "enabled" + ansible.builtin.file: + state: file + path: "{{ zabbix_proxy_dbname }}" + mode: "0600" + owner: "{{ zabbix_os_user }}" + group: "{{ zabbix_os_user }}" + seuser: system_u + serole: object_r + setype: zabbix_var_lib_t diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/main.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/main.yml index 1e8831c35..3043bdaef 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/main.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/main.yml @@ -35,13 +35,6 @@ zabbix_api_server_port: "{{ '443' if zabbix_api_use_ssl|bool else '80' }}" when: zabbix_api_server_port is undefined -- name: Set Path to SQL File - ansible.builtin.set_fact: - datafile_path: "{{ db_file_path[zabbix_short_version] }}" - tags: - - install - - config - - name: "Set default ip address for zabbix_proxy_ip" ansible.builtin.set_fact: zabbix_proxy_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4'].address }}" @@ -56,54 +49,45 @@ - name: "Complete OS Specific Tasks" ansible.builtin.include_tasks: "{{ ansible_os_family }}.yml" -- name: "Get the file for database schema" - ansible.builtin.shell: ls -1 {{ db_file_path[zabbix_short_version] }} - changed_when: false +- name: "Install zabbix-proxy packages" + ansible.builtin.package: + name: "{{ _zabbix_proxy_packages }}" + state: "{{ zabbix_proxy_package_state }}" + update_cache: true + disablerepo: "{{ zabbix_proxy_disable_repo | default(_zabbix_proxy_disable_repo | default(omit)) }}" + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + register: _zabbix_proxy_package_installed + until: _zabbix_proxy_package_installed is succeeded become: true - when: - - zabbix_proxy_database_sqlload - register: ls_output_schema tags: - - database + - install -- name: "Installing the database" - ansible.builtin.include_tasks: "{{ zabbix_proxy_db_long }}.yml" +- name: "Initialize the database" + ansible.builtin.include_tasks: "initialize-{{ zabbix_proxy_database }}.yml" -- name: "Create include dir zabbix-proxy" +- name: "Create directories" ansible.builtin.file: - path: "{{ zabbix_proxy_include }}" - owner: "{{ zabbix_os_user }}" - group: "{{ zabbix_os_user }}" - mode: "{{ zabbix_proxy_include_mode }}" state: directory - become: true - tags: - - install - - config - -- name: "Create module dir zabbix-proxy" - ansible.builtin.file: - path: "{{ zabbix_proxy_loadmodulepath }}" + path: "{{ item.path }}" owner: "{{ zabbix_os_user }}" group: "{{ zabbix_os_user }}" - state: directory - mode: "0755" + mode: "{{ item.mode | default('0755') }}" become: true + loop: + - path: "{{ zabbix_proxy_include }}" + mode: "{{ zabbix_proxy_include_mode }}" + - path: "{{ zabbix_proxy_loadmodulepath }}" + - required: "{{ zabbix_proxy_tlspskfile is defined }}" + path: "{{ zabbix_proxy_tlspskfile | default('/path/to/zabbix_proxy_tlspskfile/zabbix_proxy.psk') | dirname }}" + loop_control: + label: "{{ item.path }}" + when: item.required | default(true) tags: - install - config -- name: "Create directory for PSK file if not exist." - ansible.builtin.file: - path: "{{ zabbix_proxy_tlspskfile | dirname }}" - mode: 0755 - state: directory - become: true - when: - - zabbix_proxy_tlspskfile is defined - tags: - - config - - name: "Place TLS PSK File" ansible.builtin.copy: dest: "{{ zabbix_proxy_tlspskfile }}" diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/mysql.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/mysql.yml deleted file mode 100644 index dde847a53..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/mysql.yml +++ /dev/null @@ -1,172 +0,0 @@ ---- -# task file for mysql -- name: "MySQL | Set the correct delegated_dbhost (to support MySQL db deployment on a remote dbhost)" - ansible.builtin.set_fact: - delegated_dbhost: "{{ zabbix_proxy_dbhost if (zabbix_proxy_dbhost != 'localhost') else inventory_hostname }}" - when: - - zabbix_proxy_dbhost_run_install - tags: - - database - -- name: "MySQL | Set the correct delegated_dbhost (to support MySQL db deployment on a remote dbhost)" - ansible.builtin.set_fact: - delegated_dbhost: "{{ inventory_hostname }}" - when: - - not zabbix_proxy_dbhost_run_install - tags: - - database - -- name: "MySQL | Override delegated_dbhost with real dbhost when dbhost is behind loadbalancer" - ansible.builtin.set_fact: - delegated_dbhost: "{{ zabbix_proxy_real_dbhost }}" - when: zabbix_proxy_real_dbhost | default(false) - tags: - - database - -- name: PyMySQL - ansible.builtin.pip: - name: PyMySQL - register: installation_dependencies - until: installation_dependencies is succeeded - tags: - - database - -- name: "MySQL | Create database" - community.mysql.mysql_db: - name: "{{ zabbix_proxy_dbname }}" - encoding: "{{ zabbix_proxy_dbencoding }}" - collation: "{{ zabbix_proxy_dbcollation }}" - login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" - login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" - login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" - login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" - login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" - state: present - when: zabbix_proxy_database_creation - register: zabbix_database_created - delegate_to: "{{ delegated_dbhost }}" - tags: - - database - - skip_ansible_lint - -- name: "MySQL | Create database user" - community.mysql.mysql_user: - login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" - login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" - login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" - login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" - login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" - name: "{{ zabbix_proxy_dbuser }}" - password: "{{ zabbix_proxy_dbpassword }}" - priv: "{{ zabbix_proxy_dbname }}.*:ALL" - host: "{{ zabbix_proxy_privileged_host }}" - plugin: "{{ 'mysql_native_password' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') else omit }}" - state: present - when: zabbix_proxy_database_creation - delegate_to: "{{ delegated_dbhost }}" - tags: - - database - -- name: "MySQL | Check if we have done files" - ansible.builtin.stat: - path: /etc/zabbix/schema.done - register: done_file - become: true - when: - - zabbix_proxy_database_sqlload - tags: - - database - -- name: "MySQL | Get version_comment" - community.mysql.mysql_variables: - variable: version - login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" - login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" - login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" - login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" - login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" - delegate_to: "{{ delegated_dbhost }}" - register: install_mysql_version - tags: - - database - -- name: "MySQL | Get current value for innodb_default_row_format" - community.mysql.mysql_variables: - variable: innodb_default_row_format - login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" - login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" - login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" - login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" - login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" - delegate_to: "{{ delegated_dbhost }}" - register: mysql_innodb_default_row_format - when: - - install_mysql_version.msg is version('5.6', '>=') - tags: - - database - -- name: "MySQL | Set innodb_default_row_format to dynamic" - community.mysql.mysql_variables: - variable: innodb_default_row_format - value: dynamic - login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" - login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" - login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" - login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" - login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" - when: - - zabbix_proxy_database_sqlload | bool - - not done_file.stat.exists - - install_mysql_version.msg is version('5.6', '>=') - - mysql_innodb_default_row_format.msg != 'dynamic' - delegate_to: "{{ delegated_dbhost }}" - tags: - - database - -- name: "MySQL | Create database and import file" - community.mysql.mysql_db: - login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" - login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" - login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" - login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" - login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" - name: "{{ zabbix_proxy_dbname }}" - encoding: "{{ zabbix_proxy_dbencoding }}" - collation: "{{ zabbix_proxy_dbcollation }}" - state: import - target: "{{ ls_output_schema.stdout }}" - when: - - zabbix_proxy_database_sqlload - - not done_file.stat.exists - delegate_to: "{{ delegated_dbhost }}" - tags: - - database - -- name: "MySQL | Revert innodb_default_row_format to previous value" - community.mysql.mysql_variables: - variable: innodb_default_row_format - value: "{{ mysql_innodb_default_row_format.msg }}" - login_host: "{{ zabbix_proxy_mysql_login_host | default(omit) }}" - login_user: "{{ zabbix_proxy_mysql_login_user | default(omit) }}" - login_password: "{{ zabbix_proxy_mysql_login_password | default(omit) }}" - login_port: "{{ zabbix_proxy_mysql_login_port | default(omit) }}" - login_unix_socket: "{{ zabbix_proxy_mysql_login_unix_socket | default(omit) }}" - when: - - zabbix_proxy_database_sqlload | bool - - not done_file.stat.exists - - mysql_innodb_default_row_format.msg != 'dynamic' - delegate_to: "{{ delegated_dbhost }}" - tags: - - database - -- name: "MySQL | Create done file" - ansible.builtin.file: - path: /etc/zabbix/schema.done - state: touch - mode: "0644" - become: true - when: - - zabbix_proxy_database_sqlload - - not done_file.stat.exists - tags: - - database diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/postgresql.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/postgresql.yml deleted file mode 100644 index e71af9aba..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/postgresql.yml +++ /dev/null @@ -1,96 +0,0 @@ ---- -# task file for postgresql - -- name: "PostgreSQL | Set the correct delegated_dbhost (to support postgres db deployment on a remote dbhost)" - ansible.builtin.set_fact: - delegated_dbhost: "{{ zabbix_proxy_dbhost if (zabbix_proxy_dbhost != 'localhost') else inventory_hostname }}" - when: - - zabbix_proxy_dbhost_run_install - tags: - - database - -- name: "PostgreSQL | Set the correct delegated_dbhost (to support postgres db deployment on a remote dbhost)" - ansible.builtin.set_fact: - delegated_dbhost: "{{ inventory_hostname }}" - when: - - not zabbix_proxy_dbhost_run_install - tags: - - database - -- name: "PostgreSQL | Delegated" - block: - - name: "PostgreSQL | Delegated | Create database" - community.postgresql.postgresql_db: - name: "{{ zabbix_proxy_dbname }}" - port: "{{ zabbix_proxy_dbport }}" - state: present - - - name: "PostgreSQL | Delegated | Create database user" - community.postgresql.postgresql_user: - db: "{{ zabbix_proxy_dbname }}" - name: "{{ zabbix_proxy_dbuser }}" - password: "{{ ('md5' + (zabbix_proxy_dbpassword + zabbix_proxy_dbuser)|hash('md5')) if zabbix_proxy_dbpassword_hash_method == 'md5' else zabbix_proxy_dbpassword }}" - port: "{{ zabbix_proxy_dbport }}" - priv: ALL - state: present - encrypted: true - become: true - become_user: postgres - delegate_to: "{{ delegated_dbhost }}" - when: - - zabbix_proxy_database_creation - - zabbix_proxy_pgsql_login_host is not defined - tags: - - database - -- name: "PostgreSQL | Remote" - block: - - name: "PostgreSQL | Remote | Create database" - community.postgresql.postgresql_db: - login_host: "{{ zabbix_proxy_pgsql_login_host | default(omit) }}" - login_user: "{{ zabbix_proxy_pgsql_login_user | default(omit) }}" - login_password: "{{ zabbix_proxy_pgsql_login_password | default(omit) }}" - login_unix_socket: "{{ zabbix_proxy_pgsql_login_unix_socket | default(omit) }}" - name: "{{ zabbix_proxy_dbname }}" - port: "{{ zabbix_proxy_dbport }}" - state: present - - name: "PostgreSQL | Remote | Create database user" - community.postgresql.postgresql_user: - login_host: "{{ zabbix_proxy_pgsql_login_host | default(omit) }}" - login_user: "{{ zabbix_proxy_pgsql_login_user | default(omit) }}" - login_password: "{{ zabbix_proxy_pgsql_login_password | default(omit) }}" - db: "{{ zabbix_proxy_dbname }}" - name: "{{ zabbix_proxy_dbuser }}" - password: "{{ ('md5' + (zabbix_proxy_dbpassword + zabbix_proxy_dbuser)|hash('md5')) if zabbix_proxy_dbpassword_hash_method == 'md5' else zabbix_proxy_dbpassword }}" - port: "{{ zabbix_proxy_dbport }}" - priv: ALL - state: present - encrypted: true - when: - - zabbix_proxy_database_creation - - zabbix_proxy_pgsql_login_host is defined - tags: - - database - -- name: "PostgreSQL | Handle Compressed Schema File" - ansible.builtin.set_fact: - zabbix_proxy_cat_cmd: zcat - when: "'.gz' in ls_output_schema.stdout" - tags: - - database - -- name: "PostgreSQL | Importing schema file" - ansible.builtin.shell: | - set -euxo pipefail - {{ zabbix_proxy_cat_cmd }} {{ ls_output_schema.stdout }} | psql -h '{{ zabbix_proxy_dbhost }}' -U '{{ zabbix_proxy_dbuser }}' -d '{{ zabbix_proxy_dbname }}' - touch /etc/zabbix/schema.done - args: - creates: /etc/zabbix/schema.done - executable: /bin/bash - environment: - PGPASSWORD: "{{ zabbix_proxy_dbpassword }}" - become: true - when: - - zabbix_proxy_database_creation - tags: - - database diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/sqlite3.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/sqlite3.yml deleted file mode 100644 index 3d74b73e7..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/sqlite3.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -# task file for sqlite3 - -- name: "Sqlite3 | Default Database Path" - ansible.builtin.set_fact: - zabbix_proxy_dbname: /var/lib/zabbix/zabbix_proxy.db - when: - - zabbix_proxy_dbname == "zabbix_proxy" - tags: - - database - -- name: "Sqlite3 | Create database" - ansible.builtin.file: - name: "{{ zabbix_proxy_dbname | dirname }}" - mode: 0744 - owner: "{{ zabbix_os_user }}" - group: "{{ zabbix_os_user }}" - seuser: system_u - serole: object_r - setype: zabbix_var_lib_t - state: directory - become: true - when: - - zabbix_proxy_database_creation - tags: - - database - -- name: "Sqlite3 | Handle Compressed Schema File" - ansible.builtin.set_fact: - zabbix_proxy_cat_cmd: zcat - when: "'.gz' in ls_output_schema.stdout" - tags: - - database - -- name: "Sqlite3 | Importing schema file" - become: true - become_user: "{{ zabbix_os_user }}" - ansible.builtin.shell: | - set -euxo pipefail - {{ zabbix_proxy_cat_cmd }} {{ ls_output_schema.stdout }} | sqlite3 {{ zabbix_proxy_dbname }} - args: - creates: "{{ zabbix_proxy_dbname }}" - executable: /bin/bash - environment: - PGPASSWORD: "{{ zabbix_proxy_dbpassword }}" - when: - - zabbix_proxy_database_creation - tags: - - database - -- name: "Sqlite3 | Fix zabbix db file permission (SELinux)" - ansible.builtin.file: - path: "{{ zabbix_proxy_dbname }}" - state: file - seuser: system_u - serole: object_r - setype: zabbix_var_lib_t - become: true - when: - - ansible_selinux.status == "enabled" - - zabbix_proxy_database_creation - tags: - - database diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/templates/zabbix_proxy.conf.j2 b/ansible_collections/community/zabbix/roles/zabbix_proxy/templates/zabbix_proxy.conf.j2 index 60ae3f0a5..3d585cbab 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/templates/zabbix_proxy.conf.j2 +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/templates/zabbix_proxy.conf.j2 @@ -7,9 +7,7 @@ # https://www.zabbix.com/documentation/{{ zabbix_proxy_version }}/en/manual/appendix/config/zabbix_proxy {{ (zabbix_proxy_allowroot is defined and zabbix_proxy_allowroot is not none) | ternary('','# ') }}AllowRoot={{ zabbix_proxy_allowroot | default('') }} -{% if zabbix_proxy_version is version('6.0', '>=') %} {{ (zabbix_proxy_allowunsupporteddbversions is defined and zabbix_proxy_allowunsupporteddbversions is not none) | ternary('','# ') }}AllowUnsupportedDBVersions={{ zabbix_proxy_allowunsupporteddbversions | default('') }} -{% endif %} {{ (zabbix_proxy_cachesize is defined and zabbix_proxy_cachesize is not none) | ternary('','# ') }}CacheSize={{ zabbix_proxy_cachesize | default('') }} {{ (zabbix_proxy_configfrequency is defined and zabbix_proxy_configfrequency is not none) | ternary('','# ') }}ConfigFrequency={{ zabbix_proxy_configfrequency | default('') }} {{ (zabbix_proxy_datasenderfrequency is defined and zabbix_proxy_datasenderfrequency is not none) | ternary('','# ') }}DataSenderFrequency={{ zabbix_proxy_datasenderfrequency | default('') }} diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/Debian.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/Debian.yml index 1362e557e..af274952b 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/Debian.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/Debian.yml @@ -11,6 +11,9 @@ zabbix_valid_proxy_versions: - 6.4 - 6.2 - 6.0 + "24": + - 6.4 + - 6.0 "22": - 6.4 - 6.2 @@ -24,27 +27,37 @@ zabbix_valid_proxy_versions: - 6.2 - 6.0 -mysql_client_pkgs: +_zabbix_proxy_pgsql_dependencies: + - "{{ zabbix_proxy_install_database_client | ternary('postgresql-client', '') }}" + - python3-psycopg2 + +_zabbix_proxy_mysql_dependencies: # Debian "12": - default-mysql-client - - "{{ zabbix_python_prefix }}-mysqldb" + - python3-pymysql "11": - default-mysql-client - - "{{ zabbix_python_prefix }}-mysqldb" + - python3-pymysql "10": - mariadb-client - - "{{ zabbix_python_prefix }}-mysqldb" + - python3-pymysql # Ubuntu - "22": + "24": - default-mysql-client - "{{ zabbix_python_prefix }}-mysqldb" + "22": + - default-mysql-client + - python3-pymysql "20": - default-mysql-client - - "{{ zabbix_python_prefix }}-mysqldb" + - python3-pymysql "18": - default-mysql-client - - "{{ zabbix_python_prefix }}-mysqldb" + - python3-pymysql + +_zabbix_proxy_sqlite3_dependencies: + - sqlite3 mysql_plugin: "18": mysql_native_password @@ -54,3 +67,7 @@ debian_keyring_path: /etc/apt/keyrings/ zabbix_gpg_key: "{{ debian_keyring_path }}zabbix-repo.asc" _zabbix_proxy_fping6location: /usr/bin/fping6 _zabbix_proxy_fpinglocation: /usr/bin/fping + +_zabbix_proxy_packages: + - "zabbix-proxy-{{ zabbix_proxy_database }}" + - "zabbix-sql-scripts" diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/RedHat.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/RedHat.yml index e8ee7e2ae..6a22ec36d 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/RedHat.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/RedHat.yml @@ -12,27 +12,24 @@ zabbix_valid_proxy_versions: - 6.2 - 6.0 -pgsql_depenencies: - "9": - - python3-psycopg2 - - postgresql - "8": - - python3-psycopg2 - - postgresql - "7": - - python-psycopg2 - - postgresql +_zabbix_proxy_pgsql_dependencies: + - "{{ zabbix_proxy_install_database_client | ternary('postgresql', '') }}" + - python3-psycopg2 -mysql_client_pkgs: +_zabbix_proxy_mysql_dependencies: "9": - - mysql + - "{{ zabbix_proxy_install_database_client | ternary('mysql', '') }}" - python3-PyMySQL "8": - - mysql + - "{{ zabbix_proxy_install_database_client | ternary('mysql', '') }}" - python3-PyMySQL "7": - - MariaDB-client - - MySQL-python + - "{{ zabbix_proxy_install_database_client | ternary('mariadb', '') }}" + - python3-PyMySQL + - python36-cryptography + +_zabbix_proxy_sqlite3_dependencies: + - sqlite selinux_pkgs: "9": @@ -53,3 +50,10 @@ mysql_plugin: _zabbix_proxy_fping6location: /usr/sbin/fping6 _zabbix_proxy_fpinglocation: /usr/sbin/fping + +_zabbix_proxy_packages: + - "zabbix-proxy-{{ zabbix_proxy_database }}-{{ zabbix_proxy_version }}.{{ zabbix_proxy_version_minor }}" + - "zabbix-sql-scripts-{{ zabbix_proxy_version }}.{{ zabbix_proxy_version_minor }}" + +_zabbix_proxy_disable_repo: + - epel diff --git a/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/main.yml b/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/main.yml deleted file mode 100644 index 90779c270..000000000 --- a/ansible_collections/community/zabbix/roles/zabbix_proxy/vars/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# vars file for zabbix_proxy -db_file_path: - "62": "/usr/share/zabbix-sql-scripts/{{ zabbix_proxy_db_long }}/proxy.sql" - "64": "/usr/share/zabbix-sql-scripts/{{ zabbix_proxy_db_long }}/proxy.sql" - "60": "/usr/share/zabbix-sql-scripts/{{ zabbix_proxy_db_long }}/proxy.sql" - "50": "/usr/share/doc/zabbix-proxy-{{ zabbix_proxy_database }}*/schema.sql.gz" diff --git a/ansible_collections/community/zabbix/roles/zabbix_server/README.md b/ansible_collections/community/zabbix/roles/zabbix_server/README.md index 9557281c3..20f462c48 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_server/README.md +++ b/ansible_collections/community/zabbix/roles/zabbix_server/README.md @@ -79,6 +79,7 @@ See the following list of supported Operating systems with the Zabbix releases: |---------------------|-----|-----|-----| | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | | | V | diff --git a/ansible_collections/community/zabbix/roles/zabbix_server/defaults/main.yml b/ansible_collections/community/zabbix/roles/zabbix_server/defaults/main.yml index 933e0339a..b3c669ba9 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_server/defaults/main.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_server/defaults/main.yml @@ -8,25 +8,27 @@ zabbix_server_manage_service: true # Database zabbix_server_database_sqlload: true zabbix_server_database_timescaledb: false -zabbix_server_real_dbhost: +#zabbix_server_real_dbhost: zabbix_server_dbhost: localhost zabbix_server_dbname: zabbix-server zabbix_server_privileged_host: localhost zabbix_server_dbencoding: utf8 zabbix_server_dbcollation: utf8_bin -zabbix_server_dbschema: +#zabbix_server_dbschema: zabbix_server_dbuser: zabbix-server zabbix_server_dbpassword: zabbix-server zabbix_server_dbpassword_hash_method: md5 -zabbix_server_dbsocket: -zabbix_server_dbport: 5432 +#zabbix_server_dbsocket: +_zabbix_server_database_default_port: + mysql: 3306 + pgsql: 5432 +zabbix_server_dbport: "{{ _zabbix_server_database_default_port[zabbix_server_database] }}" zabbix_server_dbhost_run_install: true zabbix_server_database: pgsql zabbix_server_database_creation: true zabbix_server_install_database_client: true # SELinux specific -zabbix_server_selinux: false selinux_allow_zabbix_can_network: false selinux_allow_zabbix_can_http: false diff --git a/ansible_collections/community/zabbix/roles/zabbix_server/tasks/RedHat.yml b/ansible_collections/community/zabbix/roles/zabbix_server/tasks/RedHat.yml index 77fb7cd8a..7fdb5bb72 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_server/tasks/RedHat.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_server/tasks/RedHat.yml @@ -36,5 +36,4 @@ - name: "RedHat | Configure SELinux when enabled" ansible.builtin.include_tasks: selinux.yml - when: - - zabbix_server_selinux | bool + when: ansible_facts.selinux.status | default('disabled') == 'enabled' diff --git a/ansible_collections/community/zabbix/roles/zabbix_server/tasks/initialize-mysql.yml b/ansible_collections/community/zabbix/roles/zabbix_server/tasks/initialize-mysql.yml index c3fd67c6d..b16b475c9 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_server/tasks/initialize-mysql.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_server/tasks/initialize-mysql.yml @@ -27,6 +27,7 @@ - name: "MySQL Database prep" when: zabbix_server_database_creation + become: "{{ zabbix_server_dbhost_run_install }}" delegate_to: "{{ zabbix_server_real_dbhost | default(zabbix_server_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname)) }}" vars: delegated_dbhost: "{{ (zabbix_server_dbhost == 'localhost') | ternary(inventory_hostname, zabbix_server_dbhost) }}" @@ -81,7 +82,7 @@ query: 'SELECT mandatory FROM dbversion' rescue: - name: "MySQL | Get and set schema import overrides" - delegate_to: "{{ zabbix_server_real_dbhost | default(zabbix_server_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname)) }}" + delegate_to: "{{ zabbix_server_real_dbhost | default(zabbix_server_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname), true) }}" block: - name: "MySQL | Get current value for variables" community.mysql.mysql_variables: @@ -141,7 +142,7 @@ always: - name: "MySQL | Revert variable overrides for schema import" - delegate_to: "{{ zabbix_server_real_dbhost | default(zabbix_server_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname)) }}" + delegate_to: "{{ zabbix_server_real_dbhost | default(zabbix_server_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname), true) }}" community.mysql.mysql_variables: variable: "{{ item.name }}" value: "{{ item.msg }}" diff --git a/ansible_collections/community/zabbix/roles/zabbix_server/tasks/initialize-pgsql.yml b/ansible_collections/community/zabbix/roles/zabbix_server/tasks/initialize-pgsql.yml index 65bd0beec..6f40c66f2 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_server/tasks/initialize-pgsql.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_server/tasks/initialize-pgsql.yml @@ -32,7 +32,6 @@ port: "{{ zabbix_server_dbport }}" login_unix_socket: "{{ zabbix_server_pgsql_login_unix_socket | default(omit) }}" name: "{{ zabbix_server_dbname }}" - state: present - name: "PostgreSQL | Create database user" community.postgresql.postgresql_user: @@ -43,10 +42,19 @@ login_unix_socket: "{{ zabbix_server_pgsql_login_unix_socket | default(omit) }}" name: "{{ zabbix_server_dbuser }}" password: "{{ ('md5' + (zabbix_server_dbpassword + zabbix_server_dbuser)|hash('md5')) if zabbix_server_dbpassword_hash_method == 'md5' else zabbix_server_dbpassword }}" + + - name: "PostgreSQL | Set database/user permissions" + community.postgresql.postgresql_privs: + login_user: "{{ zabbix_server_pgsql_login_user | default(omit) }}" + login_password: "{{ zabbix_server_pgsql_login_password | default(omit) }}" + login_host: "{{ zabbix_server_pgsql_login_host | default(omit) }}" + port: "{{ zabbix_server_dbport }}" + login_unix_socket: "{{ zabbix_server_pgsql_login_unix_socket | default(omit) }}" db: "{{ zabbix_server_dbname }}" - priv: ALL - state: present - encrypted: true + privs: ALL + type: schema + objs: public + role: "{{ zabbix_server_dbuser }}" - name: "PostgreSQL | Create timescaledb extension" when: zabbix_server_database_timescaledb diff --git a/ansible_collections/community/zabbix/roles/zabbix_server/tasks/selinux.yml b/ansible_collections/community/zabbix/roles/zabbix_server/tasks/selinux.yml index cd13dbbfd..e30480cd2 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_server/tasks/selinux.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_server/tasks/selinux.yml @@ -1,125 +1,33 @@ --- -# straight to getenforce binary , workaround for missing python_selinux library -- name: "SELinux | Get getenforce binary" - ansible.builtin.stat: - path: /usr/sbin/getenforce - register: getenforce_bin - become: true - tags: - - always - -- name: "SELinux | Collect getenforce output" - ansible.builtin.command: getenforce - register: sestatus - when: "getenforce_bin.stat.exists" - changed_when: false - become: true - check_mode: false - tags: - - always - -- name: "Set zabbix_server_selinux to true if getenforce returns Enforcing or Permissive" - ansible.builtin.set_fact: - zabbix_server_selinux: "{{ true }}" - when: 'getenforce_bin.stat.exists and ("Enforcing" in sestatus.stdout or "Permissive" in sestatus.stdout)' - tags: - - config - -- name: "SELinux | RedHat | Install related SELinux package" - ansible.builtin.yum: +- name: "SELinux | Install related SELinux packages" + ansible.builtin.package: name: - - libsemanage-python - - policycoreutils - checkpolicy - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_server_dependencies_installed - until: zabbix_server_dependencies_installed is succeeded - become: true - when: - - ansible_os_family == "RedHat" - - selinux_allow_zabbix_can_network - - ansible_distribution_major_version == "7" or ansible_distribution_major_version == "6" - tags: - - install - -- name: "SELinux | RedHat | Install related SELinux package on RHEL8" - ansible.builtin.yum: - name: + - policycoreutils - python3-libsemanage - state: present + - python3-policycoreutils environment: http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" register: zabbix_server_dependencies_installed until: zabbix_server_dependencies_installed is succeeded become: true - when: - - ansible_os_family == "RedHat" - - selinux_allow_zabbix_can_network - - ansible_distribution_major_version == "8" tags: - install -- name: "SELinux | RedHat | Enable httpd_can_connect_zabbix SELinux boolean" - ansible.posix.seboolean: - name: httpd_can_connect_zabbix - state: true - persistent: true - become: true - when: - - selinux_allow_zabbix_can_http - tags: - - config - -- name: "SELinux | RedHat | Enable zabbix_can_network SELinux boolean" +- name: "SELinux | Set booleans" ansible.posix.seboolean: - name: zabbix_can_network - state: true + name: "{{ item.name }}" + state: "{{ item.state }}" persistent: true become: true - when: - - selinux_allow_zabbix_can_network tags: - config - -- name: "SELinux | RedHat | Install related SELinux package to fix issues" - ansible.builtin.yum: - name: - - policycoreutils-python - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_server_dependencies_installed - until: zabbix_server_dependencies_installed is succeeded - become: true - when: - - ansible_os_family == "RedHat" - - ansible_distribution_major_version == "7" or ansible_distribution_major_version == "6" - tags: - - install - -- name: "SELinux | RedHat | Install related SELinux package to fix issues on RHEL8" - ansible.builtin.yum: - name: - - policycoreutils - - checkpolicy - - python3-libsemanage - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_server_dependencies_installed - until: zabbix_server_dependencies_installed is succeeded - become: true - when: - - ansible_os_family == "RedHat" - - ansible_distribution_major_version == "8" - tags: - - install + loop: + - name: httpd_can_connect_zabbix + state: "{{ selinux_allow_zabbix_can_http }}" + - name: zabbix_can_network + state: "{{ selinux_allow_zabbix_can_network }}" - name: "SELinux | RedHat | Add SEmodule to fix SELinux issue: zabbix_server_alerter.sock" ansible.builtin.script: diff --git a/ansible_collections/community/zabbix/roles/zabbix_server/vars/Debian.yml b/ansible_collections/community/zabbix/roles/zabbix_server/vars/Debian.yml index 75f3751c2..277fa8580 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_server/vars/Debian.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_server/vars/Debian.yml @@ -17,6 +17,9 @@ zabbix_valid_server_versions: "10": - 6.0 # Ubuntu + "24": + - 6.4 + - 6.0 "22": - 6.4 - 6.2 diff --git a/ansible_collections/community/zabbix/roles/zabbix_web/README.md b/ansible_collections/community/zabbix/roles/zabbix_web/README.md index aac6f9dc2..c1875f208 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_web/README.md +++ b/ansible_collections/community/zabbix/roles/zabbix_web/README.md @@ -59,6 +59,7 @@ See the following list of supported Operating Systems with the Zabbix releases. |---------------------|-----|-----|-----| | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | +| Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | | Ubuntu 18.04 bionic | | | V | diff --git a/ansible_collections/community/zabbix/roles/zabbix_web/templates/php-fpm.conf.j2 b/ansible_collections/community/zabbix/roles/zabbix_web/templates/php-fpm.conf.j2 index e6b02cc9e..3dd337e4d 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_web/templates/php-fpm.conf.j2 +++ b/ansible_collections/community/zabbix/roles/zabbix_web/templates/php-fpm.conf.j2 @@ -8,7 +8,7 @@ listen.acl_users = {{ zabbix_php_fpm_conf_user if zabbix_php_fpm_conf_user is de {% endif %} listen.owner = {{ zabbix_php_fpm_conf_user if zabbix_php_fpm_conf_user is defined else zabbix_web_user }} listen.group = {{ _nginx_group if zabbix_web_http_server=='nginx' else _apache_group }} -listen.mode = 0644 +listen.mode = 0660 listen.allowed_clients = 127.0.0.1 pm = dynamic diff --git a/ansible_collections/community/zabbix/roles/zabbix_web/vars/Debian.yml b/ansible_collections/community/zabbix/roles/zabbix_web/vars/Debian.yml index f49b27155..643b226f5 100644 --- a/ansible_collections/community/zabbix/roles/zabbix_web/vars/Debian.yml +++ b/ansible_collections/community/zabbix/roles/zabbix_web/vars/Debian.yml @@ -35,6 +35,9 @@ zabbix_valid_web_versions: "10": - 6.0 # Ubuntu + "24": + - 6.4 + - 6.0 "22": - 6.4 - 6.2 diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/meta/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/meta/main.yml new file mode 100644 index 000000000..acdb704c8 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_zabbix diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/main.yml new file mode 100644 index 000000000..8642afe46 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/main.yml @@ -0,0 +1,29 @@ +--- +- name: test - do not run tests for Zabbix < 6.4 + meta: end_play + when: zabbix_version is version('6.4', '<') + +- block: + # setup stuff + - include_tasks: zabbix_setup.yml + + # zabbix_discoveryrule module tests + - include_tasks: zabbix_tests.yml + + # tear down stuff set up earlier + - include_tasks: zabbix_teardown.yml + + always: + - name: "cleanup discoveryrule if tests failed" + community.zabbix.zabbix_discoveryrule: + host_name: ExampleHost + name: ExampleRule + state: absent + ignore_errors: true + + - name: "cleanup discoveryrule if tests failed" + community.zabbix.zabbix_discoveryrule: + template_name: ExampleTemplate + name: ExampleRule + state: absent + ignore_errors: true diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_setup.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_setup.yml new file mode 100644 index 000000000..4daf66abf --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_setup.yml @@ -0,0 +1,25 @@ +--- + +- name: Create test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + template_groups: + - Templates + +- name: Create test host + community.zabbix.zabbix_host: + host_name: ExampleHost + host_groups: + - Linux servers + - Zabbix servers + link_templates: + - ExampleTemplate + status: enabled + state: present + interfaces: + - type: 1 + main: 1 + useip: 1 + ip: 10.1.1.1 + dns: "" + port: "10050" diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_teardown.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_teardown.yml new file mode 100644 index 000000000..4a2ec158f --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_teardown.yml @@ -0,0 +1,9 @@ +- name: remove test host + community.zabbix.zabbix_host: + host_name: ExampleHost + state: absent + +- name: remove test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + state: absent diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_tests.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_tests.yml new file mode 100644 index 000000000..ffed13e05 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_discoveryrule/tasks/zabbix_tests.yml @@ -0,0 +1,147 @@ +--- + +- name: test - create new Zabbix discoveryrule on host with many options set + community.zabbix.zabbix_discoveryrule: + name: TestRule + host_name: ExampleHost + params: + type: zabbix_agent_active + key: 'vfs.fs.discovery' + interval: 1m + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxhostrule_new + +- name: assert that rule was created + ansible.builtin.assert: + that: zbxhostrule_new is changed + +- name: test - create same Zabbix discoveryrule once again + community.zabbix.zabbix_discoveryrule: + name: TestRule + host_name: ExampleHost + params: + type: zabbix_agent_active + key: 'vfs.fs.discovery' + interval: 1m + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxhostrule_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhostrule_existing is changed + +- name: test - update existing zabbix discoveryrule + community.zabbix.zabbix_discoveryrule: + name: TestRule + host_name: ExampleHost + params: + interval: 2m + state: present + register: zbxhostrule_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxhostrule_changed is changed + +- name: test - attempt to delete previously created zabbix discoveryrule + community.zabbix.zabbix_discoveryrule: + name: TestRule + host_name: ExampleHost + state: absent + register: zbxhostrule_existing_delete + +- name: assert that trigger was deleted + ansible.builtin.assert: + that: zbxhostrule_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix discoveryrule + community.zabbix.zabbix_discoveryrule: + name: TestRule + host_name: ExampleHost + state: absent + register: zbxhostrule_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhostrule_missing_delete is changed + +- name: test - create new Zabbix discoveryrule on template with many options set + community.zabbix.zabbix_discoveryrule: + name: TestRule + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: 'vfs.fs.discovery' + interval: 1m + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxtemprule_new + +- name: assert that rule was created + ansible.builtin.assert: + that: zbxtemprule_new is changed + +- name: test - create same Zabbix discoveryrule once again + community.zabbix.zabbix_discoveryrule: + name: TestRule + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: 'vfs.fs.discovery' + interval: 1m + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxtemprule_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtemprule_existing is changed + +- name: test - update existing zabbix discoveryrule + community.zabbix.zabbix_discoveryrule: + name: TestRule + template_name: ExampleTemplate + params: + interval: 2m + state: present + register: zbxtemprule_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxtemprule_changed is changed + +- name: test - attempt to delete previously created zabbix discoveryrule + community.zabbix.zabbix_discoveryrule: + name: TestRule + template_name: ExampleTemplate + state: absent + register: zbxtemprule_existing_delete + +- name: assert that trigger was deleted + ansible.builtin.assert: + that: zbxtemprule_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix discoveryrule + community.zabbix.zabbix_discoveryrule: + name: TestRule + template_name: ExampleTemplate + state: absent + register: zbxtemprule_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtemprule_missing_delete is changed diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/meta/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/meta/main.yml new file mode 100644 index 000000000..acdb704c8 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_zabbix diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/main.yml new file mode 100644 index 000000000..131e87ac9 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/main.yml @@ -0,0 +1,13 @@ +--- +- name: test - do not run tests for Zabbix < 6.4 + meta: end_play + when: zabbix_version is version('6.4', '<') + +# setup stuff +- include_tasks: zabbix_setup.yml + +# zabbix_item module tests +- include_tasks: zabbix_tests.yml + +# tear down stuff set up earlier +- include_tasks: zabbix_teardown.yml diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_setup.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_setup.yml new file mode 100644 index 000000000..c02a08595 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_setup.yml @@ -0,0 +1,61 @@ +--- + +- name: Create example template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + template_groups: + - Templates + +- name: Create example host + community.zabbix.zabbix_host: + host_name: ExampleHost + host_groups: + - Linux servers + - Zabbix servers + link_templates: + - ExampleTemplate + status: enabled + state: present + interfaces: + - type: 1 + main: 1 + useip: 1 + ip: 10.1.1.1 + dns: "" + port: "10050" + +- name: create ping item + community.zabbix.zabbix_item: + name: ping + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: agent.ping + value_type: numeric_unsigned + interval: 20s + state: present + +- name: create ping trigger + community.zabbix.zabbix_trigger: + name: ping + template_name: ExampleTemplate + params: + severity: warning + expression: 'nodata(/ExampleTemplate/agent.ping,1m)=1' + manual_close: True + state: present + +- name: Wait to ensure triggers are firing + ansible.builtin.wait_for: + timeout: 120 + +- name: get events for host + community.zabbix.zabbix_host_events_info: + host_identifier: ExampleHost + host_id_type: hostname + trigger_severity: warning + register: zabbix_host_events + +- name: get eventid + ansible.builtin.set_fact: + zabbix_eventid: "{{ zabbix_host_events.triggers_problem[0].last_event.eventid }}" diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_teardown.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_teardown.yml new file mode 100644 index 000000000..2df4dd571 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_teardown.yml @@ -0,0 +1,9 @@ +- name: remove example host + community.zabbix.zabbix_host: + host_name: ExampleHost + state: absent + +- name: remove example template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + state: absent diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_tests.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_tests.yml new file mode 100644 index 000000000..48d63b47d --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_host_events_update/tasks/zabbix_tests.yml @@ -0,0 +1,59 @@ +--- + +- name: test - acknowledge event + community.zabbix.zabbix_host_events_update: + params: + eventids: "{{ zabbix_eventid }}" + action: ack + msg: "event acknowledged" + register: zbxevent_ack + +- name: assert that event was changed + ansible.builtin.assert: + that: zbxevent_ack is changed + +- name: get events updated status + community.zabbix.zabbix_host_events_info: + host_identifier: ExampleHost + host_id_type: hostname + trigger_severity: warning + register: zabbix_host_events_ack + +- name: assert that event was acknowledged + ansible.builtin.assert: + that: zabbix_host_events_ack.triggers_problem[0].last_event.acknowledged + +- name: test - change severity and unacknowledge + community.zabbix.zabbix_host_events_update: + params: + eventids: "{{ zabbix_eventid }}" + actions: ['severity', 'unack'] + severity: high + register: zbxevent_sev + +- name: assert that event was changed + ansible.builtin.assert: + that: zbxevent_sev is changed + +- name: get events updated status + community.zabbix.zabbix_host_events_info: + host_identifier: ExampleHost + host_id_type: hostname + trigger_severity: warning + register: zabbix_host_events_unack + +- name: assert that event was unacknowledged + ansible.builtin.assert: + that: zabbix_host_events_unack.triggers_problem[0].last_event.acknowledged == "0" + +- name: test - change severity to same + community.zabbix.zabbix_host_events_update: + params: + eventids: "{{ zabbix_eventid }}" + action: severity + severity: high + register: zbxevent_sev_existing + +- name: assert that event was not changed + ansible.builtin.assert: + that: zbxevent_sev_existing is not changed diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/meta/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/meta/main.yml new file mode 100644 index 000000000..acdb704c8 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_zabbix diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/main.yml new file mode 100644 index 000000000..531720193 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/main.yml @@ -0,0 +1,28 @@ +--- +- name: test - do not run tests for Zabbix < 6.4 + meta: end_play + when: zabbix_version is version('6.4', '<') + +- block: + # setup stuff + - include_tasks: zabbix_setup.yml + + # zabbix_item module tests + - include_tasks: zabbix_tests.yml + + # tear down stuff set up earlier + - include_tasks: zabbix_teardown.yml + always: + - name: "cleanup host item if tests failed" + community.zabbix.zabbix_item: + host_name: ExampleHost + name: TestItem + state: absent + ignore_errors: true + + - name: "cleanup template item if tests failed" + community.zabbix.zabbix_item: + template_name: ExampleTemplate + name: TestItem + state: absent + ignore_errors: true diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/zabbix_setup.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/zabbix_setup.yml new file mode 100644 index 000000000..4daf66abf --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/zabbix_setup.yml @@ -0,0 +1,25 @@ +--- + +- name: Create test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + template_groups: + - Templates + +- name: Create test host + community.zabbix.zabbix_host: + host_name: ExampleHost + host_groups: + - Linux servers + - Zabbix servers + link_templates: + - ExampleTemplate + status: enabled + state: present + interfaces: + - type: 1 + main: 1 + useip: 1 + ip: 10.1.1.1 + dns: "" + port: "10050" diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/zabbix_teardown.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/zabbix_teardown.yml new file mode 100644 index 000000000..4a2ec158f --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/zabbix_teardown.yml @@ -0,0 +1,9 @@ +- name: remove test host + community.zabbix.zabbix_host: + host_name: ExampleHost + state: absent + +- name: remove test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + state: absent diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/zabbix_tests.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/zabbix_tests.yml new file mode 100644 index 000000000..86767a716 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_item/tasks/zabbix_tests.yml @@ -0,0 +1,246 @@ +--- + +- name: test - create new Zabbix item on host with many options set + community.zabbix.zabbix_item: + name: TestItem + host_name: ExampleHost + params: + type: zabbix_agent_active + key: vfs.fs.get + value_type: numeric_float + units: '%' + interval: 1m + preprocessing: + - type: jsonpath + params: '$[?(@.fstype == "ext4")]' + error_handler: zabbix_server + - type: jsonpath + params: "$[*].['bytes', 'inodes'].pused.max()" + error_handler: zabbix_server + tags: + - tag: tag + value: value + state: present + register: zbxhostitem_new + +- name: assert that item was created + ansible.builtin.assert: + that: zbxhostitem_new is changed + +- name: test - create same Zabbix item group once again + community.zabbix.zabbix_item: + name: TestItem + host_name: ExampleHost + params: + type: zabbix_agent_active + key: vfs.fs.get + value_type: numeric_float + units: '%' + interval: 1m + preprocessing: + - type: jsonpath + params: '$[?(@.fstype == "ext4")]' + error_handler: zabbix_server + - type: jsonpath + params: "$[*].['bytes', 'inodes'].pused.max()" + error_handler: zabbix_server + tags: + - tag: tag + value: value + state: present + register: zbxhostitem_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhostitem_existing is changed + +- name: test - update existing zabbix item + community.zabbix.zabbix_item: + name: TestItem + host_name: ExampleHost + params: + interval: 2m + state: present + register: zbxhostitem_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxhostitem_changed is changed + +- name: test - attempt to delete previously created zabbix item + community.zabbix.zabbix_item: + name: TestItem + host_name: ExampleHost + state: absent + register: zbxhostitem_existing_delete + +- name: assert that item was deleted + ansible.builtin.assert: + that: zbxhostitem_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix item + community.zabbix.zabbix_item: + name: TestItem + host_name: ExampleHost + state: absent + register: zbxhostitem_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhostitem_missing_delete is changed + +- name: test - create new Zabbix master item on host + community.zabbix.zabbix_item: + name: TestItem + host_name: ExampleHost + params: + type: zabbix_agent_active + key: vfs.fs.get + value_type: text + interval: 1m + tags: + - tag: tag + value: value + state: present + register: zbxhostmstitem_new + +- name: assert that item was created + ansible.builtin.assert: + that: zbxhostmstitem_new is changed + +- name: create dependent item + community.zabbix.zabbix_item: + name: TestDependItem + host_name: ExampleHost + params: + type: dependent_item + key: vfs.fs.pused + value_type: numeric_float + units: '%' + master_item: + item_name: TestItem + host_name: ExampleHost + preprocessing: + - type: jsonpath + params: '$[?(@.fstype == "ext4")]' + error_handler: zabbix_server + - type: jsonpath + params: "$[*].['bytes', 'inodes'].pused.max()" + error_handler: zabbix_server + state: present + register: zbxhostdependitem_new + +- name: assert that item was created + ansible.builtin.assert: + that: zbxhostdependitem_new is changed + +- name: test - attempt to delete previously created zabbix master item + community.zabbix.zabbix_item: + name: TestItem + host_name: ExampleHost + state: absent + register: zbxhostmstitem_existing_delete + +- name: assert that item was deleted + ansible.builtin.assert: + that: zbxhostmstitem_existing_delete is changed + +- name: test - attempt to delete dependent item + community.zabbix.zabbix_item: + name: TestDependItem + host_name: ExampleHost + state: absent + register: zbxhostdependitem_delete + +- name: assert that the item had been removed with its master + ansible.builtin.assert: + that: not zbxhostdependitem_delete is changed + +- name: test - create new Zabbix item on template with many options set + community.zabbix.zabbix_item: + name: TestItem + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: vfs.fs.get + value_type: numeric_float + units: '%' + interval: 1m + preprocessing: + - type: jsonpath + params: '$[?(@.fstype == "ext4")]' + error_handler: zabbix_server + - type: jsonpath + params: "$[*].['bytes', 'inodes'].pused.max()" + error_handler: zabbix_server + tags: + - tag: tag + value: value + state: present + register: zbxtempitem_new + +- name: assert that item was created + ansible.builtin.assert: + that: zbxtempitem_new is changed + +- name: test - create same Zabbix item once again + community.zabbix.zabbix_item: + name: TestItem + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: vfs.fs.get + value_type: numeric_float + units: '%' + interval: 1m + preprocessing: + - type: jsonpath + params: '$[?(@.fstype == "ext4")]' + error_handler: zabbix_server + - type: jsonpath + params: "$[*].['bytes', 'inodes'].pused.max()" + error_handler: zabbix_server + tags: + - tag: tag + value: value + state: present + register: zbxtempitem_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtempitem_existing is changed + +- name: test - update existing zabbix item + community.zabbix.zabbix_item: + name: TestItem + template_name: ExampleTemplate + params: + interval: 2m + state: present + register: zbxtempitem_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxtempitem_changed is changed + +- name: test - attempt to delete previously created zabbix item + community.zabbix.zabbix_item: + name: TestItem + template_name: ExampleTemplate + state: absent + register: zbxtempitem_existing_delete + +- name: assert that item was deleted + ansible.builtin.assert: + that: zbxtempitem_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix item + community.zabbix.zabbix_item: + name: TestItem + template_name: ExampleTemplate + state: absent + register: zbxtempitem_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtempitem_missing_delete is changed diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/meta/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/meta/main.yml new file mode 100644 index 000000000..acdb704c8 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_zabbix diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/main.yml new file mode 100644 index 000000000..ed6ca6d62 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/main.yml @@ -0,0 +1,30 @@ +--- +- name: test - do not run tests for Zabbix < 6.4 + meta: end_play + when: zabbix_version is version('6.4', '<') + +- block: + # setup stuff + - include_tasks: zabbix_setup.yml + + # zabbix_itemprototype module tests + - include_tasks: zabbix_tests.yml + + # tear down stuff set up earlier + - include_tasks: zabbix_teardown.yml + always: + - name: "cleanup host item if tests failed" + community.zabbix.zabbix_itemprototype: + host_name: ExampleHost + discoveryrule_name: ExampleHostRule + name: TestItem + state: absent + ignore_errors: true + + - name: "cleanup template item if tests failed" + community.zabbix.zabbix_itemprototype: + template_name: ExampleTemplate + discoveryrule_name: ExampleTemplateRule + name: TestItem + state: absent + ignore_errors: true diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_setup.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_setup.yml new file mode 100644 index 000000000..62d4d5e92 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_setup.yml @@ -0,0 +1,36 @@ +--- + +- name: Create test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + template_groups: + - Templates + +- name: Create test host + community.zabbix.zabbix_host: + host_name: ExampleHost + host_groups: + - Linux servers + - Zabbix servers + link_templates: + - ExampleTemplate + status: enabled + state: present + interfaces: + - type: 1 + main: 1 + useip: 1 + ip: 10.1.1.1 + dns: "" + port: "10050" + +- name: Create new Zabbix discoveryrule on host + community.zabbix.zabbix_discoveryrule: + name: ExampleHostRule + host_name: ExampleHost + params: + type: zabbix_agent_active + key: 'vfs.fs.discovery' + interval: 1m + enabled: True + state: present diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_teardown.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_teardown.yml new file mode 100644 index 000000000..4a2ec158f --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_teardown.yml @@ -0,0 +1,9 @@ +- name: remove test host + community.zabbix.zabbix_host: + host_name: ExampleHost + state: absent + +- name: remove test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + state: absent diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_tests.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_tests.yml new file mode 100644 index 000000000..604ecf4d4 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_itemprototype/tasks/zabbix_tests.yml @@ -0,0 +1,248 @@ +--- + +- name: test - create new Zabbix item on host with many options set + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + params: + type: zabbix_agent_active + key: '{% raw %}vfs.fs.size[{#FSNAME},used]{% endraw %}' + value_type: numeric_unsigned + units: GB + interval: 1m + tags: + - tag: tag + value: value + state: present + register: zbxhostitem_new + +- name: assert that item was created + ansible.builtin.assert: + that: zbxhostitem_new is changed + +- name: test - create same Zabbix item group once again + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + params: + type: zabbix_agent_active + key: '{% raw %}vfs.fs.size[{#FSNAME},used]{% endraw %}' + value_type: numeric_unsigned + units: GB + interval: 1m + tags: + - tag: tag + value: value + state: present + register: zbxhostitem_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhostitem_existing is changed + +- name: test - update existing zabbix item + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + params: + interval: 2m + state: present + register: zbxhostitem_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxhostitem_changed is changed + +- name: test - attempt to delete previously created zabbix item + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + state: absent + register: zbxhostitem_existing_delete + +- name: assert that item was deleted + ansible.builtin.assert: + that: zbxhostitem_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix item + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + state: absent + register: zbxhostitem_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhostitem_missing_delete is changed + +- name: test - create new Zabbix master item on host + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + params: + type: zabbix_agent_active + key: '{% raw %}vfs.fs.size[{#FSNAME},used]{% endraw %}' + value_type: numeric_unsigned + units: B + interval: 1m + tags: + - tag: tag + value: value + state: present + register: zbxhostmstitem_new + +- name: assert that item was created + ansible.builtin.assert: + that: zbxhostmstitem_new is changed + +- name: create dependent item + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestDependItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + params: + type: dependent_item + key: '{% raw %}vfs.fs.size.half[{#FSNAME}]{% endraw %}' + value_type: numeric_float + units: B + master_item: + item_name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + preprocessing: + - type: javascript + params: 'return value / 2;' + error_handler: zabbix_server + state: present + register: zbxhostdependitem_new + +- name: assert that item was created + ansible.builtin.assert: + that: zbxhostdependitem_new is changed + +- name: test - attempt to delete previously created zabbix item + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + state: absent + register: zbxhostmstitem_existing_delete + +- name: assert that item was deleted + ansible.builtin.assert: + that: zbxhostmstitem_existing_delete is changed + +- name: test - attempt to delete dependent item + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestDependItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + state: absent + register: zbxhostdependitem_delete + +- name: assert that the item had been removed with its master + ansible.builtin.assert: + that: not zbxhostdependitem_delete is changed + +- name: remove host rule + community.zabbix.zabbix_discoveryrule: + name: ExampleHostRule + host_name: ExampleHost + state: absent + +- name: Create new Zabbix discoveryrule on template + community.zabbix.zabbix_discoveryrule: + name: ExampleTemplateRule + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: 'vfs.fs.discovery' + interval: 1m + enabled: True + state: present + +- name: test - create new Zabbix item on template with many options set + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleTemplateRule + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: '{% raw %}vfs.fs.size[{#FSNAME},used]{% endraw %}' + value_type: numeric_unsigned + units: B + interval: 1m + tags: + - tag: tag + value: value + state: present + register: zbxtempitem_new + +- name: assert that item was created + ansible.builtin.assert: + that: zbxtempitem_new is changed + +- name: test - create same Zabbix item group once again + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleTemplateRule + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: '{% raw %}vfs.fs.size[{#FSNAME},used]{% endraw %}' + value_type: numeric_unsigned + units: B + interval: 1m + tags: + - tag: tag + value: value + state: present + register: zbxtempitem_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtempitem_existing is changed + +- name: test - update existing zabbix item + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleTemplateRule + template_name: ExampleTemplate + params: + interval: 2m + state: present + register: zbxtempitem_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxtempitem_changed is changed + +- name: test - attempt to delete previously created zabbix item + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleTemplateRule + template_name: ExampleTemplate + state: absent + register: zbxtempitem_existing_delete + +- name: assert that item was deleted + ansible.builtin.assert: + that: zbxtempitem_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix item + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:TestItemPrototype{% endraw %}' + discoveryrule_name: ExampleTemplateRule + template_name: ExampleTemplate + state: absent + register: zbxtempitem_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtempitem_missing_delete is changed diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/meta/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/meta/main.yml new file mode 100644 index 000000000..acdb704c8 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_zabbix diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/main.yml new file mode 100644 index 000000000..c410c36da --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/main.yml @@ -0,0 +1,28 @@ +--- +- name: test - do not run tests for Zabbix < 6.4 + meta: end_play + when: zabbix_version is version('6.4', '<') + +- block: + # setup stuff + - include_tasks: zabbix_setup.yml + + # zabbix_trigger module tests + - include_tasks: zabbix_tests.yml + + # tear down stuff set up earlier + - include_tasks: zabbix_teardown.yml + always: + - name: "cleanup host item if tests failed" + community.zabbix.zabbix_item: + host_name: ExampleHost + name: ExampleHostItem + state: absent + ignore_errors: true + + - name: "cleanup template item if tests failed" + community.zabbix.zabbix_item: + template_name: ExampleTemplate + name: ExampleTemplateItem + state: absent + ignore_errors: true diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/zabbix_setup.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/zabbix_setup.yml new file mode 100644 index 000000000..de3c7ecf4 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/zabbix_setup.yml @@ -0,0 +1,47 @@ +--- + +- name: Create test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + template_groups: + - Templates + +- name: Create test host + community.zabbix.zabbix_host: + host_name: ExampleHost + host_groups: + - Linux servers + - Zabbix servers + link_templates: + - ExampleTemplate + status: enabled + state: present + interfaces: + - type: 1 + main: 1 + useip: 1 + ip: 10.1.1.1 + dns: "" + port: "10050" + +- name: Create test host item + community.zabbix.zabbix_item: + name: ExampleHostItem + host_name: ExampleHost + params: + type: zabbix_agent_active + key: agent.ping + value_type: numeric_unsigned + interval: 1m + state: present + +- name: Create test template item + community.zabbix.zabbix_item: + name: ExampleTemplateItem + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: system.cpu.load[percpu,avg1] + value_type: numeric_float + interval: 1m + state: present diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/zabbix_teardown.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/zabbix_teardown.yml new file mode 100644 index 000000000..305484842 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/zabbix_teardown.yml @@ -0,0 +1,21 @@ +- name: remove test host item + community.zabbix.zabbix_item: + name: ExampleHostItem + host_name: ExampleHost + state: absent + +- name: remove test template item + community.zabbix.zabbix_item: + name: ExampleTemplateItem + template_name: ExampleTemplate + state: absent + +- name: remove test host + community.zabbix.zabbix_host: + host_name: ExampleHost + state: absent + +- name: remove test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + state: absent diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/zabbix_tests.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/zabbix_tests.yml new file mode 100644 index 000000000..c87bd28b6 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_trigger/tasks/zabbix_tests.yml @@ -0,0 +1,159 @@ +--- + +- name: test - create new Zabbix trigger on host with many options set + community.zabbix.zabbix_trigger: + name: TestTrigger + host_name: ExampleHost + description: test host trigger + params: + severity: warning + expression: 'nodata(/ExampleHost/agent.ping,2m)=1' + recovery_mode: recovery_expression + recovery_expression: 'nodata(/ExampleHost/agent.ping,2m)=0' + manual_close: True + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxhosttrigger_new + +- name: assert that trigger was created + ansible.builtin.assert: + that: zbxhosttrigger_new is changed + +- name: test - create same Zabbix trigger once again + community.zabbix.zabbix_trigger: + name: TestTrigger + host_name: ExampleHost + description: test host trigger + params: + severity: warning + expression: 'nodata(/ExampleHost/agent.ping,2m)=1' + recovery_mode: recovery_expression + recovery_expression: 'nodata(/ExampleHost/agent.ping,2m)=0' + manual_close: True + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxhosttrigger_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhosttrigger_existing is changed + +- name: test - update existing zabbix trigger + community.zabbix.zabbix_trigger: + name: TestTrigger + host_name: ExampleHost + params: + manual_close: False + state: present + register: zbxhosttrigger_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxhosttrigger_changed is changed + +- name: test - attempt to delete previously created zabbix trigger + community.zabbix.zabbix_trigger: + name: TestTrigger + host_name: ExampleHost + state: absent + register: zbxhosttrigger_existing_delete + +- name: assert that trigger was deleted + ansible.builtin.assert: + that: zbxhosttrigger_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix trigger + community.zabbix.zabbix_trigger: + name: TestTrigger + host_name: ExampleHost + state: absent + register: zbxhosttrigger_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhosttrigger_missing_delete is changed + +- name: test - create new Zabbix trigger on template with many options set + community.zabbix.zabbix_trigger: + name: TestTrigger + template_name: ExampleTemplate + description: test template trigger + params: + severity: warning + expression: 'count(/ExampleTemplate/system.cpu.load[percpu,avg1],#2,"gt","1.3")>1' + recovery_mode: recovery_expression + recovery_expression: 'count(/ExampleTemplate/system.cpu.load[percpu,avg1],#2,"lt","1.3")>1' + manual_close: True + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxtemptrigger_new + +- name: assert that trigger was created + ansible.builtin.assert: + that: zbxtemptrigger_new is changed + +- name: test - create same Zabbix trigger once again + community.zabbix.zabbix_trigger: + name: TestTrigger + template_name: ExampleTemplate + description: test template trigger + params: + severity: warning + expression: 'count(/ExampleTemplate/system.cpu.load[percpu,avg1],#2,"gt","1.3")>1' + recovery_mode: recovery_expression + recovery_expression: 'count(/ExampleTemplate/system.cpu.load[percpu,avg1],#2,"lt","1.3")>1' + manual_close: True + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxtemptrigger_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtemptrigger_existing is changed + +- name: test - update existing zabbix trigger + community.zabbix.zabbix_trigger: + name: TestTrigger + template_name: ExampleTemplate + params: + manual_close: False + state: present + register: zbxtemptrigger_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxtemptrigger_changed is changed + +- name: test - attempt to delete previously created zabbix trigger + community.zabbix.zabbix_trigger: + name: TestTrigger + template_name: ExampleTemplate + state: absent + register: zbxtemptrigger_existing_delete + +- name: assert that trigger was deleted + ansible.builtin.assert: + that: zbxtemptrigger_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix trigger + community.zabbix.zabbix_trigger: + name: TestTrigger + template_name: ExampleTemplate + state: absent + register: zbxtemptrigger_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtemptrigger_missing_delete is changed diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/meta/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/meta/main.yml new file mode 100644 index 000000000..acdb704c8 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_zabbix diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/main.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/main.yml new file mode 100644 index 000000000..05bcdb724 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/main.yml @@ -0,0 +1,44 @@ +--- +- name: test - do not run tests for Zabbix < 6.4 + meta: end_play + when: zabbix_version is version('6.4', '<') + +- block: + # setup stuff + - include_tasks: zabbix_setup.yml + + # zabbix_triggerprototype module tests + - include_tasks: zabbix_tests.yml + + # tear down stuff set up earlier + - include_tasks: zabbix_teardown.yml + always: + - name: "cleanup host item if tests failed" + community.zabbix.zabbix_itemprototype: + host_name: ExampleHost + discoveryrule_name: ExampleHostRule + name: ExampleHostItem + state: absent + ignore_errors: true + + - name: "cleanup template item if tests failed" + community.zabbix.zabbix_itemprototype: + template_name: ExampleTemplate + discoveryrule_name: ExampleTemplateRule + name: ExampleTemplateItem + state: absent + ignore_errors: true + + - name: cleanup discovery rule on host if tests failed + community.zabbix.zabbix_discoveryrule: + name: ExampleHostRule + host_name: ExampleHost + state: absent + ignore_errors: true + + - name: cleanup discovery rule on template if tests failed + community.zabbix.zabbix_discoveryrule: + name: ExampleTemplateRule + template_name: ExampleTemplate + state: absent + ignore_errors: true diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_setup.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_setup.yml new file mode 100644 index 000000000..b42134f3a --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_setup.yml @@ -0,0 +1,48 @@ +--- + +- name: Create test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + template_groups: + - Templates + +- name: Create test host + community.zabbix.zabbix_host: + host_name: ExampleHost + host_groups: + - Linux servers + - Zabbix servers + link_templates: + - ExampleTemplate + status: enabled + state: present + interfaces: + - type: 1 + main: 1 + useip: 1 + ip: 10.1.1.1 + dns: "" + port: "10050" + +- name: Create new Zabbix discoveryrule on host + community.zabbix.zabbix_discoveryrule: + name: ExampleHostRule + host_name: ExampleHost + params: + type: zabbix_agent_active + key: 'vfs.fs.discovery' + interval: 1m + enabled: True + state: present + +- name: Create host item prototype + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:ExampleItemPrototype{% endraw %}' + discoveryrule_name: ExampleHostRule + host_name: ExampleHost + params: + type: zabbix_agent_active + key: '{% raw %}vfs.fs.size[{#FSNAME}, pused]{% endraw %}' + value_type: numeric_unsigned + interval: 1m + state: present diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_teardown.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_teardown.yml new file mode 100644 index 000000000..ef841de56 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_teardown.yml @@ -0,0 +1,15 @@ +- name: remove test template item + community.zabbix.zabbix_item: + name: ExampleTemplateItem + template_name: ExampleTemplate + state: absent + +- name: remove test host + community.zabbix.zabbix_host: + host_name: ExampleHost + state: absent + +- name: remove test template + community.zabbix.zabbix_template: + template_name: ExampleTemplate + state: absent diff --git a/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_tests.yml b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_tests.yml new file mode 100644 index 000000000..7975e20c1 --- /dev/null +++ b/ansible_collections/community/zabbix/tests/integration/targets/test_zabbix_triggerprototype/tasks/zabbix_tests.yml @@ -0,0 +1,180 @@ +--- + +- name: test - create new Zabbix trigger on host with many options set + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + host_name: ExampleHost + description: test host trigger + params: + severity: warning + expression: '{% raw %}last(/ExampleHost/vfs.fs.size[{#FSNAME}, pused])>80{% endraw %}' + manual_close: True + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxhosttrigger_new + +- name: assert that trigger was created + ansible.builtin.assert: + that: zbxhosttrigger_new is changed + +- name: test - create same Zabbix trigger once again + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + host_name: ExampleHost + description: test host trigger + params: + severity: warning + expression: '{% raw %}last(/ExampleHost/vfs.fs.size[{#FSNAME}, pused])>80{% endraw %}' + manual_close: True + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxhosttrigger_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhosttrigger_existing is changed + +- name: test - update existing zabbix trigger + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + host_name: ExampleHost + params: + manual_close: False + state: present + register: zbxhosttrigger_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxhosttrigger_changed is changed + +- name: test - attempt to delete previously created zabbix trigger + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + host_name: ExampleHost + state: absent + register: zbxhosttrigger_existing_delete + +- name: assert that trigger was deleted + ansible.builtin.assert: + that: zbxhosttrigger_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix trigger + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + host_name: ExampleHost + state: absent + register: zbxhosttrigger_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxhosttrigger_missing_delete is changed + +- name: remove host rule + community.zabbix.zabbix_discoveryrule: + name: ExampleHostRule + host_name: ExampleHost + state: absent + +- name: Create new Zabbix discoveryrule on template + community.zabbix.zabbix_discoveryrule: + name: ExampleTemplateRule + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: 'vfs.fs.discovery' + interval: 1m + enabled: True + state: present + +- name: Create template item prototype + community.zabbix.zabbix_itemprototype: + name: '{% raw %}{#FSNAME}:ExampleItemPrototype{% endraw %}' + discoveryrule_name: ExampleTemplateRule + template_name: ExampleTemplate + params: + type: zabbix_agent_active + key: '{% raw %}vfs.fs.size[{#FSNAME}, pused]{% endraw %}' + value_type: numeric_unsigned + interval: 1m + state: present + +- name: test - create new Zabbix trigger on template with many options set + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + template_name: ExampleTemplate + description: test template trigger + params: + severity: warning + expression: '{% raw %}last(/ExampleTemplate/vfs.fs.size[{#FSNAME}, pused])>80{% endraw %}' + manual_close: True + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxtemptrigger_new + +- name: assert that trigger was created + ansible.builtin.assert: + that: zbxtemptrigger_new is changed + +- name: test - create same Zabbix trigger once again + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + template_name: ExampleTemplate + description: test template trigger + params: + severity: warning + expression: '{% raw %}last(/ExampleTemplate/vfs.fs.size[{#FSNAME}, pused])>80{% endraw %}' + manual_close: True + enabled: True + tags: + - tag: tag + value: value + state: present + register: zbxtemptrigger_existing + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtemptrigger_existing is changed + +- name: test - update existing zabbix trigger + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + template_name: ExampleTemplate + params: + manual_close: False + state: present + register: zbxtemptrigger_changed + +- name: expect to succeed and that things changed + ansible.builtin.assert: + that: zbxtemptrigger_changed is changed + +- name: test - attempt to delete previously created zabbix trigger + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + template_name: ExampleTemplate + state: absent + register: zbxtemptrigger_existing_delete + +- name: assert that trigger was deleted + ansible.builtin.assert: + that: zbxtemptrigger_existing_delete is changed + +- name: test - attempt to delete non-existing zabbix trigger + community.zabbix.zabbix_triggerprototype: + name: '{% raw %}Free disk space is less than 20% on volume {#FSNAME}{% endraw %}' + template_name: ExampleTemplate + state: absent + register: zbxtemptrigger_missing_delete + +- name: assert that nothing has been changed + ansible.builtin.assert: + that: not zbxtemptrigger_missing_delete is changed |