Compare commits

...

147 Commits
9.5.0 ... 9.5.7

Author SHA1 Message Date
Felix Fontein
666c07acee Release 9.5.7. 2025-04-21 21:08:31 +02:00
patchback[bot]
bcbd04a8fd [PR #10043/2a5abab7 backport][stable-9] Remove blanket skips for Python 3 in CI (#10047)
* Remove blanket skips for Python 3 in CI (#10043)

* Remove blanket skips for Python 3 in CI.

* Try to fix hg tests.

* Disable hg tests.

* Drop restriction of supervisor to <4.0.0.

This was introduced in https://github.com/ansible/ansible/pull/54935.

* Make tests work with supervisorctl 4.0.0.

According to https://supervisord.org/changes.html#id12,
"supervisorctl will now set its exit code to a non-zero value when an error condition occurs."
I'm not sure why a stopped service in 'status' constitutes an error condition,
but whatever 🤷...

* Use correct Python executable.

* Skip RHEL/macOS; diff on config write.

* Skip CentOS 7 and OpenSuSE on ansible-core 2.16.

(cherry picked from commit 2a5abab738)

* Skip OpenSuSE 15/Python 2 on ansible-core 2.13.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-21 16:41:03 +02:00
Felix Fontein
36cb2c22a1 [stable-9] Use antsibull-nox instead of extra sanity test runner and extra workfows (#10041)
* Use antsibull-nox instead of extra sanity test runner and extra workflows (#10022)

* Use antsibull-nox instead of extra sanity test runner and extra workflows.

* Avoid sys.argv[0].

(cherry picked from commit 3ee55c6828)

* Action group keycloak does not exist in 9.x.y.
2025-04-21 14:28:09 +02:00
patchback[bot]
419893eb65 [PR #10005/e0a283bb backport][stable-9] Fix method exists in sysrc (#10033)
Fix method exists in sysrc (#10005)

* Fix method exists.

* Add changelog fragment.

* Update the exists method to pass the present method tests.

* Replace f-string formatting.

* Update changelogs/fragments/10005-fix-method-exists-in-sysrc.yml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Add comment to the method exists.

* Update plugins/modules/sysrc.py

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Update changelogs/fragments/10005-fix-method-exists-in-sysrc.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* The improved comment formatting fixed.

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e0a283bb36)

Co-authored-by: Vladimir Botka <vbotka@gmail.com>
2025-04-21 13:20:48 +02:00
patchback[bot]
2448503e8b [PR #10011/c2480730 backport][stable-9] fix: github_deploy_key check key exists on 422 (#10035)
fix: github_deploy_key check key exists on 422 (#10011)

* fix: github_deploy_key check key exists on 422

If we get a 422 response code as we add a key, check if it's because the key already exists or for another reason.

fixes: #6718

* chore: add changelog 10011-github_deploy_key-check-key-present

* chore: fix changelog fragment

* chore: fix changelog fragment

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c248073079)

Co-authored-by: Alex Garel <alex@garel.org>
2025-04-21 13:20:35 +02:00
patchback[bot]
8b1a193a49 [PR #9987/a8b97732 backport][stable-9] Fix Keycloak authentication flow configuration issues (#10017)
Fix Keycloak authentication flow configuration issues (#9987)

* Add delete_authentication_config method and integrate it into create_or_update_executions

* typo

* Sanity

* Add integration tests for keycloak_authentication module with README, tasks, and variables

* Add copyright and license information to access_token.yml

* Sanity

* Refactor Keycloak integration tests: streamline README, update access token task, and enhance variable management

* Maj changelogs fragments

---------

Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
(cherry picked from commit a8b977320c)

Co-authored-by: desand01 <desrosiers.a@hotmail.com>
2025-04-19 09:33:59 +02:00
patchback[bot]
69bb4420d8 [PR #9952/1243846c backport][stable-9] improve ansible_host in proxmox inventory plugin (#10002)
improve ansible_host in proxmox inventory plugin (#9952)

* improve ansible_host in proxmox inventory plugin

I had this issue myself and found out there was already an issue thread:

https://github.com/ansible-collections/community.general/issues/5906

this fixes the issue for hope we can all benefit after this gets merged

* f string styling

* add log line for the successful address selection

* remove white space

* add changelog: 9952-proxmox-inventory-plugin-improve-ansible_host.yml

* Update changelogs/fragments/9952-proxmox-inventory-plugin-improve-ansible_host.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1243846c3a)

Co-authored-by: Stein van Broekhoven <stein@aapjeisbaas.nl>
2025-04-16 21:06:02 +02:00
patchback[bot]
69590f55ac [PR #9976/04137746 backport][stable-9] keycloak_client: fix idempotency regression (#9996)
keycloak_client: fix idempotency regression (#9976)

* add function to normalize kc responses

* add changelog fragment

* Update changelogs/fragments/9976-keycloak_client-fix-idempotency-regression.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* add newline to changelog fragment

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 0413774641)

Co-authored-by: gruenbauer@b1-systems.de <gruenbauer@b1-systems.de>
2025-04-14 22:51:06 +02:00
Felix Fontein
69cb9b7578 Prepare 9.5.7. 2025-04-14 22:11:16 +02:00
patchback[bot]
72e4deee9b [PR #9992/8525e420 backport][stable-9] Avoid deprecated AnsibleFilterTypeError (#9993)
Avoid deprecated AnsibleFilterTypeError (#9992)

Avoid deprecated AnsibleFilterTypeError.

(cherry picked from commit 8525e420bc)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-14 21:23:23 +02:00
Felix Fontein
f12f69d2a5 [stable-9] Make ready for data tagging (#9991)
Make ready for data tagging (#9833)

* Fix dependent lookup.

* Fix ansible_type plugin utils and adjust documentation of reveal_ansible_type filter and ansible_type test.

* Fix diy callback plugin.

* Adjust to Data Tagging.

* Vendor and use internal code from ansible-core to fix YAML callback.

Ref: https://github.com/ansible/ansible/issues/84781
(cherry picked from commit 04cfce78ea)
2025-04-14 21:23:04 +02:00
patchback[bot]
ff7a8f8018 [PR #9951/02ffb6e7 backport][stable-9] update PHP apache module workaround (#9978)
update PHP apache module workaround (#9951)

* update php apache module workaround

* Update apache2_module.py

* Update apache2_module.py

* Update apache2_module.py

* add changelog fragment

* Update changelogs/fragments/9951-mod-php-identifier.yml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Update 9951-mod-php-identifier.yml

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 02ffb6e7e3)

Co-authored-by: simonLeary42 <71396965+simonLeary42@users.noreply.github.com>
2025-04-10 07:27:01 +02:00
patchback[bot]
08cfbf4f99 [PR #9963/34b6fb74 backport][stable-9] proxmox_disk: fail gracefully if storage hasn't been provided by the user (#9967)
proxmox_disk: fail gracefully if storage hasn't been provided by the user (#9963)

Fail gracefully if storage hasn't been provided by the user.

(cherry picked from commit 34b6fb74eb)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-06 14:24:04 +02:00
Felix Fontein
513ea79c19 Migrate .reuse/dep5 to REUSE.toml.
(cherry picked from commit 70b5e362f9)
2025-03-29 13:46:29 +01:00
patchback[bot]
0409f4048b [PR #9945/e5e33534 backport][stable-9] Simplify YAML callback tests (#9947)
Simplify YAML callback tests (#9945)

Simplify YAML callback tests.

(cherry picked from commit e5e335348a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-29 11:01:57 +01:00
Felix Fontein
3aa6185f09 Next expected release will be 9.5.7. 2025-03-24 22:10:59 +01:00
Felix Fontein
9a7fb38301 Release 9.5.6. 2025-03-24 21:02:34 +01:00
patchback[bot]
0b33bf4e5a [PR #9910/1fbf5d8e backport][stable-9] proxmox_vm_info: don't expect key 'template' exists in dictionary (#9934)
proxmox_vm_info: don't expect key 'template' exists in dictionary (#9910)

* don't expect key 'template' exists

* add changelog fragment

* Update changelogs/fragments/9875-proxmox-dont-expect-key-template-to-exist.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1fbf5d8eb4)

Co-authored-by: florianfischer91 <72799603+florianfischer91@users.noreply.github.com>
2025-03-24 05:52:45 +01:00
Felix Fontein
961a7cea8b [stable-9] The yarn module is Yarn Classic only at the moment (#9928)
The yarn module is Yarn Classic only at the moment (#9926)

The yarn module is Yarn Classic only.

(cherry picked from commit cb776e7cd5)
2025-03-23 15:15:41 +01:00
patchback[bot]
7916877179 [PR #9867/ec38a82e backport][stable-9] tests: enable copr tests (#9930)
tests: enable copr tests (#9867)

[WIP] tests: enable copr tests

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit ec38a82ef1)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-23 15:14:55 +01:00
Felix Fontein
7df07f31a6 [stable-9] Unit tests: replace mock and compat with code from community.internal_test_tools (#9923)
* Unit tests: replace mock and compat with code from community.internal_test_tools (#9921)

* Replace compat with equivalent from community.internal_test_tools.

* Replace mock with equivalent from community.internal_test_tools.

* Remove ignore.txt entries.

* Add test that's no longer present in later versions.
2025-03-22 14:32:01 +01:00
Felix Fontein
928cdaaf87 [stable-9] Use more unit test utils from community.internal_test_tools (#9920)
Use more unit test utils from community.internal_test_tools (#9918)

* Make conftest's patch_ansible_module use the context manager from .utils.

* Fix test dependencies.

* Use module mock utils from community.internal_test_tools.

* Use DataDictLoader from community.internal_test_tools.

* Use trust util from community.internal_test_tools.

(cherry picked from commit 8ab8010b6d)
2025-03-22 14:12:44 +01:00
patchback[bot]
3727bf7cd4 [PR #9880/3922b82a backport][stable-9] nmcli: fix reordering of DNS nameservers and search suffixes (#9911)
nmcli: fix reordering of DNS nameservers and search suffixes (#9880)

* nmcli: fix reordering of DNS nameservers and search suffixes

- Fixes #8724

* Update changelog fragment index in line with PR number

- Now I understand what that number is for

* Use correct changelog format for nmcli PR #9880

(cherry picked from commit 3922b82a57)

Co-authored-by: ashleyghooper <ashleyghooper@gmail.com>
2025-03-21 21:50:35 +01:00
patchback[bot]
845b13d5aa [PR #9904/e3d92491 backport][stable-9] Add caddy example to copr module (#9914)
Add caddy example to copr module (#9904)

Add caddy example to copr.py

(cherry picked from commit e3d92491a3)

Co-authored-by: Elijah Lopez <elijahllopezz@gmail.com>
2025-03-21 21:50:26 +01:00
Felix Fontein
fa3e6673d0 Prepare 9.5.6. 2025-03-21 21:07:32 +01:00
patchback[bot]
84033ec80a [PR #9900/6a2d9ccd backport][stable-9] sysrc: extend the list of FreeBSD releases where the jail test fails (#9902)
sysrc: extend the list of FreeBSD releases where the jail test fails (#9900)

Extend the list of FreeBSD releases where the jail test fails.

(cherry picked from commit 6a2d9ccd99)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-18 22:14:22 +01:00
patchback[bot]
3bceabce93 [PR #9881/e5eac9fe backport][stable-9] homebrew_cask: Handle unusual brew version strings (#9888)
homebrew_cask: Handle unusual brew version strings (#9881)

* Use regex to parse unusual brew version strings

Fixes: #8432

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit e5eac9fed1)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-15 09:22:42 +01:00
patchback[bot]
0dd960d8ab [PR #9871/dd0a2cbf backport][stable-9] sudoers: display stderr raised while validation (#9884)
sudoers: display stderr raised while validation (#9871)

* sudoers: display stderr raised while validation

* Print stdout and stderr raised from sudoers validation

Fixes: #9674

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit dd0a2cbff9)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-15 07:46:11 +01:00
patchback[bot]
e1b338cf41 [PR #9694/d5add1ed backport][stable-9] ipa_host: Maintain the host certificates (#9720)
ipa_host: Maintain the host certificates (#9694)

* ipa_host: Maintain the host certificates

Fix #9693

* Add changelog fragment

* Fix changelog message

* Fix changelog message again

(cherry picked from commit d5add1ed9f)

Co-authored-by: sedrubal <sedrubal@users.noreply.github.com>
2025-03-12 18:09:35 +01:00
patchback[bot]
f2e8354229 [PR #9872/fdbc06c7 backport][stable-9] CI: Add FreeBSD 13.5 (#9873)
CI: Add FreeBSD 13.5 (#9872)

Add FreeBSD 13.5.

(cherry picked from commit fdbc06c714)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-12 18:09:20 +01:00
patchback[bot]
abc435466d [PR #9846/86dea88c backport][stable-9] dnf_versionlock: add support for Fedora 41 and dnf5 (#9864)
dnf_versionlock: add support for Fedora 41 and dnf5 (#9846)

Fixes: #9556

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit 86dea88cb6)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-10 06:31:05 +01:00
patchback[bot]
3c49c096a9 [PR #9845/7d5357d7 backport][stable-9] Fix roles/policies normalization in consul_token. (#9862)
Fix roles/policies normalization in consul_token. (#9845)

* Fix roles/policies normalization in consul_token.

* Update changelogs/fragments/9845-consul_token_idempotency.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7d5357d74c)

Co-authored-by: Florian Apolloner <florian@apolloner.eu>
2025-03-10 06:30:50 +01:00
Felix Fontein
de754eacbc [stable-9] Fix/improve tests (#9861)
Fix/improve tests (#9859)

* Fix tests.

* Improve callback tests.

(cherry picked from commit eff25c8a6e)
2025-03-09 17:15:21 +01:00
patchback[bot]
0ccb961ff7 [PR #9853/4727fb77 backport][stable-9] cmd_runner tests: fix reliance on unspecified behavior (#9856)
cmd_runner tests: fix reliance on unspecified behavior (#9853)

Fix reliance on unspecified behavior.

(cherry picked from commit 4727fb77b3)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-09 08:56:49 +01:00
patchback[bot]
c6429e7740 [PR #9850/9df84654 backport][stable-9] Improve/fix unit tests (#9851)
Improve/fix unit tests (#9850)

* Improve/fix tests.

* Fix cargo test.

(cherry picked from commit 9df8465476)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-08 16:42:08 +01:00
patchback[bot]
ba7439e657 [PR #9842/c46575cf backport][stable-9] Simplify module_utils unit tests (#9843)
Simplify module_utils unit tests (#9842)

Simplify module_utils unit tests.

(cherry picked from commit c46575cf06)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-07 18:33:16 +01:00
Felix Fontein
013fb9c006 [stable-9] Unit tests: make set_module_args() a context manager, and remove copies of it in some tests (#9840)
Unit tests: make set_module_args() a context manager, and remove copies of it in some tests (#9838)

Make set_module_args() a context manager, and remove copies of set_module_args().

Prepares for Data Tagging.

(cherry picked from commit a1781d09dd)
2025-03-07 07:31:42 +01:00
patchback[bot]
9a6bd80613 [PR #9819/5f48f2ca backport][stable-9] Example typo in homebrew_services.py (#9826)
Example typo in homebrew_services.py (#9819)

Maybe this was mixed up with the _brew_service_state() function? I get this error as-written:
```
fatal: [eahmm3]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (community.general.homebrew_services) module: service
_state. Supported parameters include: name, path, state (formula)."}
```

(cherry picked from commit 5f48f2ca0d)

Co-authored-by: Ernie Hershey <github@ernie.org>
2025-03-03 21:30:37 +01:00
patchback[bot]
17d11cb587 [PR #9828/77dc0868 backport][stable-9] homebrew_services: skip tests on macOS 13.2 and 14.3 (#9829)
homebrew_services: skip tests on macOS 13.2 and 14.3 (#9828)

Skip tests on macOS 13.2 and 14.3.

(cherry picked from commit 77dc086896)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-03 21:30:25 +01:00
patchback[bot]
933166b984 [PR #9818/3b6efd5c backport][stable-9] cloudflare_dns: handle exhausted response stream in case of http error (#9822)
cloudflare_dns: handle exhausted response stream in case of http error (#9818)

* cloudflare_dns: handle exhausted response stream in case of http error

* Update changelogs/fragments/9818-cloudflare-dns-exhausted-response.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3b6efd5cbc)

Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
2025-03-03 07:24:08 +01:00
patchback[bot]
162add04b9 [PR #9812/cf147b9f backport][stable-9] misc typo fix (#9815)
misc typo fix (#9812)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit cf147b9fca)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-01 11:30:56 +01:00
patchback[bot]
faaeacfaa0 [PR #9805/dd4268e0 backport][stable-9] CI: Add macOS 15.3 (#9807)
CI: Add macOS 15.3 (#9805)

* Add macOS 15.3.

* Install setuptools on macOS 15.

(cherry picked from commit dd4268e0d9)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-26 22:02:35 +01:00
Felix Fontein
bbf3cae316 Next expected release will be 9.5.6. 2025-02-24 07:04:41 +01:00
Felix Fontein
53ebbe4b94 Release 9.5.5. 2025-02-24 06:46:51 +01:00
patchback[bot]
2674e2494d [PR #9796/217a1883 backport][stable-9] locale_gen: enable tests for Arch Linux, make sure they don't even try to run on RHEL and Fedora VMs (#9797)
locale_gen: enable tests for Arch Linux, make sure they don't even try to run on RHEL and Fedora VMs (#9796)

Enable locale_gen tests for Arch Linux, make sure they don't even try to run on RHEL and Fedora VMs.

(cherry picked from commit 217a18839d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-23 15:27:01 +01:00
patchback[bot]
341f86e2bc [PR #9788/bb2c45b5 backport][stable-9] json_query filter docs: fix typo cluster2 when cluster1 is mentioned (#9792)
json_query filter docs: fix typo cluster2 when cluster1 is mentioned (#9788)

Typo cluster2 but cluster1 is mentioned

(cherry picked from commit bb2c45b5bb)

Co-authored-by: Kloppi313 <36038231+Kloppi313@users.noreply.github.com>
2025-02-21 20:50:41 +01:00
patchback[bot]
dd63fb5347 [PR #9774/ddc1ea6a backport][stable-9] Fix proxy settings for elasticsearch_plugin.py (#9785)
Fix proxy settings for elasticsearch_plugin.py (#9774)

elasticsearch_plugin: fix error when setting proxy settings

Co-authored-by: Tim Hovius <w.hovius@rechtspraak.nl>
(cherry picked from commit ddc1ea6ae4)

Co-authored-by: Tim Hovius <timhovius@gmail.com>
2025-02-20 22:27:19 +01:00
patchback[bot]
b418b2c00d [PR #9778/203c1ecf backport][stable-9] redhat_registration: use 'enable_content' D-Bus option when available (#9783)
redhat_registration: use 'enable_content' D-Bus option when available (#9778)

This makes sure that subscription-manager always enables the content for
the system right after the registration.

This is particular important on EL 10+ and Fedora 41+.

(cherry picked from commit 203c1ecfec)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2025-02-20 22:26:59 +01:00
patchback[bot]
382c0a4af6 [PR #9106/105ae056 backport][stable-9] bugfix - Prevent passwordstore lookup to create subkey when create == false (#9779)
bugfix - Prevent passwordstore lookup to create subkey when create == false (#9106)

Fixes #9105

Apply suggestion

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 105ae0566a)

Co-authored-by: Manuel Luzarreta <mluzarreta.pro@pm.me>
2025-02-19 22:30:22 +01:00
Felix Fontein
1a0a44d179 [stable-9] Make apache2_mod_proxy work with Python 3, half-way modern Apache 2 versions, and add basic tests (#9772)
* Make apache2_mod_proxy work with Python 3, half-way modern Apache 2 versions, and add basic tests (#9762)

* Move Apache 2 installation to setup role.

* Make module work with Python 3.

* Add basic tests.

* Add changelog fragment.

* Simplify change.

* Pass referer.

* apache2_mod_proxy: follow-up for #9762, forgot one place with find_all/findAll (#9775)

Follow-up for #9762, forgot one place.

(cherry picked from commit 8e36fd4847)
2025-02-18 21:53:18 +01:00
patchback[bot]
18e4637042 [PR #9760/d696bb7b backport][stable-9] proxmox inventory: proposal for #9710 (caching) (#9769)
proxmox inventory: proposal for #9710 (caching) (#9760)

* Proposal for #9710

* Fixed comments

* Fixed trailing whitespace

* Fixed changelog fragment

(cherry picked from commit d696bb7b89)

Co-authored-by: Dirk S. <iqt4@users.noreply.github.com>
2025-02-17 19:26:01 +01:00
Felix Fontein
fb68abd6b2 Prepare 9.5.5. 2025-02-16 20:28:09 +01:00
patchback[bot]
2d5999c579 [PR #9739/b2e2d2d3 backport][stable-9] keycloak_client: compare desired and before dicts directly in checkmode (#9758)
keycloak_client: compare desired and before dicts directly in checkmode (#9739)

* compare desired and before dicts directly in checkmode

* fix authorizationServicesEnabled being dropped by kc if unset

* only add authorizationsServicesEnabled=false if before_client exists

* add changelog fragment

* Update changelog.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b2e2d2d37b)

Co-authored-by: gruenbauer@b1-systems.de <gruenbauer@b1-systems.de>
2025-02-16 12:38:02 +01:00
patchback[bot]
525ed41a0a [PR #9727/910c57aa backport][stable-9] keycloak: repair integration tests by removing jinja2 templating from conditionals (#9726) (#9747)
keycloak: repair integration tests by removing jinja2 templating from conditionals (#9726) (#9727)

* fix: remove jinja2 templating from conditionals in keycloak_role module integration tests (#9726)

* fix: remove jinja2 templating in conditional in keycloak clientsecret info integration test (#9726)

This test needs a further fix; see #9744. Left for a future PR for now.

* fix: remove jinja2 templating in conditional in keycloak clientsecret regenerate integration test (#9726)

* chore: remove jinja2 templating in conditional in keycloak user federation integration test (#9726)

These instances of templating were not causing failures,
but this removes the warnings.

* chore: remove jinja2 templating in conditional in keycloak user rolemapping integration test (#9726)

These instances of templating were not causing failures,
but this removes the warnings.

* docs: add changelog fragment (#9726)

* docs: repair changelog fragment yaml (#9726)

* docs: actually repair changelog fragment yaml (#9726)

* chore: remove changelog fragment for test only pr (#9726)

(cherry picked from commit 910c57aaa0)

Co-authored-by: Mark Armstrong <markparmstrong@gmail.com>
2025-02-15 12:31:37 +01:00
patchback[bot]
4a4fe8c61f [PR #9722/d756aeb6 backport][stable-9] CI: Cleanup AZP config similarly to ansible-core did some years ago (#9724)
CI: Cleanup AZP config similarly to ansible-core did some years ago (#9722)

Cleanup AZP config similarly to ansible-core did some years ago.

(cherry picked from commit d756aeb6ce)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-10 23:19:52 +01:00
patchback[bot]
f9e4bc85e9 [PR #9695/191a4d8f backport][stable-9] xml: ensure the stream object is closed in main() (#9711)
xml: ensure the stream object is closed in main() (#9695)

* ensure the stream object is closed in main()

* add changelog frag

* Update plugins/modules/xml.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/xml.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 191a4d8f63)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-09 14:26:42 +01:00
patchback[bot]
bde1c721e0 [PR #9705/efe0c464 backport][stable-9] Disable failing copr tests (#9708)
Disable failing copr tests (#9705)

Disable failing copr tests.

(cherry picked from commit efe0c464ff)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-09 12:41:35 +01:00
Felix Fontein
285c97e7ea Fix typo.
(cherry picked from commit d6943c9838)
2025-02-09 08:11:06 +01:00
patchback[bot]
d45a889c3f [PR #9699/10c15d31 backport][stable-9] filesystem tests: reiserfsprogs is no longer available on Arch Linux (#9701)
filesystem tests: reiserfsprogs is no longer available on Arch Linux (#9699)

reiserfsprogs is no longer available on Arch Linux.

(cherry picked from commit 10c15d31f7)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-08 20:25:38 +01:00
patchback[bot]
1e7294716e [PR #9686/0b4337c1 backport][stable-9] Also disable snap_alias tests for RHEL 8.8 (#9688)
Also disable snap_alias tests for RHEL 8.8 (#9686)

Also disable snap_alias tests for RHEL 8.8.

(cherry picked from commit 0b4337c13d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-04 22:29:23 +01:00
patchback[bot]
88c605a344 [PR #9679/54eec2cb backport][stable-9] Disable snap tests on RHEL 8.8 (#9681)
Disable snap tests on RHEL 8.8 (#9679)

Disable snap tests on RHEL 8.8.

(cherry picked from commit 54eec2cb09)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-03 10:53:45 +01:00
patchback[bot]
4a41ab583a [PR #9644/250dc113 backport][stable-9] Fb keycloak client improvement (#9670)
Fb keycloak client improvement (#9644)

* Fix for failed test

TASK [keycloak_client : Assert changes not detected in last two tasks (desire when same, and check)] ***
task path: /root/ansible_collections/community/general/tests/output/.tmp/integration/keycloak_client-p3ttqf7d-ÅÑŚÌβŁÈ/tests/integration/targets/keycloak_client/tasks/main.yml:79
fatal: [testhost]: FAILED! => {
    "assertion": "check_client_when_present_and_same is not changed",
    "changed": false,
    "evaluated_to": false,
    "msg": "Assertion failed"
}

* Improved test data to test more scenarios, e.g documentation uses True in examples

* Normalize values in config

* add changelog

* Apply suggestions from code review

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Update tests/integration/targets/keycloak_client/vars/main.yml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Update changelogs/fragments/9644-kc_client-test-improvement-and-fix.yaml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 250dc1139c)

Co-authored-by: amPrimeSign <146177975+amPrimeSign@users.noreply.github.com>
2025-02-01 22:46:10 +01:00
patchback[bot]
5d86045048 [PR #9649/19d00496 backport][stable-9] cloudflare_dns: fix crash when deleting a DNS record or when updating a record with solo=true (#9654)
cloudflare_dns: fix crash when deleting a DNS record or when updating a record with solo=true (#9649)

* cloudflare_dns: fix crash when deleting a DNS record or when updating a record with solo=true

On 2025-01-27, Cloudflare removed the 'zone_id' field from the DNS record API responses. This caused a KeyError in the delete_dns_records method, which previously relied on rr['zone_id'].

This commit ensures the zone ID is retrieved via _get_zone_id() rather than using the no-longer-provided 'zone_id' field in the record response.

Reference: https://developers.cloudflare.com/dns/changelog/#2025-01-27

* Add changelog fragment

* Update changelogs/fragments/9649-cloudflare_dns-fix-crash-when-deleting-record.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/9649-cloudflare_dns-fix-crash-when-deleting-record.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 19d0049698)

Co-authored-by: valievkarim <valievkarim@gmail.com>
2025-01-31 10:57:21 +01:00
Felix Fontein
2eb067e3e0 The next release will be 9.5.5. 2025-01-27 06:56:49 +01:00
Felix Fontein
2ffbfef2ff Release 9.5.4. 2025-01-27 06:27:46 +01:00
patchback[bot]
b23eb4babd [PR #9621/fb4f7248 backport][stable-9] keycloak_client: sanitize saml.encryption.private.key (#9629)
keycloak_client: sanitize `saml.encryption.private.key` (#9621)

* sanitize saml.encryption.private.key in module output

* add changelog fragment

* Re-categorize changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit fb4f7248c9)

Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
2025-01-26 13:22:53 +01:00
patchback[bot]
56a906e42b [PR #9578/bcc92e8a backport][stable-9] redhat_subscription: stop manual unsubscribing on unregistration (#9589)
redhat_subscription: stop manual unsubscribing on unregistration (#9578)

Unregistering a system also drops all the resources for it
automatically, so there is no need to manually unsubscribing (which
actually means removing all the subscriptions).

In addition to that, newer versions of subscription-manager drop all the
support for entitlements, so the "remove" subcommand (used by
unsubscribe()) does not exist anymore, and thus the unregistration fails
with those versions.

This fixes the registration on EL 10 systems, and Fedora 41 and greater.

(cherry picked from commit bcc92e8aac)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2025-01-20 19:47:17 +01:00
patchback[bot]
0361154ff3 [PR #9552/bf69dc46 backport][stable-9] CI: Add Fedora 41, Alpine 3.21, RHEL 9.5, FreeBSD 14.2 to CI for devel (#9557)
CI: Add Fedora 41, Alpine 3.21, RHEL 9.5, FreeBSD 14.2 to CI for devel (#9552)

* Add Fedora 41, Alpine 3.21, RHEL 9.5, FreeBSD 14.2 to CI for devel.

* Add some ignores that are likely needed.

* Try to fix/ignore various errors.

* Fix redis setup on Fedora 41.

* Undo disable yum_versionlock since it's already globally disabled.

(cherry picked from commit bf69dc46ff)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-08 19:32:03 +01:00
patchback[bot]
d1f7752b57 [PR #9542/81ea9f69 backport][stable-9] Add hkariti to notifications ignore list (#9549)
Add hkariti to notifications ignore list (#9542)

* Add hkariti to notifications ignore list

* Update .github/BOTMETA.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 81ea9f69bf)

Co-authored-by: Hagai Kariti <hkariti@gmail.com>
2025-01-07 19:08:58 +01:00
Felix Fontein
c6e557b1ec Fix CI badge image URL. Add documentation badge.
(cherry picked from commit 007302d5af)
2025-01-04 11:29:11 +01:00
patchback[bot]
ec183626e5 [PR #9518/d7da0ae7 backport][stable-9] remove stearz as maintainer (#9520)
remove stearz as maintainer (#9518)

* remove stearz as maintainer

As I do not work with Sophos UTMs anymore I am no longer able to test/maintain. - I added team_e_spirit as maintainer as I think they are still using and willing to support the modules.

* added ignore lines to remove stearz as maintainer

(cherry picked from commit d7da0ae7f6)

Co-authored-by: Stephan Schwarz <22387558+stearz@users.noreply.github.com>
2025-01-03 20:07:05 +01:00
Felix Fontein
af762a4c4e The next release will be 9.5.4. 2024-12-31 13:36:27 +01:00
Felix Fontein
124246b763 Release 9.5.3. 2024-12-31 11:50:52 +01:00
patchback[bot]
cb4b8bc3cc [PR #9498/7f3fef30 backport][stable-9] fix typo (#9501)
fix typo (#9498)

(cherry picked from commit 7f3fef3038)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-31 10:41:16 +01:00
patchback[bot]
c7773afebf [PR #9490/1e28302a backport][stable-9] htpasswd: let changed reflect updated permissions (#9492)
htpasswd: let changed reflect updated permissions (#9490)

* Let changed reflect updated permissions.

* Make pylint happy.

(cherry picked from commit 1e28302a66)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-31 10:28:53 +01:00
patchback[bot]
ae8015667c [PR #9470/f55899d6 backport][stable-9] svc: adjustments to docs (#9478)
svc: adjustments to docs (#9470)

* svc: adjustments to docs

* Update plugins/modules/svc.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f55899d6ef)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-30 20:00:20 +01:00
patchback[bot]
e98daa9f39 [PR #9277/403418f7 backport][stable-9] proxmox_template: fix the wrong path called on proxmox_template.task_status (#9475)
proxmox_template: fix the wrong path called on proxmox_template.task_status (#9277)

fix: add missing 's' on proxmox_template.task_status

Missing the 's' means using the wrong API, making log reading
impossible. Should fix !9276

Signed-off-by: Alexandre Nicolaie <xunleii@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 403418f75d)

Co-authored-by: Alexandre Nicolaie <xunleii@users.noreply.github.com>
2024-12-30 12:55:18 +01:00
patchback[bot]
6f3cfd3385 [PR #9455/d887930e backport][stable-9] normalize docs in callback plugins (#9466)
normalize docs in callback plugins (#9455)

* normalize docs in callback plugins

Normalize doc blocks for plugins

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d887930e49)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-29 21:24:13 +01:00
patchback[bot]
015496fa9e [PR #9453/040cd0ca backport][stable-9] normalize docs in cache/connection plugins (#9461)
normalize docs in cache/connection plugins (#9453)

Normalize doc blocks for plugins

(cherry picked from commit 040cd0ca50)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-29 14:12:48 +01:00
patchback[bot]
f44697016f [PR #9256/d8b38073 backport][stable-9] proxmox_disk: fix async method of resize_disk (#9438)
proxmox_disk: fix async method of resize_disk (#9256)

* proxmox_disk: fix async method of resize_disk

Rewritten resizing of disk into separated function and used async method to retrieve task result. Additionally, rewritten function to detect failed tasks early, without waiting for timeout.

* proxmox_disk: add changelog fragment

* proxmox_disk: fix sanity errors

* Apply suggestions from code review

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* proxmox_disk: workaround for legacy Proxmox

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Apply suggestions from the review

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d8b38073c1)

Co-authored-by: castorsky <csky57@gmail.com>
2024-12-28 14:43:25 +01:00
patchback[bot]
0bc4970953 [PR #9423/0afd3386 backport][stable-9] [m-z]*.py: normalize doc_fragments (#9429)
[m-z]*.py: normalize doc_fragments (#9423)

(cherry picked from commit 0afd3386d1)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-27 14:52:32 +01:00
patchback[bot]
4dd76284e9 [PR #9393/84655b0d backport][stable-9] i[b-n]*.py: normalize docs (#9411)
i[b-n]*.py: normalize docs (#9393)

* i[b-n]*.py: normalize docs

* Update plugins/modules/ilo_redfish_command.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 84655b0d0f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-26 22:44:38 +01:00
patchback[bot]
a66b9fc5c9 [PR #9395/3048d530 backport][stable-9] g*.py: normalize docs (#9414)
g*.py: normalize docs (#9395)

* g*.py: normalize docs

* Update plugins/modules/gandi_livedns.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3048d5305d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-26 22:44:22 +01:00
patchback[bot]
87d63c5bed [PR #9394/912065ad backport][stable-9] h*.py: normalize docs (#9416)
h*.py: normalize docs (#9394)

* h*.py: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 912065ad0e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-26 22:44:12 +01:00
Felix Fontein
e1d229f2c5 [stable-9] dig: handle NoNameservers exception (#9363) (#9410)
dig: handle NoNameservers exception (#9363)

Handle NoNameservers.

(cherry picked from commit 61b2304f4d)
2024-12-26 17:13:08 +01:00
patchback[bot]
7506742c38 [PR #9352/9fc3092b backport][stable-9] s[e-n]*: normalize docs (#9398)
s[e-n]*: normalize docs (#9352)

* s[e-n]*: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* quote line with : and remove extraneous notes

* Update plugins/modules/slack.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/seport.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9fc3092bb3)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-26 08:39:24 +01:00
patchback[bot]
c64705474d [PR #9372/bef82e28 backport][stable-9] p[a-e]*: normalize docs (#9396)
p[a-e]*: normalize docs (#9372)

* p[a-e]*: normalize docs

* Update plugins/modules/packet_volume.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit bef82e28a2)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-26 08:39:12 +01:00
Felix Fontein
b8968c5c1c Prepare 9.5.3 release. 2024-12-25 23:00:34 +01:00
patchback[bot]
1ccfc3b821 [PR #9353/70b62ed7 backport][stable-9] s[a-c]*: normalize docs (#9375)
s[a-c]*: normalize docs (#9353)

* s[a-c]*: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 70b62ed745)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-25 21:41:01 +01:00
patchback[bot]
595c105a29 [PR #9351/4b23e5ec backport][stable-9] s[o-y]*: normalize docs (#9368)
s[o-y]*: normalize docs (#9351)

* s[o-y]*: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/spectrum_model_attrs.py

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4b23e5ecff)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-25 16:46:29 +01:00
patchback[bot]
e120c64a21 [PR #9339/6e84c137 backport][stable-9] t*: normalize docs (#9355)
t*: normalize docs (#9339)

* t*: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* break long line to regain sanity

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6e84c1375e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-24 14:05:39 +01:00
patchback[bot]
8031011497 [PR #9338/2005125a backport][stable-9] u[a-s]*: normalize docs (#9360)
u[a-s]*: normalize docs (#9338)

* u[a-s]*: normalize docs

* Update plugins/modules/udm_dns_record.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/udm_dns_record.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/udm_dns_record.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/udm_dns_zone.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/ufw.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2005125af4)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-24 13:04:48 +00:00
patchback[bot]
961ba0ddcc [PR #9335/c141f868 backport][stable-9] utm*: normalize docs (#9345)
utm*: normalize docs (#9335)

* utm*: normalize docs

* Update plugins/modules/utm_aaa_group.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c141f86883)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-23 21:40:51 +01:00
patchback[bot]
5d094c3bf3 [PR #9334/da51594f backport][stable-9] qubes connection plugin: fix display stmt (#9336)
qubes connection plugin: fix display stmt (#9334)

* qubes connection plugin: fix display stmt

* add changelog frag

(cherry picked from commit da51594f9d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-23 12:28:17 +01:00
patchback[bot]
19b6f9ef3f [PR #9309/b57fef20 backport][stable-9] [vw]*: adjust docs (#9325)
[vw]*: adjust docs (#9309)

[vm]*: adjust docs

(cherry picked from commit b57fef201e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-23 12:22:42 +01:00
patchback[bot]
3dd1c9d64a [PR #9306/d05d067f backport][stable-9] z mods adjust docs (#9328)
z mods adjust docs (#9306)

z* modules: adjust docs (re-commiting with adjustment from PR)

(cherry picked from commit d05d067f3b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-23 12:22:35 +01:00
patchback[bot]
f9086b4680 [PR #9310/2adcc34d backport][stable-9] CI: Arch Linux updated to Python 3.13 (#9313)
CI: Arch Linux updated to Python 3.13 (#9310)

* Arch Linux updated to Python 3.13.

* Skip lmdb_kv lookup on Arch Linux.

Ref: https://github.com/jnwatson/py-lmdb/issues/362
(cherry picked from commit 2adcc34dd5)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-22 22:23:31 +01:00
patchback[bot]
861cbc29be [PR #9281/1b6c0517 backport][stable-9] zfs modules: adjust docs (#9304)
zfs modules: adjust docs (#9281)

* zfs modules: adjust docs

* Apply suggestions from code review

* fix examples indentation

* Update plugins/modules/zfs.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1b6c05176b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-21 23:52:01 +01:00
patchback[bot]
3f5445274c [PR #9280/afa5716e backport][stable-9] yum_versionlock: adjust docs (#9302)
yum_versionlock: adjust docs (#9280)

* yum_versionlock: adjust docs

* fix examples indentation

(cherry picked from commit afa5716e0b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-21 19:26:30 +01:00
patchback[bot]
f9ee387f68 [PR #9297/d2088ccf backport][stable-9] Polish botmeta extra sanity test and make it work without warnings on Python 3.13 (#9299)
Polish botmeta extra sanity test and make it work without warnings on Python 3.13 (#9297)

Polish botmeta and make it work without warnings on Python 3.13.

(cherry picked from commit d2088ccfcc)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-21 17:02:28 +01:00
patchback[bot]
aa3a43cfa8 [PR #9263/2682ec47 backport][stable-9] keycloak_authentication: Fix priority attribute during execution updates (#9291)
keycloak_authentication: Fix priority attribute during execution updates (#9263)

keycloak_authentication: Fix priority attribute during execution updates.

(cherry picked from commit 2682ec47d9)

Co-authored-by: Florian Apolloner <florian@apolloner.eu>
2024-12-20 23:06:25 +01:00
patchback[bot]
988d760372 [PR #9271/50b25f8c backport][stable-9] random_words integration tests: avoid test failure due to valid result (#9273)
random_words integration tests: avoid test failure due to valid result (#9271)

Avoid test failure due to valid result.

(cherry picked from commit 50b25f8c01)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-17 21:33:30 +01:00
patchback[bot]
f78c1b304c [PR #9259/65827bdc backport][stable-9] Drop myself from team_suse (#9265)
Drop myself from team_suse (#9259)

I no longer work with ansible and/or SUSE so drop me from the team.

(cherry picked from commit 65827bdc96)

Co-authored-by: Thomas Bechtold <thomasbechtold@jpberlin.de>
2024-12-16 20:58:41 +01:00
patchback[bot]
1e3a825e16 [PR #9250/f6dae1fc backport][stable-9] CI: Fix some issues pointed out by zizmor (#9252)
CI: Fix some issues pointed out by zizmor (#9250)

Fix some issues pointed out by zizmor.

(cherry picked from commit f6dae1fc4d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-14 15:17:08 +01:00
patchback[bot]
34fe33163b [PR #9234/34e8e8e5 backport][stable-9] Fix VerifyBiosAttributes command on Systems with multiple entries (#9248)
Fix VerifyBiosAttributes command on Systems with multiple entries (#9234)

* Fix verify_bios_attributes command

* Add changelog fragment

* Update changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml

Improve fragment

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 34e8e8e5d1)

Co-authored-by: Scott Seekamp <sseekamp@coreweave.com>
2024-12-14 11:13:41 +01:00
patchback[bot]
396eb1d7e4 [PR #9243/9df4ef9a backport][stable-9] sysrc: add another exclusion for ezjail (#9245)
sysrc: add another exclusion for ezjail (#9243)

Add another exclusion.

(cherry picked from commit 9df4ef9a9c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-13 22:41:05 +01:00
Felix Fontein
baef8580ec The next release will be 9.5.3. 2024-12-02 21:44:42 +01:00
Felix Fontein
d8505bd8d9 Release 9.5.2. 2024-12-02 21:12:30 +01:00
patchback[bot]
aa0df4d81d [PR #9202/55d714da backport][stable-9] keycloak_clientscope_type: sort default and optional clientscope lists before diff (#9221)
keycloak_clientscope_type: sort default and optional clientscope lists before diff (#9202)

* sort default and optional clientscope lists before diff

* add changelog fragment

(cherry picked from commit 55d714da81)

Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
2024-12-02 20:34:13 +01:00
patchback[bot]
c349861190 [PR #9198/f2dbe08d backport][stable-9] Fail if Slack API response is not OK with error message (#9211)
Fail if Slack API response is not OK with error message (#9198)

* Fails if slack api return is not ok

* add changelog

* show all error

* add doc

* Update plugins/modules/slack.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f2dbe08d0e)

Co-authored-by: Matthieu Bourgain <aohzan@gmail.com>
2024-12-02 20:33:41 +01:00
patchback[bot]
a853e561f1 [PR #9187/f828bdee backport][stable-9] flatpak: force locale language to be C (#9206)
flatpak: force locale language to be C (#9187)

* flatpak: force locale langauge to be C

* add changelog frag

(cherry picked from commit f828bdee22)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-11-28 20:06:48 +01:00
patchback[bot]
1d9367ebea [PR #9186/a863b628 backport][stable-9] fixing broken check mode in the github_key (#9204)
fixing broken check mode in the github_key (#9186)

* fixing datetime.strftime()

* added changelog fragment

* Update changelogs/fragments/9186-fix-broken-check-mode-in-github-key.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit a863b62859)

Co-authored-by: tomcperry <99128358+tomcperry@users.noreply.github.com>
2024-11-28 20:06:32 +01:00
patchback[bot]
f1cf0c1949 [PR #9191/fa7c2df4 backport][stable-9] ufw: add note to docs about concurrency (#9194)
ufw: add note to docs about concurrency (#9191)

* ufw: add note to docs about concurrency

* wordsmithing

(cherry picked from commit fa7c2df4b8)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-11-26 06:40:50 +01:00
Felix Fontein
5b26e09319 Prepare 9.5.2 release. 2024-11-23 15:41:47 +01:00
patchback[bot]
3cc5a5bc8d [PR #9152/5a971587 backport][stable-9] Update docs for github_app_access_token.py (#9163)
Update docs for github_app_access_token.py (#9152)

* Update github_app_access_token.py

updating docs - github_token missing {{ }}

* Update plugins/lookup/github_app_access_token.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5a9715874a)

Co-authored-by: Ian Richardson <126898943+PredatarIan@users.noreply.github.com>
2024-11-20 19:31:34 +01:00
patchback[bot]
cd0818e488 [PR #9157/4b0d5cb8 backport][stable-9] dnf_config_manager: fix parsing for non-english locales (#9165)
dnf_config_manager: fix parsing for non-english locales (#9157)

* dnf_config_manager: forces locale to 'C' when the module starts

* adds changelog fragment

* Apply suggestions from code review

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 4b0d5cb8cf)

Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
2024-11-20 19:30:32 +01:00
patchback[bot]
ad197a303a [PR #9144/54194ccb backport][stable-9] modprobe: document when 'persistent' was added. (#9155)
modprobe: document when 'persistent' was added. (#9144)

This is based on `git tag --contains
29f5033737a7fd86349ff3daab7d7ee7db66ad00`.

(cherry picked from commit 54194ccb24)

Co-authored-by: Max Gautier <mg@max.gautier.name>
2024-11-19 20:17:10 +01:00
patchback[bot]
cdbf70d781 [PR #9145/dc856ab6 backport][stable-9] filters/dict: document the correct return value (#9150)
filters/dict: document the correct return value (#9145)

(cherry picked from commit dc856ab6fe)

Co-authored-by: Max Gautier <mg@max.gautier.name>
2024-11-18 20:58:51 +01:00
patchback[bot]
c77661c184 [PR #9143/2a66ac71 backport][stable-9] build(deps): bump fsfe/reuse-action from 4 to 5 (#9147)
build(deps): bump fsfe/reuse-action from 4 to 5 (#9143)

Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 4 to 5.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 2a66ac719a)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 19:49:21 +01:00
patchback[bot]
d99a7974ad [PR #9124/36c7e560 backport][stable-9] dnf_config_manager: use --assumeyes when changing state (#9141)
dnf_config_manager: use --assumeyes when changing state (#9124)

* dnf_config_manager: use --assumeyesm when changing state

* changelog fragment

* update tests

* format fix

* Update changelogs/fragments/9124-dnf_config_manager.yml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 36c7e56005)

Co-authored-by: Andrew Hyatt <4400272+ahyattdev@users.noreply.github.com>
2024-11-17 20:19:58 +00:00
patchback[bot]
0fcd23a3f1 [PR #9128/9596995f backport][stable-9] homebrew_cask: add + to valid cask chars (#9134)
homebrew_cask: add + to valid cask chars (#9128)

* fix(homebrew_cask): add + to valid cask chars

* docs(homebrew_cask): add changelog fragment

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>

* fix(homebrew_cask): add PR link to changelog fragment

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>

* fix: add period to end of changelog fragment

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>

* fix: remove blank line from changelog fragment

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>

* fix: changelog fragment formatting

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Update changelogs/fragments/9128-homebrew_cask-name-regex-fix.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9596995ffc)

Co-authored-by: dronenb <dronenb@users.noreply.github.com>
2024-11-16 19:14:48 +01:00
patchback[bot]
49fc40b275 [PR #9077/62cb6087 backport][stable-9] keycloak_client: remove code that turns attributes dict into list (#9115)
keycloak_client: remove code that turns attributes dict into list (#9077)

* remove code that turns attributes dict into list

* add changelog fragment

* Update changelogs/fragments/9077-keycloak_client-fix-attributes-dict-turned-into-list.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 62cb6087b5)

Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
2024-11-11 20:35:42 +01:00
patchback[bot]
c6c65ee554 [PR #9082/d27d86ec backport][stable-9] keycloak_clientscope: remove code turning attributes dict into list (#9117)
keycloak_clientscope: remove code turning attributes dict into list (#9082)

* remove code turning attributes dict into list

* add changelog fragment

(cherry picked from commit d27d86ecb1)

Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
2024-11-11 20:35:33 +01:00
patchback[bot]
d385caa73f [PR #9114/bafb8aca backport][stable-9] redfish_utils: remove undocumented default applytime (#9119)
redfish_utils: remove undocumented default applytime (#9114)

* redfish_utils: remove undocumented default applytime

The `@Redfish.OperationApplyTime` parameter is optional as per Redfish
spec version 1.21.0, paragraph 7.11 [1]. Some systems reject the
request rather than ignore it, causing failures that can not be
workarounded.

Removing this default resolves compatibility issues.

[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.21.0.html

Signed-off-by: Tan Siewert <tan@siewert.io>

* redfish_utils: fix changelog fragment to bugfix

Signed-off-by: Tan Siewert <tan@siewert.io>

---------

Signed-off-by: Tan Siewert <tan@siewert.io>
(cherry picked from commit bafb8aca29)

Co-authored-by: Tan Siewert <tom@siewert.io>
2024-11-11 20:35:25 +01:00
patchback[bot]
2b52822043 [PR #9109/04c2ad18 backport][stable-9] Add FreeBSD 13.4 to CI (#9110)
Add FreeBSD 13.4 to CI (#9109)

* Add FreeBSD 13.4 to CI.

* iso_extract won't work.

* pkgng: jail won't work either.

(cherry picked from commit 04c2ad18da)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-09 12:49:53 +01:00
Felix Fontein
9ebb5b270a Adjust nightly CI schedules.
(cherry picked from commit e13d6de250)
2024-11-04 19:35:49 +01:00
patchback[bot]
7b9ba8d2e2 [PR #9099/886d4a65 backport][stable-9] proxmox inventory: fix urllib3 InsecureRequestWarnings not suppressing when a token is used (#9100)
proxmox inventory: fix urllib3 InsecureRequestWarnings not suppressing when a token is used (#9099)

* proxmox inventory: fix urllib3 InsecureRequestWarnings not suppressing when a token is used

* proxmox inventory: add changelog fragment

* proxmox inventory: add forgotten pr number

* Update changelog.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 886d4a6596)

Co-authored-by: Mikhail Vorontsov <52924343+mephs@users.noreply.github.com>
2024-11-04 19:35:14 +01:00
Felix Fontein
d33467611e The next release will be 9.5.2. 2024-11-03 20:48:39 +01:00
Felix Fontein
9e0eeb0b94 Release 9.5.1. 2024-11-03 20:24:40 +01:00
patchback[bot]
5fd97399b0 [PR #9093/8fc11fe8 backport][stable-9] keycloak_clientscope_type fix checkmode (#9095)
keycloak_clientscope_type fix checkmode (#9093)

* fix check_mode on set keycloak client scope type (#9092)

* add changelog fragment (#9092)

* update changelog fragment (#9092)

* compact code: make one line conditions with list comprehension and any()

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* fix syntax error: remove extra ')'

* fix changelog fragment type

Co-authored-by: Felix Fontein <felix@fontein.de>

* add issue's link in changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8fc11fe88f)

Co-authored-by: witrdotnet <witr.net@gmail.com>
2024-11-03 11:30:16 +01:00
patchback[bot]
eb14bd572d [PR #9085/9553dd9d backport][stable-9] Stop using ansible.module_utils.compat.importlib (#9089)
Stop using ansible.module_utils.compat.importlib (#9085)

Stop using ansible.module_utils.compat.importlib.

(cherry picked from commit 9553dd9ddf)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-10-31 19:10:08 +01:00
patchback[bot]
beff4063b3 [PR #9057/c71f662d backport][stable-9] Redfish: Added handling for trailing slashes in URIs when extracting member identifiers (#9078)
Redfish: Added handling for trailing slashes in URIs when extracting member identifiers (#9057)

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
(cherry picked from commit c71f662d55)

Co-authored-by: Mike Raineri <mraineri@gmail.com>
2024-10-29 20:28:07 +01:00
patchback[bot]
b6cd89c677 [PR #9056/67d1b6c4 backport][stable-9] one_image/one_image_info: Fix class typo (#9072)
one_image/one_image_info: Fix class typo (#9056)

* Fix one_image class method args

* Add CHANGELOG fragment

* PR fix

* PR fixes

(cherry picked from commit 67d1b6c413)

Co-authored-by: alexander <79072457+abakanovskii@users.noreply.github.com>
2024-10-29 20:27:36 +01:00
Felix Fontein
9c535cb17d Prepare 9.5.1. 2024-10-28 21:29:16 +01:00
patchback[bot]
772b5b1ad3 [PR #9052/d0b4e91c backport][stable-9] modprobe: fix --check mode not being honored for persistent option (#9071)
modprobe: fix --check mode not being honored for persistent option (#9052)

* modprobe: fix --check mode not being honored for persistent option

* Add CHANGELOG

* Update CHANGELOG

* Update changelogs/fragments/9052-modprobe-bugfix.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: d-usuba <d-usuba@sakura.ad.jp>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d0b4e91cac)

Co-authored-by: salmon111 <campfire@kumachans.net>
2024-10-28 21:25:16 +01:00
patchback[bot]
e5ab4be82d [PR #9045/ccf7f623 backport][stable-9] Update documentation in apk.py (#9053)
Update documentation in apk.py (#9045)

* Update apk.py

Fix for issue #9017

* Update plugins/modules/apk.py

Added a line break to fix the issue of the line being too long.

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ccf7f62325)

Co-authored-by: Navaneeth S <navisk13@gmail.com>
2024-10-22 20:49:03 +02:00
patchback[bot]
65dd204dab [PR #9019/93be499f backport][stable-9] one_vnet: Fix module (#9049)
one_vnet: Fix module (#9019)

* Fix one_vnet module

* Add CHANGELOG

* Fix CHANGELOG

(cherry picked from commit 93be499f26)

Co-authored-by: alexander <79072457+abakanovskii@users.noreply.github.com>
2024-10-21 21:09:08 +02:00
patchback[bot]
5112994fd4 [PR #8979/658637dc backport][stable-9] keycloak_group: fix subgroup creation in Keycloak ≥23 (#9041)
keycloak_group: fix subgroup creation in Keycloak ≥23 (#8979)

* keycloak_group: fix subgroup creation in Keycloak ≥23

* Add changelog fragment

* Include issue and pull request in changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

* Use new way to get subgroups when getting a subgroup chain

* Fix indent

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 658637dc70)

Co-authored-by: Victor Gaudard <victor.gaudard@gmail.com>
2024-10-19 22:51:06 +02:00
patchback[bot]
0d4d3f6b73 [PR #9040/cc72fa07 backport][stable-9] groupby_as_dict: mention Jinja2's groupby filter (#9043)
groupby_as_dict: mention Jinja2's groupby filter (#9040)

Mention Jinja2's groupby filter.

(cherry picked from commit cc72fa0786)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-10-19 22:50:57 +02:00
patchback[bot]
4a7b93df64 [PR #9035/b1f46040 backport][stable-9] Skip timezone test on RHEL 7.9 VMs (#9039)
Skip timezone test on RHEL 7.9 VMs (#9035)

Skip timezone test on RHEL 7.9 VMs.

(cherry picked from commit b1f4604067)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-10-19 14:29:01 +02:00
patchback[bot]
ab20c90929 [PR #9028/1180843e backport][stable-9] bitwarden_secrets_manager lookup plugin: support more current versions of BWS CLI (#9036)
bitwarden_secrets_manager lookup plugin: support more current versions of BWS CLI (#9028)

* add support for getting secrets in the current version of bitwarden secrets manager

* format

* format2

* fragment

* fix formatting errors

* strip out junk before the version in cli output

* mock the --version command in the unit tests

* use LooseVersion comparison - russoz suggestion

* add blank line

(cherry picked from commit 1180843e35)

Co-authored-by: Zac <zgibson@live.com>
2024-10-19 14:05:56 +02:00
Felix Fontein
721ea50420 Fix reuse workflow branches.
(cherry picked from commit 5874711c6e)
2024-10-19 12:36:07 +02:00
patchback[bot]
23b646d5c2 [PR #9010/12fa2452 backport][stable-9] update gitlab label's color (#9034)
update gitlab label's color (#9010)

* update gitlab label's color

fail if both new_name and color are missing, as per Gitlab API docs.

* add changelog

* Update changelog with suggestion

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* remove unneeded check

* Update changelog

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 12fa2452d8)

Co-authored-by: Gabriele Pongelli <gpongelli@users.noreply.github.com>
2024-10-17 21:49:39 +02:00
patchback[bot]
1e78ff58d5 [PR #8972/a894f8e7 backport][stable-9] snap: improve documentation (#9023)
snap: improve documentation (#8972)

* plugins/modules/snap: improve documentation

Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>

* undo helper setence about finding avaible snaps.

Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>

* wip: adress reviews

Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>

* fix: revert sentence

Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>

* feat: improve explanation on snap options

Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>

* clean: remove duplicated and leave reference

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* feat: add note about priviledge scalation and switch sentence position

Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>

* fix: remove additional dash.

Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>

* feat: reword note and use better doc cross-ref syntax

Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>

* refact: add period.

Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>

* fix: linter errors

Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>

* fix: remove redundant sentence

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* fix: remove confuse sentence

Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>

* fix: remove redudant content

Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>

* feat: add missing word

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* refact: remove abreviation

Co-authored-by: Felix Fontein <felix@fontein.de>

* refact: remove abreviation

Co-authored-by: Felix Fontein <felix@fontein.de>

* refact: remove abreviation

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>
Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit a894f8e7eb)

Co-authored-by: Lincoln Wallace <locnnil@hotmail.com>
2024-10-13 21:46:35 +02:00
patchback[bot]
280a5b0e61 [PR #8907/8df9d0d7 backport][stable-9] one_host: Fix ID logic (#9014)
one_host: Fix ID logic (#8907)

* Fix one_host module

* Add CHANGELOG fragment

* PR Fixes

* Update exceptions

(cherry picked from commit 8df9d0d7de)

Co-authored-by: alexander <79072457+abakanovskii@users.noreply.github.com>
2024-10-10 22:25:03 +02:00
patchback[bot]
21a840eab7 [PR #9012/67ddb567 backport][stable-9] Dell PwrButton requires a job initated at reboot (#9015)
Dell PwrButton requires a job initated at reboot (#9012)

Dell systems do not change the bios setting PwrButton right away. The
command will return changed=true, but it is not applied. Also no job is
scheduled at next reboot for the change to take place. This patch aims
to fix this issue.

(cherry picked from commit 67ddb567c9)

Co-authored-by: Ruben Bosch <8641284+Rubueno@users.noreply.github.com>
2024-10-10 22:24:53 +02:00
Felix Fontein
6f98adf602 Next release will be 9.5.1. 2024-10-07 23:37:32 +02:00
610 changed files with 19362 additions and 19495 deletions

View File

@@ -29,22 +29,20 @@ schedules:
always: true
branches:
include:
- stable-10
- stable-9
- stable-8
- cron: 0 11 * * 0
displayName: Weekly (old stable branches)
always: true
branches:
include:
- stable-7
- stable-8
variables:
- name: checkoutPath
value: ansible_collections/community/general
- name: coverageBranches
value: main
- name: pipelinesCoverage
value: coverage
- name: entryPoint
value: tests/utils/shippable/shippable.sh
- name: fetchDepth
@@ -72,7 +70,6 @@ stages:
- test: 2
- test: 3
- test: 4
- test: extra
- stage: Sanity_2_18
displayName: Sanity 2.18
dependsOn: []
@@ -172,10 +169,10 @@ stages:
parameters:
testFormat: devel/{0}
targets:
- name: Alpine 3.20
test: alpine/3.20
# - name: Fedora 40
# test: fedora/40
- name: Alpine 3.21
test: alpine/3.21
# - name: Fedora 41
# test: fedora/41
- name: Ubuntu 22.04
test: ubuntu/22.04
- name: Ubuntu 24.04
@@ -190,12 +187,14 @@ stages:
parameters:
testFormat: devel/{0}
targets:
- name: macOS 14.3
test: macos/14.3
- name: RHEL 9.4
test: rhel/9.4
- name: FreeBSD 14.1
test: freebsd/14.1
- name: macOS 15.3
test: macos/15.3
- name: RHEL 9.5
test: rhel/9.5
- name: FreeBSD 14.2
test: freebsd/14.2
- name: FreeBSD 13.5
test: freebsd/13.5
groups:
- 1
- 2
@@ -208,8 +207,12 @@ stages:
parameters:
testFormat: 2.18/{0}
targets:
- name: macOS 14.3
test: macos/14.3
- name: RHEL 9.4
test: rhel/9.4
- name: FreeBSD 14.1
test: freebsd/14.1
groups:
- 1
- 2
@@ -264,10 +267,10 @@ stages:
parameters:
testFormat: devel/linux/{0}
targets:
- name: Fedora 40
test: fedora40
- name: Alpine 3.20
test: alpine320
- name: Fedora 41
test: fedora41
- name: Alpine 3.21
test: alpine321
- name: Ubuntu 22.04
test: ubuntu2204
- name: Ubuntu 24.04
@@ -284,6 +287,10 @@ stages:
parameters:
testFormat: 2.18/linux/{0}
targets:
- name: Fedora 40
test: fedora40
- name: Alpine 3.20
test: alpine320
- name: Ubuntu 24.04
test: ubuntu2404
groups:
@@ -343,7 +350,7 @@ stages:
- name: Debian Bookworm
test: debian-bookworm/3.11
- name: ArchLinux
test: archlinux/3.12
test: archlinux/3.13
groups:
- 1
- 2

View File

@@ -28,16 +28,6 @@ jobs:
- bash: .azure-pipelines/scripts/report-coverage.sh
displayName: Generate Coverage Report
condition: gt(variables.coverageFileCount, 0)
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
# Azure Pipelines only accepts a single coverage data file.
# That means only Python or PowerShell coverage can be uploaded, but not both.
# Set the "pipelinesCoverage" variable to determine which type is uploaded.
# Use "coverage" for Python and "coverage-powershell" for PowerShell.
summaryFileLocation: "$(outputPath)/reports/$(pipelinesCoverage).xml"
displayName: Publish to Azure Pipelines
condition: gt(variables.coverageFileCount, 0)
- bash: .azure-pipelines/scripts/publish-codecov.py "$(outputPath)"
displayName: Publish to codecov.io
condition: gt(variables.coverageFileCount, 0)

13
.github/BOTMETA.yml vendored
View File

@@ -447,7 +447,7 @@ files:
$modules/bearychat.py:
maintainers: tonyseek
$modules/bigpanda.py:
maintainers: hkariti
ignore: hkariti
$modules/bitbucket_:
maintainers: catcombo
$modules/bootc_manage.py:
@@ -1359,16 +1359,19 @@ files:
keywords: sophos utm
maintainers: $team_e_spirit
$modules/utm_ca_host_key_cert.py:
maintainers: stearz
ignore: stearz
maintainers: $team_e_spirit
$modules/utm_ca_host_key_cert_info.py:
maintainers: stearz
ignore: stearz
maintainers: $team_e_spirit
$modules/utm_network_interface_address.py:
maintainers: steamx
$modules/utm_network_interface_address_info.py:
maintainers: steamx
$modules/utm_proxy_auth_profile.py:
keywords: sophos utm
maintainers: $team_e_spirit stearz
ignore: stearz
maintainers: $team_e_spirit
$modules/utm_proxy_exception.py:
keywords: sophos utm
maintainers: $team_e_spirit RickS-C137
@@ -1556,6 +1559,6 @@ macros:
team_rhsm: cnsnyder ptoscano
team_scaleway: remyleone abarbare
team_solaris: bcoca fishman jasperla jpdasma mator scathatheworm troy2914 xen0l
team_suse: commel evrardjp lrupp toabctl AnderEnder alxgu andytom sealor
team_suse: commel evrardjp lrupp AnderEnder alxgu andytom sealor
team_virt: joshainglis karmab Thulium-Drake Ajpantuso
team_wdc: mikemoerk

View File

@@ -47,6 +47,8 @@ jobs:
coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
pull-request-change-detection: 'true'
testing-type: sanity
pre-test-cmd: >-
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools
units:
# Ansible-test on various stable branches does not yet work well with cgroups v2.
@@ -219,6 +221,8 @@ jobs:
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git ../../community/crypto
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.docker.git ../../community/docker
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools
pull-request-change-detection: 'true'
target: ${{ matrix.target }}

View File

@@ -25,6 +25,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@@ -1,20 +0,0 @@
---
# 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: import-galaxy
'on':
# Run CI against all pushes (direct commits, also merged PRs) to main, and all Pull Requests
push:
branches:
- main
- stable-*
pull_request:
jobs:
import-galaxy:
permissions:
contents: read
name: Test to import built collection artifact with Galaxy importer
uses: ansible-community/github-action-test-galaxy-import/.github/workflows/test-galaxy-import.yml@main

28
.github/workflows/nox.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
---
# 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: nox
'on':
push:
branches:
- main
- stable-*
pull_request:
# Run CI once per day (at 08:00 UTC)
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
nox:
runs-on: ubuntu-latest
name: "Run extra sanity tests"
steps:
- name: Check out collection
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Run nox
uses: ansible-community/antsibull-nox@main

View File

@@ -1,30 +0,0 @@
---
# 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: Verify REUSE
on:
push:
branches: [main]
pull_request_target:
types: [opened, synchronize, reopened]
branches: [main]
# Run CI once per day (at 07:30 UTC)
schedule:
- cron: '30 7 * * *'
jobs:
check:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || '' }}
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v4

View File

@@ -1,5 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: changelogs/fragments/*
Copyright: Ansible Project
License: GPL-3.0-or-later

View File

@@ -2,51 +2,79 @@
**Topics**
- <a href="#v9-5-0">v9\.5\.0</a>
- <a href="#v9-5-7">v9\.5\.7</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="#new-modules">New Modules</a>
- <a href="#v9-4-0">v9\.4\.0</a>
- <a href="#known-issues">Known Issues</a>
- <a href="#v9-5-6">v9\.5\.6</a>
- <a href="#release-summary-1">Release Summary</a>
- <a href="#minor-changes-1">Minor Changes</a>
- <a href="#deprecated-features-1">Deprecated Features</a>
- <a href="#bugfixes-1">Bugfixes</a>
- <a href="#v9-5-5">v9\.5\.5</a>
- <a href="#release-summary-2">Release Summary</a>
- <a href="#bugfixes-2">Bugfixes</a>
- <a href="#v9-5-4">v9\.5\.4</a>
- <a href="#security-fixes">Security Fixes</a>
- <a href="#bugfixes-3">Bugfixes</a>
- <a href="#v9-5-3">v9\.5\.3</a>
- <a href="#release-summary-3">Release Summary</a>
- <a href="#minor-changes-2">Minor Changes</a>
- <a href="#security-fixes-1">Security Fixes</a>
- <a href="#bugfixes-4">Bugfixes</a>
- <a href="#v9-5-2">v9\.5\.2</a>
- <a href="#release-summary-4">Release Summary</a>
- <a href="#minor-changes-3">Minor Changes</a>
- <a href="#bugfixes-5">Bugfixes</a>
- <a href="#v9-5-1">v9\.5\.1</a>
- <a href="#release-summary-5">Release Summary</a>
- <a href="#minor-changes-4">Minor Changes</a>
- <a href="#bugfixes-6">Bugfixes</a>
- <a href="#v9-5-0">v9\.5\.0</a>
- <a href="#release-summary-6">Release Summary</a>
- <a href="#minor-changes-5">Minor Changes</a>
- <a href="#deprecated-features">Deprecated Features</a>
- <a href="#bugfixes-7">Bugfixes</a>
- <a href="#new-modules">New Modules</a>
- <a href="#v9-4-0">v9\.4\.0</a>
- <a href="#release-summary-7">Release Summary</a>
- <a href="#minor-changes-6">Minor Changes</a>
- <a href="#deprecated-features-1">Deprecated Features</a>
- <a href="#bugfixes-8">Bugfixes</a>
- <a href="#new-modules-1">New Modules</a>
- <a href="#v9-3-0">v9\.3\.0</a>
- <a href="#release-summary-2">Release Summary</a>
- <a href="#minor-changes-2">Minor Changes</a>
- <a href="#bugfixes-2">Bugfixes</a>
- <a href="#release-summary-8">Release Summary</a>
- <a href="#minor-changes-7">Minor Changes</a>
- <a href="#bugfixes-9">Bugfixes</a>
- <a href="#new-modules-2">New Modules</a>
- <a href="#v9-2-0">v9\.2\.0</a>
- <a href="#release-summary-3">Release Summary</a>
- <a href="#minor-changes-3">Minor Changes</a>
- <a href="#bugfixes-3">Bugfixes</a>
- <a href="#release-summary-9">Release Summary</a>
- <a href="#minor-changes-8">Minor Changes</a>
- <a href="#bugfixes-10">Bugfixes</a>
- <a href="#new-plugins">New Plugins</a>
- <a href="#filter">Filter</a>
- <a href="#test">Test</a>
- <a href="#v9-1-0">v9\.1\.0</a>
- <a href="#release-summary-4">Release Summary</a>
- <a href="#minor-changes-4">Minor Changes</a>
- <a href="#release-summary-10">Release Summary</a>
- <a href="#minor-changes-9">Minor Changes</a>
- <a href="#deprecated-features-2">Deprecated Features</a>
- <a href="#bugfixes-4">Bugfixes</a>
- <a href="#known-issues">Known Issues</a>
- <a href="#bugfixes-11">Bugfixes</a>
- <a href="#known-issues-1">Known Issues</a>
- <a href="#new-plugins-1">New Plugins</a>
- <a href="#filter-1">Filter</a>
- <a href="#new-modules-3">New Modules</a>
- <a href="#v9-0-1">v9\.0\.1</a>
- <a href="#release-summary-5">Release Summary</a>
- <a href="#minor-changes-5">Minor Changes</a>
- <a href="#bugfixes-5">Bugfixes</a>
- <a href="#release-summary-11">Release Summary</a>
- <a href="#minor-changes-10">Minor Changes</a>
- <a href="#bugfixes-12">Bugfixes</a>
- <a href="#v9-0-0">v9\.0\.0</a>
- <a href="#release-summary-6">Release Summary</a>
- <a href="#minor-changes-6">Minor Changes</a>
- <a href="#release-summary-12">Release Summary</a>
- <a href="#minor-changes-11">Minor Changes</a>
- <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a>
- <a href="#deprecated-features-3">Deprecated Features</a>
- <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a>
- <a href="#security-fixes">Security Fixes</a>
- <a href="#bugfixes-6">Bugfixes</a>
- <a href="#security-fixes-2">Security Fixes</a>
- <a href="#bugfixes-13">Bugfixes</a>
- <a href="#new-plugins-2">New Plugins</a>
- <a href="#become">Become</a>
- <a href="#callback">Callback</a>
@@ -57,10 +85,193 @@
- <a href="#new-modules-4">New Modules</a>
This changelog describes changes after version 8\.0\.0\.
<a id="v9-5-7"></a>
## v9\.5\.7
<a id="release-summary"></a>
### Release Summary
Regular bugfix release\.
<a id="minor-changes"></a>
### Minor Changes
* apache2\_module \- added workaround for new PHP module name\, from <code>php7\_module</code> to <code>php\_module</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9951](https\://github\.com/ansible\-collections/community\.general/pull/9951)\)\.
<a id="bugfixes"></a>
### Bugfixes
* dependent look plugin \- make compatible with ansible\-core\'s Data Tagging feature \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
* diy callback plugin \- make compatible with ansible\-core\'s Data Tagging feature \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
* github\_deploy\_key \- check that key really exists on 422 to avoid masking other errors \([https\://github\.com/ansible\-collections/community\.general/issues/6718](https\://github\.com/ansible\-collections/community\.general/issues/6718)\, [https\://github\.com/ansible\-collections/community\.general/pull/10011](https\://github\.com/ansible\-collections/community\.general/pull/10011)\)\.
* hashids and unicode\_normalize filter plugins \- avoid deprecated <code>AnsibleFilterTypeError</code> on ansible\-core 2\.19 \([https\://github\.com/ansible\-collections/community\.general/pull/9992](https\://github\.com/ansible\-collections/community\.general/pull/9992)\)\.
* keycloak\_authentication \- fix authentification config duplication for Keycloak \< 26\.2\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9987](https\://github\.com/ansible\-collections/community\.general/pull/9987)\)\.
* keycloak\_client \- fix the idempotency regression by normalizing the Keycloak response for <code>after\_client</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9905](https\://github\.com/ansible\-collections/community\.general/issues/9905)\, [https\://github\.com/ansible\-collections/community\.general/pull/9976](https\://github\.com/ansible\-collections/community\.general/pull/9976)\)\.
* proxmox inventory plugin \- fix <code>ansible\_host</code> staying empty for certain Proxmox nodes \([https\://github\.com/ansible\-collections/community\.general/issues/5906](https\://github\.com/ansible\-collections/community\.general/issues/5906)\, [https\://github\.com/ansible\-collections/community\.general/pull/9952](https\://github\.com/ansible\-collections/community\.general/pull/9952)\)\.
* proxmox\_disk \- fail gracefully if <code>storage</code> is required but not provided by the user \([https\://github\.com/ansible\-collections/community\.general/issues/9941](https\://github\.com/ansible\-collections/community\.general/issues/9941)\, [https\://github\.com/ansible\-collections/community\.general/pull/9963](https\://github\.com/ansible\-collections/community\.general/pull/9963)\)\.
* reveal\_ansible\_type filter plugin and ansible\_type test plugin \- make compatible with ansible\-core\'s Data Tagging feature \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
* sysrc \- no longer always reporting <code>changed\=true</code> when <code>state\=absent</code>\. This fixes the method <code>exists\(\)</code> \([https\://github\.com/ansible\-collections/community\.general/issues/10004](https\://github\.com/ansible\-collections/community\.general/issues/10004)\, [https\://github\.com/ansible\-collections/community\.general/pull/10005](https\://github\.com/ansible\-collections/community\.general/pull/10005)\)\.
* yaml callback plugin \- use ansible\-core internals to avoid breakage with Data Tagging \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
<a id="known-issues"></a>
### Known Issues
* reveal\_ansible\_type filter plugin and ansible\_type test plugin \- note that ansible\-core\'s Data Tagging feature implements new aliases\, such as <code>\_AnsibleTaggedStr</code> for <code>str</code>\, <code>\_AnsibleTaggedInt</code> for <code>int</code>\, and <code>\_AnsibleTaggedFloat</code> for <code>float</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
<a id="v9-5-6"></a>
## v9\.5\.6
<a id="release-summary-1"></a>
### Release Summary
Regular bugfix release\.
<a id="minor-changes-1"></a>
### Minor Changes
* consul\_token \- fix idempotency when <code>policies</code> or <code>roles</code> are supplied by name \([https\://github\.com/ansible\-collections/community\.general/issues/9841](https\://github\.com/ansible\-collections/community\.general/issues/9841)\, [https\://github\.com/ansible\-collections/community\.general/pull/9845](https\://github\.com/ansible\-collections/community\.general/pull/9845)\)\.
<a id="bugfixes-1"></a>
### Bugfixes
* cloudlare\_dns \- handle exhausted response stream in case of HTTP errors to show nice error message to the user \([https\://github\.com/ansible\-collections/community\.general/issues/9782](https\://github\.com/ansible\-collections/community\.general/issues/9782)\, [https\://github\.com/ansible\-collections/community\.general/pull/9818](https\://github\.com/ansible\-collections/community\.general/pull/9818)\)\.
* dnf\_versionlock \- add support for dnf5 \([https\://github\.com/ansible\-collections/community\.general/issues/9556](https\://github\.com/ansible\-collections/community\.general/issues/9556)\)\.
* homebrew\_cask \- handle unusual brew version strings \([https\://github\.com/ansible\-collections/community\.general/issues/8432](https\://github\.com/ansible\-collections/community\.general/issues/8432)\, [https\://github\.com/ansible\-collections/community\.general/pull/9881](https\://github\.com/ansible\-collections/community\.general/pull/9881)\)\.
* ipa\_host \- module revoked existing host certificates even if <code>user\_certificate</code> was not given \([https\://github\.com/ansible\-collections/community\.general/pull/9694](https\://github\.com/ansible\-collections/community\.general/pull/9694)\)\.
* nmcli \- enable changing only the order of DNS servers or search suffixes \([https\://github\.com/ansible\-collections/community\.general/issues/8724](https\://github\.com/ansible\-collections/community\.general/issues/8724)\, [https\://github\.com/ansible\-collections/community\.general/pull/9880](https\://github\.com/ansible\-collections/community\.general/pull/9880)\)\.
* proxmox\_vm\_info \- the module no longer expects that the key <code>template</code> exists in a dictionary returned by Proxmox \([https\://github\.com/ansible\-collections/community\.general/issues/9875](https\://github\.com/ansible\-collections/community\.general/issues/9875)\, [https\://github\.com/ansible\-collections/community\.general/pull/9910](https\://github\.com/ansible\-collections/community\.general/pull/9910)\)\.
* sudoers \- display stdout and stderr raised while failed validation \([https\://github\.com/ansible\-collections/community\.general/issues/9674](https\://github\.com/ansible\-collections/community\.general/issues/9674)\, [https\://github\.com/ansible\-collections/community\.general/pull/9871](https\://github\.com/ansible\-collections/community\.general/pull/9871)\)\.
<a id="v9-5-5"></a>
## v9\.5\.5
<a id="release-summary-2"></a>
### Release Summary
Regular bugfix release\.
<a id="bugfixes-2"></a>
### Bugfixes
* apache2\_mod\_proxy \- make compatible with Python 3 \([https\://github\.com/ansible\-collections/community\.general/pull/9762](https\://github\.com/ansible\-collections/community\.general/pull/9762)\)\.
* apache2\_mod\_proxy \- passing the cluster\'s page as referer for the member\'s pages\. This makes the module actually work again for halfway modern Apache versions\. According to some comments founds on the net the referer was required since at least 2019 for some versions of Apache 2 \([https\://github\.com/ansible\-collections/community\.general/pull/9762](https\://github\.com/ansible\-collections/community\.general/pull/9762)\)\.
* cloudflare\_dns \- fix crash when deleting a DNS record or when updating a record with <code>solo\=true</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9652](https\://github\.com/ansible\-collections/community\.general/issues/9652)\, [https\://github\.com/ansible\-collections/community\.general/pull/9649](https\://github\.com/ansible\-collections/community\.general/pull/9649)\)\.
* elasticsearch\_plugin \- fix <code>ERROR\: D is not a recognized option</code> issue when configuring proxy settings \([https\://github\.com/ansible\-collections/community\.general/pull/9774](https\://github\.com/ansible\-collections/community\.general/pull/9774)\, [https\://github\.com/ansible\-collections/community\.general/issues/9773](https\://github\.com/ansible\-collections/community\.general/issues/9773)\)\.
* keycloak\_client \- fix and improve existing tests\. The module showed a diff without actual changes\, solved by improving the <code>normalise\_cr\(\)</code> function \([https\://github\.com/ansible\-collections/community\.general/pull/9644](https\://github\.com/ansible\-collections/community\.general/pull/9644)\)\.
* keycloak\_client \- in check mode\, detect whether the lists in before client \(for example redirect URI list\) contain items that the lists in the desired client do not contain \([https\://github\.com/ansible\-collections/community\.general/pull/9739](https\://github\.com/ansible\-collections/community\.general/pull/9739)\)\.
* passwordstore lookup plugin \- fix subkey creation even when <code>create\=false</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9105](https\://github\.com/ansible\-collections/community\.general/issues/9105)\, [https\://github\.com/ansible\-collections/community\.general/pull/9106](https\://github\.com/ansible\-collections/community\.general/pull/9106)\)\.
* proxmox inventory plugin \- plugin did not update cache correctly after <code>meta\: refresh\_inventory</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9710](https\://github\.com/ansible\-collections/community\.general/issues/9710)\, [https\://github\.com/ansible\-collections/community\.general/pull/9760](https\://github\.com/ansible\-collections/community\.general/pull/9760)\)\.
* redhat\_subscription \- use the \"enable\_content\" option \(when available\) when
registering using D\-Bus\, to ensure that subscription\-manager enables the
content on registration\; this is particular important on EL 10\+ and Fedora
41\+
\([https\://github\.com/ansible\-collections/community\.general/pull/9778](https\://github\.com/ansible\-collections/community\.general/pull/9778)\)\.
* xml \- ensure file descriptor is closed \([https\://github\.com/ansible\-collections/community\.general/pull/9695](https\://github\.com/ansible\-collections/community\.general/pull/9695)\)\.
<a id="v9-5-4"></a>
## v9\.5\.4
<a id="security-fixes"></a>
### Security Fixes
* keycloak\_client \- Sanitize <code>saml\.encryption\.private\.key</code> so it does not show in the logs \([https\://github\.com/ansible\-collections/community\.general/pull/9621](https\://github\.com/ansible\-collections/community\.general/pull/9621)\)\.
<a id="bugfixes-3"></a>
### Bugfixes
* redhat\_subscription \- do not try to unsubscribe \(i\.e\. remove subscriptions\)
when unregistering a system\: newer versions of subscription\-manager\, as
available in EL 10 and Fedora 41\+\, do not support entitlements anymore\, and
thus unsubscribing will fail
\([https\://github\.com/ansible\-collections/community\.general/pull/9578](https\://github\.com/ansible\-collections/community\.general/pull/9578)\)\.
<a id="v9-5-3"></a>
## v9\.5\.3
<a id="release-summary-3"></a>
### Release Summary
Regular bugfix release\.
<a id="minor-changes-2"></a>
### Minor Changes
* proxmox module utils \- add method <code>api\_task\_complete</code> that can wait for task completion and return error message \([https\://github\.com/ansible\-collections/community\.general/pull/9256](https\://github\.com/ansible\-collections/community\.general/pull/9256)\)\.
<a id="security-fixes-1"></a>
### Security Fixes
* keycloak\_authentication \- API calls did not properly set the <code>priority</code> during update resulting in incorrectly sorted authentication flows\. This apparently only affects Keycloak 25 or newer \([https\://github\.com/ansible\-collections/community\.general/pull/9263](https\://github\.com/ansible\-collections/community\.general/pull/9263)\)\.
<a id="bugfixes-4"></a>
### Bugfixes
* dig lookup plugin \- correctly handle <code>NoNameserver</code> exception \([https\://github\.com/ansible\-collections/community\.general/pull/9363](https\://github\.com/ansible\-collections/community\.general/pull/9363)\, [https\://github\.com/ansible\-collections/community\.general/issues/9362](https\://github\.com/ansible\-collections/community\.general/issues/9362)\)\.
* htpasswd \- report changes when file permissions are adjusted \([https\://github\.com/ansible\-collections/community\.general/issues/9485](https\://github\.com/ansible\-collections/community\.general/issues/9485)\, [https\://github\.com/ansible\-collections/community\.general/pull/9490](https\://github\.com/ansible\-collections/community\.general/pull/9490)\)\.
* proxmox\_disk \- fix async method and make <code>resize\_disk</code> method handle errors correctly \([https\://github\.com/ansible\-collections/community\.general/pull/9256](https\://github\.com/ansible\-collections/community\.general/pull/9256)\)\.
* proxmox\_template \- fix the wrong path called on <code>proxmox\_template\.task\_status</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9276](https\://github\.com/ansible\-collections/community\.general/issues/9276)\, [https\://github\.com/ansible\-collections/community\.general/pull/9277](https\://github\.com/ansible\-collections/community\.general/pull/9277)\)\.
* qubes connection plugin \- fix the printing of debug information \([https\://github\.com/ansible\-collections/community\.general/pull/9334](https\://github\.com/ansible\-collections/community\.general/pull/9334)\)\.
* redfish\_utils module utils \- Fix <code>VerifyBiosAttributes</code> command on multi system resource nodes \([https\://github\.com/ansible\-collections/community\.general/pull/9234](https\://github\.com/ansible\-collections/community\.general/pull/9234)\)\.
<a id="v9-5-2"></a>
## v9\.5\.2
<a id="release-summary-4"></a>
### Release Summary
Regular bugfix release\.
<a id="minor-changes-3"></a>
### Minor Changes
* proxmox inventory plugin \- fix urllib3 <code>InsecureRequestWarnings</code> not being suppressed when a token is used \([https\://github\.com/ansible\-collections/community\.general/pull/9099](https\://github\.com/ansible\-collections/community\.general/pull/9099)\)\.
<a id="bugfixes-5"></a>
### Bugfixes
* dnf\_config\_manager \- fix hanging when prompting to import GPG keys \([https\://github\.com/ansible\-collections/community\.general/pull/9124](https\://github\.com/ansible\-collections/community\.general/pull/9124)\, [https\://github\.com/ansible\-collections/community\.general/issues/8830](https\://github\.com/ansible\-collections/community\.general/issues/8830)\)\.
* dnf\_config\_manager \- forces locale to <code>C</code> before module starts\. If the locale was set to non\-English\, the output of the <code>dnf config\-manager</code> could not be parsed \([https\://github\.com/ansible\-collections/community\.general/pull/9157](https\://github\.com/ansible\-collections/community\.general/pull/9157)\, [https\://github\.com/ansible\-collections/community\.general/issues/9046](https\://github\.com/ansible\-collections/community\.general/issues/9046)\)\.
* flatpak \- force the locale language to <code>C</code> when running the flatpak command \([https\://github\.com/ansible\-collections/community\.general/pull/9187](https\://github\.com/ansible\-collections/community\.general/pull/9187)\, [https\://github\.com/ansible\-collections/community\.general/issues/8883](https\://github\.com/ansible\-collections/community\.general/issues/8883)\)\.
* github\_key \- in check mode\, a faulty call to <code>\`datetime\.strftime\(\.\.\.\)\`</code> was being made which generated an exception \([https\://github\.com/ansible\-collections/community\.general/issues/9185](https\://github\.com/ansible\-collections/community\.general/issues/9185)\)\.
* homebrew\_cask \- allow <code>\+</code> symbol in Homebrew cask name validation regex \([https\://github\.com/ansible\-collections/community\.general/pull/9128](https\://github\.com/ansible\-collections/community\.general/pull/9128)\)\.
* keycloak\_client \- fix diff by removing code that turns the attributes dict which contains additional settings into a list \([https\://github\.com/ansible\-collections/community\.general/pull/9077](https\://github\.com/ansible\-collections/community\.general/pull/9077)\)\.
* keycloak\_clientscope \- fix diff and <code>end\_state</code> by removing the code that turns the attributes dict\, which contains additional config items\, into a list \([https\://github\.com/ansible\-collections/community\.general/pull/9082](https\://github\.com/ansible\-collections/community\.general/pull/9082)\)\.
* keycloak\_clientscope\_type \- sort the default and optional clientscope lists to improve the diff \([https\://github\.com/ansible\-collections/community\.general/pull/9202](https\://github\.com/ansible\-collections/community\.general/pull/9202)\)\.
* redfish\_utils module utils \- remove undocumented default applytime \([https\://github\.com/ansible\-collections/community\.general/pull/9114](https\://github\.com/ansible\-collections/community\.general/pull/9114)\)\.
* slack \- fail if Slack API response is not OK with error message \([https\://github\.com/ansible\-collections/community\.general/pull/9198](https\://github\.com/ansible\-collections/community\.general/pull/9198)\)\.
<a id="v9-5-1"></a>
## v9\.5\.1
<a id="release-summary-5"></a>
### Release Summary
Regular bugfix release\.
<a id="minor-changes-4"></a>
### Minor Changes
* redfish\_utils module utils \- schedule a BIOS configuration job at next reboot when the BIOS config is changed \([https\://github\.com/ansible\-collections/community\.general/pull/9012](https\://github\.com/ansible\-collections/community\.general/pull/9012)\)\.
<a id="bugfixes-6"></a>
### Bugfixes
* bitwarden lookup plugin \- support BWS v0\.3\.0 syntax breaking change \([https\://github\.com/ansible\-collections/community\.general/pull/9028](https\://github\.com/ansible\-collections/community\.general/pull/9028)\)\.
* collection\_version lookup plugin \- use <code>importlib</code> directly instead of the deprecated and in ansible\-core 2\.19 removed <code>ansible\.module\_utils\.compat\.importlib</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9084](https\://github\.com/ansible\-collections/community\.general/pull/9084)\)\.
* gitlab\_label \- update label\'s color \([https\://github\.com/ansible\-collections/community\.general/pull/9010](https\://github\.com/ansible\-collections/community\.general/pull/9010)\)\.
* keycloak\_clientscope\_type \- fix detect changes in check mode \([https\://github\.com/ansible\-collections/community\.general/issues/9092](https\://github\.com/ansible\-collections/community\.general/issues/9092)\, [https\://github\.com/ansible\-collections/community\.general/pull/9093](https\://github\.com/ansible\-collections/community\.general/pull/9093)\)\.
* keycloak\_group \- fix crash caused in subgroup creation\. The crash was caused by a missing or empty <code>subGroups</code> property in Keycloak ≥23 \([https\://github\.com/ansible\-collections/community\.general/issues/8788](https\://github\.com/ansible\-collections/community\.general/issues/8788)\, [https\://github\.com/ansible\-collections/community\.general/pull/8979](https\://github\.com/ansible\-collections/community\.general/pull/8979)\)\.
* modprobe \- fix check mode not being honored for <code>persistent</code> option \([https\://github\.com/ansible\-collections/community\.general/issues/9051](https\://github\.com/ansible\-collections/community\.general/issues/9051)\, [https\://github\.com/ansible\-collections/community\.general/pull/9052](https\://github\.com/ansible\-collections/community\.general/pull/9052)\)\.
* one\_host \- fix if statements for cases when <code>ID\=0</code> \([https\://github\.com/ansible\-collections/community\.general/issues/1199](https\://github\.com/ansible\-collections/community\.general/issues/1199)\, [https\://github\.com/ansible\-collections/community\.general/pull/8907](https\://github\.com/ansible\-collections/community\.general/pull/8907)\)\.
* one\_image \- fix module failing due to a class method typo \([https\://github\.com/ansible\-collections/community\.general/pull/9056](https\://github\.com/ansible\-collections/community\.general/pull/9056)\)\.
* one\_image\_info \- fix module failing due to a class method typo \([https\://github\.com/ansible\-collections/community\.general/pull/9056](https\://github\.com/ansible\-collections/community\.general/pull/9056)\)\.
* one\_vnet \- fix module failing due to a variable typo \([https\://github\.com/ansible\-collections/community\.general/pull/9019](https\://github\.com/ansible\-collections/community\.general/pull/9019)\)\.
* redfish\_utils module utils \- fix issue with URI parsing to gracefully handling trailing slashes when extracting member identifiers \([https\://github\.com/ansible\-collections/community\.general/issues/9047](https\://github\.com/ansible\-collections/community\.general/issues/9047)\, [https\://github\.com/ansible\-collections/community\.general/pull/9057](https\://github\.com/ansible\-collections/community\.general/pull/9057)\)\.
<a id="v9-5-0"></a>
## v9\.5\.0
<a id="release-summary"></a>
<a id="release-summary-6"></a>
### Release Summary
Regular bugfix and feature release\.
@@ -68,7 +279,7 @@ Regular bugfix and feature release\.
Please note that this is the last feature release for community\.general 9\.x\.y\.
From now on\, new features will only go into community\.general 10\.x\.y\.
<a id="minor-changes"></a>
<a id="minor-changes-5"></a>
### Minor Changes
* dig lookup plugin \- add <code>port</code> option to specify DNS server port \([https\://github\.com/ansible\-collections/community\.general/pull/8966](https\://github\.com/ansible\-collections/community\.general/pull/8966)\)\.
@@ -125,7 +336,7 @@ From now on\, new features will only go into community\.general 10\.x\.y\.
* hipchat \- the hipchat service has been discontinued and the self\-hosted variant has been End of Life since 2020\. The module is therefore deprecated and will be removed from community\.general 11\.0\.0 if nobody provides compelling reasons to still keep it \([https\://github\.com/ansible\-collections/community\.general/pull/8919](https\://github\.com/ansible\-collections/community\.general/pull/8919)\)\.
<a id="bugfixes"></a>
<a id="bugfixes-7"></a>
### Bugfixes
* cloudflare\_dns \- fix changing Cloudflare SRV records \([https\://github\.com/ansible\-collections/community\.general/issues/8679](https\://github\.com/ansible\-collections/community\.general/issues/8679)\, [https\://github\.com/ansible\-collections/community\.general/pull/8948](https\://github\.com/ansible\-collections/community\.general/pull/8948)\)\.
@@ -159,12 +370,12 @@ From now on\, new features will only go into community\.general 10\.x\.y\.
<a id="v9-4-0"></a>
## v9\.4\.0
<a id="release-summary-1"></a>
<a id="release-summary-7"></a>
### Release Summary
Bugfix and feature release\.
<a id="minor-changes-1"></a>
<a id="minor-changes-6"></a>
### Minor Changes
* MH module utils \- add parameter <code>when</code> to <code>cause\_changes</code> decorator \([https\://github\.com/ansible\-collections/community\.general/pull/8766](https\://github\.com/ansible\-collections/community\.general/pull/8766)\)\.
@@ -251,7 +462,7 @@ Bugfix and feature release\.
* pipx \- support for versions of the command line tool <code>pipx</code> older than <code>1\.7\.0</code> is deprecated and will be removed in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/8793](https\://github\.com/ansible\-collections/community\.general/pull/8793)\)\.
* pipx\_info \- support for versions of the command line tool <code>pipx</code> older than <code>1\.7\.0</code> is deprecated and will be removed in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/8793](https\://github\.com/ansible\-collections/community\.general/pull/8793)\)\.
<a id="bugfixes-1"></a>
<a id="bugfixes-8"></a>
### Bugfixes
* gitlab\_group\_access\_token \- fix crash in check mode caused by attempted access to a newly created access token \([https\://github\.com/ansible\-collections/community\.general/pull/8796](https\://github\.com/ansible\-collections/community\.general/pull/8796)\)\.
@@ -273,12 +484,12 @@ Bugfix and feature release\.
<a id="v9-3-0"></a>
## v9\.3\.0
<a id="release-summary-2"></a>
<a id="release-summary-8"></a>
### Release Summary
Regular bugfix and feature release\.
<a id="minor-changes-2"></a>
<a id="minor-changes-7"></a>
### Minor Changes
* cgroup\_memory\_recap\, hipchat\, jabber\, log\_plays\, loganalytics\, logentries\, logstash\, slack\, splunk\, sumologic\, syslog\_json callback plugins \- make sure that all options are typed \([https\://github\.com/ansible\-collections/community\.general/pull/8628](https\://github\.com/ansible\-collections/community\.general/pull/8628)\)\.
@@ -301,7 +512,7 @@ Regular bugfix and feature release\.
* proxmox inventory plugin \- add new fact for LXC interface details \([https\://github\.com/ansible\-collections/community\.general/pull/8713](https\://github\.com/ansible\-collections/community\.general/pull/8713)\)\.
* redis\, redis\_info \- add <code>client\_cert</code> and <code>client\_key</code> options to specify path to certificate for Redis authentication \([https\://github\.com/ansible\-collections/community\.general/pull/8654](https\://github\.com/ansible\-collections/community\.general/pull/8654)\)\.
<a id="bugfixes-2"></a>
<a id="bugfixes-9"></a>
### Bugfixes
* gitlab\_runner \- fix <code>paused</code> parameter being ignored \([https\://github\.com/ansible\-collections/community\.general/pull/8648](https\://github\.com/ansible\-collections/community\.general/pull/8648)\)\.
@@ -322,12 +533,12 @@ Regular bugfix and feature release\.
<a id="v9-2-0"></a>
## v9\.2\.0
<a id="release-summary-3"></a>
<a id="release-summary-9"></a>
### Release Summary
Regular bugfix and feature release\.
<a id="minor-changes-3"></a>
<a id="minor-changes-8"></a>
### Minor Changes
* CmdRunner module utils \- the parameter <code>force\_lang</code> now supports the special value <code>auto</code> which will automatically try and determine the best parsable locale in the system \([https\://github\.com/ansible\-collections/community\.general/pull/8517](https\://github\.com/ansible\-collections/community\.general/pull/8517)\)\.
@@ -339,7 +550,7 @@ Regular bugfix and feature release\.
* virtualbox inventory plugin \- expose a new parameter <code>enable\_advanced\_group\_parsing</code> to change how the VirtualBox dynamic inventory parses VM groups \([https\://github\.com/ansible\-collections/community\.general/issues/8508](https\://github\.com/ansible\-collections/community\.general/issues/8508)\, [https\://github\.com/ansible\-collections/community\.general/pull/8510](https\://github\.com/ansible\-collections/community\.general/pull/8510)\)\.
* wdc\_redfish\_command \- minor change to handle upgrade file for Redfish WD platforms \([https\://github\.com/ansible\-collections/community\.general/pull/8444](https\://github\.com/ansible\-collections/community\.general/pull/8444)\)\.
<a id="bugfixes-3"></a>
<a id="bugfixes-10"></a>
### Bugfixes
* bitwarden lookup plugin \- fix <code>KeyError</code> in <code>search\_field</code> \([https\://github\.com/ansible\-collections/community\.general/issues/8549](https\://github\.com/ansible\-collections/community\.general/issues/8549)\, [https\://github\.com/ansible\-collections/community\.general/pull/8557](https\://github\.com/ansible\-collections/community\.general/pull/8557)\)\.
@@ -364,12 +575,12 @@ Regular bugfix and feature release\.
<a id="v9-1-0"></a>
## v9\.1\.0
<a id="release-summary-4"></a>
<a id="release-summary-10"></a>
### Release Summary
Regular feature and bugfix release\.
<a id="minor-changes-4"></a>
<a id="minor-changes-9"></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)\)\.
@@ -393,7 +604,7 @@ Regular feature and bugfix release\.
* 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-4"></a>
<a id="bugfixes-11"></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)\)\.
@@ -404,7 +615,7 @@ Regular feature and bugfix release\.
* 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>
<a id="known-issues-1"></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)\)\.
@@ -431,17 +642,17 @@ Regular feature and bugfix release\.
<a id="v9-0-1"></a>
## v9\.0\.1
<a id="release-summary-5"></a>
<a id="release-summary-11"></a>
### Release Summary
Bugfix release for inclusion in Ansible 10\.0\.0rc1\.
<a id="minor-changes-5"></a>
<a id="minor-changes-10"></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-5"></a>
<a id="bugfixes-12"></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)\)\.
@@ -460,12 +671,12 @@ Bugfix release for inclusion in Ansible 10\.0\.0rc1\.
<a id="v9-0-0"></a>
## v9\.0\.0
<a id="release-summary-6"></a>
<a id="release-summary-12"></a>
### Release Summary
This is release 9\.0\.0 of <code>community\.general</code>\, released on 2024\-05\-20\.
<a id="minor-changes-6"></a>
<a id="minor-changes-11"></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)\)\.
@@ -629,13 +840,13 @@ This is release 9\.0\.0 of <code>community\.general</code>\, released on 2024\-0
* stackdriver \- this module relied on HTTPS APIs that do not exist anymore and was thus removed \([https\://github\.com/ansible\-collections/community\.general/pull/8198](https\://github\.com/ansible\-collections/community\.general/pull/8198)\)\.
* webfaction\_\* modules \- these modules relied on HTTPS APIs that do not exist anymore and were thus removed \([https\://github\.com/ansible\-collections/community\.general/pull/8198](https\://github\.com/ansible\-collections/community\.general/pull/8198)\)\.
<a id="security-fixes"></a>
<a id="security-fixes-2"></a>
### Security Fixes
* 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-6"></a>
<a id="bugfixes-13"></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)\)\.

View File

@@ -6,6 +6,189 @@ Community General Release Notes
This changelog describes changes after version 8.0.0.
v9.5.7
======
Release Summary
---------------
Regular bugfix release.
Minor Changes
-------------
- apache2_module - added workaround for new PHP module name, from ``php7_module`` to ``php_module`` (https://github.com/ansible-collections/community.general/pull/9951).
Bugfixes
--------
- dependent look plugin - make compatible with ansible-core's Data Tagging feature (https://github.com/ansible-collections/community.general/pull/9833).
- diy callback plugin - make compatible with ansible-core's Data Tagging feature (https://github.com/ansible-collections/community.general/pull/9833).
- github_deploy_key - check that key really exists on 422 to avoid masking other errors (https://github.com/ansible-collections/community.general/issues/6718, https://github.com/ansible-collections/community.general/pull/10011).
- hashids and unicode_normalize filter plugins - avoid deprecated ``AnsibleFilterTypeError`` on ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/9992).
- keycloak_authentication - fix authentification config duplication for Keycloak < 26.2.0 (https://github.com/ansible-collections/community.general/pull/9987).
- keycloak_client - fix the idempotency regression by normalizing the Keycloak response for ``after_client`` (https://github.com/ansible-collections/community.general/issues/9905, https://github.com/ansible-collections/community.general/pull/9976).
- proxmox inventory plugin - fix ``ansible_host`` staying empty for certain Proxmox nodes (https://github.com/ansible-collections/community.general/issues/5906, https://github.com/ansible-collections/community.general/pull/9952).
- proxmox_disk - fail gracefully if ``storage`` is required but not provided by the user (https://github.com/ansible-collections/community.general/issues/9941, https://github.com/ansible-collections/community.general/pull/9963).
- reveal_ansible_type filter plugin and ansible_type test plugin - make compatible with ansible-core's Data Tagging feature (https://github.com/ansible-collections/community.general/pull/9833).
- sysrc - no longer always reporting ``changed=true`` when ``state=absent``. This fixes the method ``exists()`` (https://github.com/ansible-collections/community.general/issues/10004, https://github.com/ansible-collections/community.general/pull/10005).
- yaml callback plugin - use ansible-core internals to avoid breakage with Data Tagging (https://github.com/ansible-collections/community.general/pull/9833).
Known Issues
------------
- reveal_ansible_type filter plugin and ansible_type test plugin - note that ansible-core's Data Tagging feature implements new aliases, such as ``_AnsibleTaggedStr`` for ``str``, ``_AnsibleTaggedInt`` for ``int``, and ``_AnsibleTaggedFloat`` for ``float`` (https://github.com/ansible-collections/community.general/pull/9833).
v9.5.6
======
Release Summary
---------------
Regular bugfix release.
Minor Changes
-------------
- consul_token - fix idempotency when ``policies`` or ``roles`` are supplied by name (https://github.com/ansible-collections/community.general/issues/9841, https://github.com/ansible-collections/community.general/pull/9845).
Bugfixes
--------
- cloudlare_dns - handle exhausted response stream in case of HTTP errors to show nice error message to the user (https://github.com/ansible-collections/community.general/issues/9782, https://github.com/ansible-collections/community.general/pull/9818).
- dnf_versionlock - add support for dnf5 (https://github.com/ansible-collections/community.general/issues/9556).
- homebrew_cask - handle unusual brew version strings (https://github.com/ansible-collections/community.general/issues/8432, https://github.com/ansible-collections/community.general/pull/9881).
- ipa_host - module revoked existing host certificates even if ``user_certificate`` was not given (https://github.com/ansible-collections/community.general/pull/9694).
- nmcli - enable changing only the order of DNS servers or search suffixes (https://github.com/ansible-collections/community.general/issues/8724, https://github.com/ansible-collections/community.general/pull/9880).
- proxmox_vm_info - the module no longer expects that the key ``template`` exists in a dictionary returned by Proxmox (https://github.com/ansible-collections/community.general/issues/9875, https://github.com/ansible-collections/community.general/pull/9910).
- sudoers - display stdout and stderr raised while failed validation (https://github.com/ansible-collections/community.general/issues/9674, https://github.com/ansible-collections/community.general/pull/9871).
v9.5.5
======
Release Summary
---------------
Regular bugfix release.
Bugfixes
--------
- apache2_mod_proxy - make compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/9762).
- apache2_mod_proxy - passing the cluster's page as referer for the member's pages. This makes the module actually work again for halfway modern Apache versions. According to some comments founds on the net the referer was required since at least 2019 for some versions of Apache 2 (https://github.com/ansible-collections/community.general/pull/9762).
- cloudflare_dns - fix crash when deleting a DNS record or when updating a record with ``solo=true`` (https://github.com/ansible-collections/community.general/issues/9652, https://github.com/ansible-collections/community.general/pull/9649).
- elasticsearch_plugin - fix ``ERROR: D is not a recognized option`` issue when configuring proxy settings (https://github.com/ansible-collections/community.general/pull/9774, https://github.com/ansible-collections/community.general/issues/9773).
- keycloak_client - fix and improve existing tests. The module showed a diff without actual changes, solved by improving the ``normalise_cr()`` function (https://github.com/ansible-collections/community.general/pull/9644).
- keycloak_client - in check mode, detect whether the lists in before client (for example redirect URI list) contain items that the lists in the desired client do not contain (https://github.com/ansible-collections/community.general/pull/9739).
- passwordstore lookup plugin - fix subkey creation even when ``create=false`` (https://github.com/ansible-collections/community.general/issues/9105, https://github.com/ansible-collections/community.general/pull/9106).
- proxmox inventory plugin - plugin did not update cache correctly after ``meta: refresh_inventory`` (https://github.com/ansible-collections/community.general/issues/9710, https://github.com/ansible-collections/community.general/pull/9760).
- redhat_subscription - use the "enable_content" option (when available) when
registering using D-Bus, to ensure that subscription-manager enables the
content on registration; this is particular important on EL 10+ and Fedora
41+
(https://github.com/ansible-collections/community.general/pull/9778).
- xml - ensure file descriptor is closed (https://github.com/ansible-collections/community.general/pull/9695).
v9.5.4
======
Security Fixes
--------------
- keycloak_client - Sanitize ``saml.encryption.private.key`` so it does not show in the logs (https://github.com/ansible-collections/community.general/pull/9621).
Bugfixes
--------
- redhat_subscription - do not try to unsubscribe (i.e. remove subscriptions)
when unregistering a system: newer versions of subscription-manager, as
available in EL 10 and Fedora 41+, do not support entitlements anymore, and
thus unsubscribing will fail
(https://github.com/ansible-collections/community.general/pull/9578).
v9.5.3
======
Release Summary
---------------
Regular bugfix release.
Minor Changes
-------------
- proxmox module utils - add method ``api_task_complete`` that can wait for task completion and return error message (https://github.com/ansible-collections/community.general/pull/9256).
Security Fixes
--------------
- keycloak_authentication - API calls did not properly set the ``priority`` during update resulting in incorrectly sorted authentication flows. This apparently only affects Keycloak 25 or newer (https://github.com/ansible-collections/community.general/pull/9263).
Bugfixes
--------
- dig lookup plugin - correctly handle ``NoNameserver`` exception (https://github.com/ansible-collections/community.general/pull/9363, https://github.com/ansible-collections/community.general/issues/9362).
- htpasswd - report changes when file permissions are adjusted (https://github.com/ansible-collections/community.general/issues/9485, https://github.com/ansible-collections/community.general/pull/9490).
- proxmox_disk - fix async method and make ``resize_disk`` method handle errors correctly (https://github.com/ansible-collections/community.general/pull/9256).
- proxmox_template - fix the wrong path called on ``proxmox_template.task_status`` (https://github.com/ansible-collections/community.general/issues/9276, https://github.com/ansible-collections/community.general/pull/9277).
- qubes connection plugin - fix the printing of debug information (https://github.com/ansible-collections/community.general/pull/9334).
- redfish_utils module utils - Fix ``VerifyBiosAttributes`` command on multi system resource nodes (https://github.com/ansible-collections/community.general/pull/9234).
v9.5.2
======
Release Summary
---------------
Regular bugfix release.
Minor Changes
-------------
- proxmox inventory plugin - fix urllib3 ``InsecureRequestWarnings`` not being suppressed when a token is used (https://github.com/ansible-collections/community.general/pull/9099).
Bugfixes
--------
- dnf_config_manager - fix hanging when prompting to import GPG keys (https://github.com/ansible-collections/community.general/pull/9124, https://github.com/ansible-collections/community.general/issues/8830).
- dnf_config_manager - forces locale to ``C`` before module starts. If the locale was set to non-English, the output of the ``dnf config-manager`` could not be parsed (https://github.com/ansible-collections/community.general/pull/9157, https://github.com/ansible-collections/community.general/issues/9046).
- flatpak - force the locale language to ``C`` when running the flatpak command (https://github.com/ansible-collections/community.general/pull/9187, https://github.com/ansible-collections/community.general/issues/8883).
- github_key - in check mode, a faulty call to ```datetime.strftime(...)``` was being made which generated an exception (https://github.com/ansible-collections/community.general/issues/9185).
- homebrew_cask - allow ``+`` symbol in Homebrew cask name validation regex (https://github.com/ansible-collections/community.general/pull/9128).
- keycloak_client - fix diff by removing code that turns the attributes dict which contains additional settings into a list (https://github.com/ansible-collections/community.general/pull/9077).
- keycloak_clientscope - fix diff and ``end_state`` by removing the code that turns the attributes dict, which contains additional config items, into a list (https://github.com/ansible-collections/community.general/pull/9082).
- keycloak_clientscope_type - sort the default and optional clientscope lists to improve the diff (https://github.com/ansible-collections/community.general/pull/9202).
- redfish_utils module utils - remove undocumented default applytime (https://github.com/ansible-collections/community.general/pull/9114).
- slack - fail if Slack API response is not OK with error message (https://github.com/ansible-collections/community.general/pull/9198).
v9.5.1
======
Release Summary
---------------
Regular bugfix release.
Minor Changes
-------------
- redfish_utils module utils - schedule a BIOS configuration job at next reboot when the BIOS config is changed (https://github.com/ansible-collections/community.general/pull/9012).
Bugfixes
--------
- bitwarden lookup plugin - support BWS v0.3.0 syntax breaking change (https://github.com/ansible-collections/community.general/pull/9028).
- collection_version lookup plugin - use ``importlib`` directly instead of the deprecated and in ansible-core 2.19 removed ``ansible.module_utils.compat.importlib`` (https://github.com/ansible-collections/community.general/pull/9084).
- gitlab_label - update label's color (https://github.com/ansible-collections/community.general/pull/9010).
- keycloak_clientscope_type - fix detect changes in check mode (https://github.com/ansible-collections/community.general/issues/9092, https://github.com/ansible-collections/community.general/pull/9093).
- keycloak_group - fix crash caused in subgroup creation. The crash was caused by a missing or empty ``subGroups`` property in Keycloak ≥23 (https://github.com/ansible-collections/community.general/issues/8788, https://github.com/ansible-collections/community.general/pull/8979).
- modprobe - fix check mode not being honored for ``persistent`` option (https://github.com/ansible-collections/community.general/issues/9051, https://github.com/ansible-collections/community.general/pull/9052).
- one_host - fix if statements for cases when ``ID=0`` (https://github.com/ansible-collections/community.general/issues/1199, https://github.com/ansible-collections/community.general/pull/8907).
- one_image - fix module failing due to a class method typo (https://github.com/ansible-collections/community.general/pull/9056).
- one_image_info - fix module failing due to a class method typo (https://github.com/ansible-collections/community.general/pull/9056).
- one_vnet - fix module failing due to a variable typo (https://github.com/ansible-collections/community.general/pull/9019).
- redfish_utils module utils - fix issue with URI parsing to gracefully handling trailing slashes when extracting member identifiers (https://github.com/ansible-collections/community.general/issues/9047, https://github.com/ansible-collections/community.general/pull/9057).
v9.5.0
======

View File

@@ -6,8 +6,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
# Community General Collection
[![Documentation](https://img.shields.io/badge/docs-brightgreen.svg)](https://docs.ansible.com/ansible/latest/collections/community/general/)
[![Build Status](https://dev.azure.com/ansible/community.general/_apis/build/status/CI?branchName=stable-9)](https://dev.azure.com/ansible/community.general/_build?definitionId=31)
[![EOL CI](https://github.com/ansible-collections/community.general/workflows/EOL%20CI/badge.svg?event=push)](https://github.com/ansible-collections/community.general/actions)
[![EOL CI](https://github.com/ansible-collections/community.general/actions/workflows/ansible-test.yml/badge.svg?branch=stable-9)](https://github.com/ansible-collections/community.general/actions)
[![Nox CI](https://github.com/ansible-collections/community.general/actions/workflows/nox.yml/badge.svg?branch=stable-9)](https://github.com/ansible-collections/community.general/actions)
[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.general)](https://codecov.io/gh/ansible-collections/community.general)
[![REUSE status](https://api.reuse.software/badge/github.com/ansible-collections/community.general)](https://api.reuse.software/info/github.com/ansible-collections/community.general)

11
REUSE.toml Normal file
View File

@@ -0,0 +1,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
version = 1
[[annotations]]
path = "changelogs/fragments/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "Ansible Project"
SPDX-License-Identifier = "GPL-3.0-or-later"

40
antsibull-nox.toml Normal file
View File

@@ -0,0 +1,40 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2025 Felix Fontein <felix@fontein.de>
[collection_sources]
"ansible.posix" = "git+https://github.com/ansible-collections/ansible.posix.git,main"
"community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,main"
"community.docker" = "git+https://github.com/ansible-collections/community.docker.git,main"
"community.internal_test_tools" = "git+https://github.com/ansible-collections/community.internal_test_tools.git,main"
[sessions]
[sessions.docs_check]
validate_collection_refs="all"
[sessions.license_check]
[sessions.extra_checks]
run_no_unwanted_files = true
no_unwanted_files_module_extensions = [".py"]
no_unwanted_files_yaml_extensions = [".yml"]
run_action_groups = true
[[sessions.extra_checks.action_groups_config]]
name = "consul"
pattern = "^consul_.*$"
exclusions = [
"consul_acl_bootstrap",
"consul_kv",
]
doc_fragment = "community.general.consul.actiongroup_consul"
[[sessions.extra_checks.action_groups_config]]
name = "proxmox"
pattern = "^proxmox(_.*)?$"
exclusions = []
doc_fragment = "community.general.proxmox.actiongroup_proxmox"
[sessions.build_import_check]
run_galaxy_importer = true

View File

@@ -1426,3 +1426,276 @@ releases:
name: ipa_getkeytab
namespace: ''
release_date: '2024-10-07'
9.5.1:
changes:
bugfixes:
- bitwarden lookup plugin - support BWS v0.3.0 syntax breaking change (https://github.com/ansible-collections/community.general/pull/9028).
- collection_version lookup plugin - use ``importlib`` directly instead of
the deprecated and in ansible-core 2.19 removed ``ansible.module_utils.compat.importlib``
(https://github.com/ansible-collections/community.general/pull/9084).
- gitlab_label - update label's color (https://github.com/ansible-collections/community.general/pull/9010).
- keycloak_clientscope_type - fix detect changes in check mode (https://github.com/ansible-collections/community.general/issues/9092,
https://github.com/ansible-collections/community.general/pull/9093).
- "keycloak_group - fix crash caused in subgroup creation. The crash was caused\
\ by a missing or empty ``subGroups`` property in Keycloak \u226523 (https://github.com/ansible-collections/community.general/issues/8788,\
\ https://github.com/ansible-collections/community.general/pull/8979)."
- modprobe - fix check mode not being honored for ``persistent`` option (https://github.com/ansible-collections/community.general/issues/9051,
https://github.com/ansible-collections/community.general/pull/9052).
- one_host - fix if statements for cases when ``ID=0`` (https://github.com/ansible-collections/community.general/issues/1199,
https://github.com/ansible-collections/community.general/pull/8907).
- one_image - fix module failing due to a class method typo (https://github.com/ansible-collections/community.general/pull/9056).
- one_image_info - fix module failing due to a class method typo (https://github.com/ansible-collections/community.general/pull/9056).
- one_vnet - fix module failing due to a variable typo (https://github.com/ansible-collections/community.general/pull/9019).
- redfish_utils module utils - fix issue with URI parsing to gracefully handling
trailing slashes when extracting member identifiers (https://github.com/ansible-collections/community.general/issues/9047,
https://github.com/ansible-collections/community.general/pull/9057).
minor_changes:
- redfish_utils module utils - schedule a BIOS configuration job at next reboot
when the BIOS config is changed (https://github.com/ansible-collections/community.general/pull/9012).
release_summary: Regular bugfix release.
fragments:
- 8907-fix-one-host-id.yml
- 8979-keycloak_group-fix-subgroups.yml
- 9.5.1.yml
- 9010-edit-gitlab-label-color.yaml
- 9012-dell-pwrbutton-requires-a-job-initiated-at-reboot.yml
- 9019-onevnet-bugfix.yml
- 9028-bitwarden-secrets-manager-syntax-fix.yml
- 9047-redfish-uri-parsing.yml
- 9052-modprobe-bugfix.yml
- 9056-fix-one_image-modules.yml
- 9084-collection_version-importlib.yml
- 9092-keycloak-clientscope-type-fix-check-mode.yml
release_date: '2024-11-03'
9.5.2:
changes:
bugfixes:
- dnf_config_manager - fix hanging when prompting to import GPG keys (https://github.com/ansible-collections/community.general/pull/9124,
https://github.com/ansible-collections/community.general/issues/8830).
- dnf_config_manager - forces locale to ``C`` before module starts. If the
locale was set to non-English, the output of the ``dnf config-manager``
could not be parsed (https://github.com/ansible-collections/community.general/pull/9157,
https://github.com/ansible-collections/community.general/issues/9046).
- flatpak - force the locale language to ``C`` when running the flatpak command
(https://github.com/ansible-collections/community.general/pull/9187, https://github.com/ansible-collections/community.general/issues/8883).
- github_key - in check mode, a faulty call to ```datetime.strftime(...)```
was being made which generated an exception (https://github.com/ansible-collections/community.general/issues/9185).
- homebrew_cask - allow ``+`` symbol in Homebrew cask name validation regex
(https://github.com/ansible-collections/community.general/pull/9128).
- keycloak_client - fix diff by removing code that turns the attributes dict
which contains additional settings into a list (https://github.com/ansible-collections/community.general/pull/9077).
- keycloak_clientscope - fix diff and ``end_state`` by removing the code that
turns the attributes dict, which contains additional config items, into
a list (https://github.com/ansible-collections/community.general/pull/9082).
- keycloak_clientscope_type - sort the default and optional clientscope lists
to improve the diff (https://github.com/ansible-collections/community.general/pull/9202).
- redfish_utils module utils - remove undocumented default applytime (https://github.com/ansible-collections/community.general/pull/9114).
- slack - fail if Slack API response is not OK with error message (https://github.com/ansible-collections/community.general/pull/9198).
minor_changes:
- proxmox inventory plugin - fix urllib3 ``InsecureRequestWarnings`` not being
suppressed when a token is used (https://github.com/ansible-collections/community.general/pull/9099).
release_summary: Regular bugfix release.
fragments:
- 9.5.2.yml
- 9077-keycloak_client-fix-attributes-dict-turned-into-list.yml
- 9082-keycloak_clientscope-fix-attributes-dict-turned-into-list.yml
- 9099-proxmox-fix-insecure.yml
- 9114-redfish-utils-update-remove-default-applytime.yml
- 9124-dnf_config_manager.yml
- 9128-homebrew_cask-name-regex-fix.yml
- 9157-fix-dnf_config_manager-locale.yml
- 9186-fix-broken-check-mode-in-github-key.yml
- 9187-flatpak-lang.yml
- 9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml
- 9202-keycloak_clientscope_type-sort-lists.yml
release_date: '2024-12-02'
9.5.3:
changes:
bugfixes:
- dig lookup plugin - correctly handle ``NoNameserver`` exception (https://github.com/ansible-collections/community.general/pull/9363,
https://github.com/ansible-collections/community.general/issues/9362).
- htpasswd - report changes when file permissions are adjusted (https://github.com/ansible-collections/community.general/issues/9485,
https://github.com/ansible-collections/community.general/pull/9490).
- proxmox_disk - fix async method and make ``resize_disk`` method handle errors
correctly (https://github.com/ansible-collections/community.general/pull/9256).
- proxmox_template - fix the wrong path called on ``proxmox_template.task_status``
(https://github.com/ansible-collections/community.general/issues/9276, https://github.com/ansible-collections/community.general/pull/9277).
- qubes connection plugin - fix the printing of debug information (https://github.com/ansible-collections/community.general/pull/9334).
- redfish_utils module utils - Fix ``VerifyBiosAttributes`` command on multi
system resource nodes (https://github.com/ansible-collections/community.general/pull/9234).
minor_changes:
- proxmox module utils - add method ``api_task_complete`` that can wait for
task completion and return error message (https://github.com/ansible-collections/community.general/pull/9256).
release_summary: Regular bugfix release.
security_fixes:
- keycloak_authentication - API calls did not properly set the ``priority``
during update resulting in incorrectly sorted authentication flows. This
apparently only affects Keycloak 25 or newer (https://github.com/ansible-collections/community.general/pull/9263).
fragments:
- 9.5.3.yml
- 9234-fix-verify-bios-attributes-multi-system.yml
- 9256-proxmox_disk-fix-async-method-of-resize_disk.yml
- 9263-kc_authentication-api-priority.yaml
- 9277-proxmox_template-fix-the-wrong-path-called-on-proxmox_template.task_status.yaml
- 9334-qubes-conn.yml
- 9363-dig-nonameservers.yml
- 9490-htpasswd-permissions.yml
release_date: '2024-12-31'
9.5.4:
changes:
bugfixes:
- 'redhat_subscription - do not try to unsubscribe (i.e. remove subscriptions)
when unregistering a system: newer versions of subscription-manager, as
available in EL 10 and Fedora 41+, do not support entitlements anymore,
and
thus unsubscribing will fail
(https://github.com/ansible-collections/community.general/pull/9578).
'
security_fixes:
- keycloak_client - Sanitize ``saml.encryption.private.key`` so it does not
show in the logs (https://github.com/ansible-collections/community.general/pull/9621).
fragments:
- 9578-redhat_subscription-no-remove-on-unregister.yml
- 9621-keycloak_client-sanitize-saml-encryption-key.yml
release_date: '2025-01-27'
9.5.5:
changes:
bugfixes:
- apache2_mod_proxy - make compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/9762).
- apache2_mod_proxy - passing the cluster's page as referer for the member's
pages. This makes the module actually work again for halfway modern Apache
versions. According to some comments founds on the net the referer was required
since at least 2019 for some versions of Apache 2 (https://github.com/ansible-collections/community.general/pull/9762).
- cloudflare_dns - fix crash when deleting a DNS record or when updating a
record with ``solo=true`` (https://github.com/ansible-collections/community.general/issues/9652,
https://github.com/ansible-collections/community.general/pull/9649).
- 'elasticsearch_plugin - fix ``ERROR: D is not a recognized option`` issue
when configuring proxy settings (https://github.com/ansible-collections/community.general/pull/9774,
https://github.com/ansible-collections/community.general/issues/9773).'
- keycloak_client - fix and improve existing tests. The module showed a diff
without actual changes, solved by improving the ``normalise_cr()`` function
(https://github.com/ansible-collections/community.general/pull/9644).
- keycloak_client - in check mode, detect whether the lists in before client
(for example redirect URI list) contain items that the lists in the desired
client do not contain (https://github.com/ansible-collections/community.general/pull/9739).
- passwordstore lookup plugin - fix subkey creation even when ``create=false``
(https://github.com/ansible-collections/community.general/issues/9105, https://github.com/ansible-collections/community.general/pull/9106).
- 'proxmox inventory plugin - plugin did not update cache correctly after
``meta: refresh_inventory`` (https://github.com/ansible-collections/community.general/issues/9710,
https://github.com/ansible-collections/community.general/pull/9760).'
- 'redhat_subscription - use the "enable_content" option (when available)
when
registering using D-Bus, to ensure that subscription-manager enables the
content on registration; this is particular important on EL 10+ and Fedora
41+
(https://github.com/ansible-collections/community.general/pull/9778).
'
- xml - ensure file descriptor is closed (https://github.com/ansible-collections/community.general/pull/9695).
release_summary: Regular bugfix release.
fragments:
- 9.5.5.yml
- 9106-passwordstore-fix-subkey-creation-even-when-create-==-false.yml
- 9644-kc_client-test-improvement-and-fix.yaml
- 9649-cloudflare_dns-fix-crash-when-deleting-record.yml
- 9695-xml-close-file.yml
- 9739-keycloak_client-compare-before-desired-directly.yml
- 9760-proxmox-inventory.yml
- 9762-apache2_mod_proxy.yml
- 9774-fix-elasticsearch_plugin-proxy-settings.yml
- 9778-redhat_subscription-ensure-to-enable-content.yml
release_date: '2025-02-24'
9.5.6:
changes:
bugfixes:
- cloudlare_dns - handle exhausted response stream in case of HTTP errors
to show nice error message to the user (https://github.com/ansible-collections/community.general/issues/9782,
https://github.com/ansible-collections/community.general/pull/9818).
- dnf_versionlock - add support for dnf5 (https://github.com/ansible-collections/community.general/issues/9556).
- homebrew_cask - handle unusual brew version strings (https://github.com/ansible-collections/community.general/issues/8432,
https://github.com/ansible-collections/community.general/pull/9881).
- ipa_host - module revoked existing host certificates even if ``user_certificate``
was not given (https://github.com/ansible-collections/community.general/pull/9694).
- nmcli - enable changing only the order of DNS servers or search suffixes
(https://github.com/ansible-collections/community.general/issues/8724, https://github.com/ansible-collections/community.general/pull/9880).
- proxmox_vm_info - the module no longer expects that the key ``template``
exists in a dictionary returned by Proxmox (https://github.com/ansible-collections/community.general/issues/9875,
https://github.com/ansible-collections/community.general/pull/9910).
- sudoers - display stdout and stderr raised while failed validation (https://github.com/ansible-collections/community.general/issues/9674,
https://github.com/ansible-collections/community.general/pull/9871).
minor_changes:
- consul_token - fix idempotency when ``policies`` or ``roles`` are supplied
by name (https://github.com/ansible-collections/community.general/issues/9841,
https://github.com/ansible-collections/community.general/pull/9845).
release_summary: Regular bugfix release.
fragments:
- 9.5.6.yml
- 9694-ipa-host-certificate-revoked.yml
- 9818-cloudflare-dns-exhausted-response.yml
- 9845-consul_token_idempotency.yml
- 9875-proxmox-dont-expect-key-template-to-exist.yml
- 9880-nmcli-fix-reorder-same-dns-nameservers-search-suffixes.yml
- dnf_versionlock.yml
- homebrew_cask.yml
- sudoers.yml
release_date: '2025-03-24'
9.5.7:
changes:
bugfixes:
- dependent look plugin - make compatible with ansible-core's Data Tagging
feature (https://github.com/ansible-collections/community.general/pull/9833).
- diy callback plugin - make compatible with ansible-core's Data Tagging feature
(https://github.com/ansible-collections/community.general/pull/9833).
- "github_deploy_key - check that key really exists on 422\_to avoid masking\
\ other errors (https://github.com/ansible-collections/community.general/issues/6718,\
\ https://github.com/ansible-collections/community.general/pull/10011)."
- hashids and unicode_normalize filter plugins - avoid deprecated ``AnsibleFilterTypeError``
on ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/9992).
- keycloak_authentication - fix authentification config duplication for Keycloak
< 26.2.0 (https://github.com/ansible-collections/community.general/pull/9987).
- keycloak_client - fix the idempotency regression by normalizing the Keycloak
response for ``after_client`` (https://github.com/ansible-collections/community.general/issues/9905,
https://github.com/ansible-collections/community.general/pull/9976).
- proxmox inventory plugin - fix ``ansible_host`` staying empty for certain
Proxmox nodes (https://github.com/ansible-collections/community.general/issues/5906,
https://github.com/ansible-collections/community.general/pull/9952).
- proxmox_disk - fail gracefully if ``storage`` is required but not provided
by the user (https://github.com/ansible-collections/community.general/issues/9941,
https://github.com/ansible-collections/community.general/pull/9963).
- reveal_ansible_type filter plugin and ansible_type test plugin - make compatible
with ansible-core's Data Tagging feature (https://github.com/ansible-collections/community.general/pull/9833).
- sysrc - no longer always reporting ``changed=true`` when ``state=absent``.
This fixes the method ``exists()`` (https://github.com/ansible-collections/community.general/issues/10004,
https://github.com/ansible-collections/community.general/pull/10005).
- yaml callback plugin - use ansible-core internals to avoid breakage with
Data Tagging (https://github.com/ansible-collections/community.general/pull/9833).
known_issues:
- reveal_ansible_type filter plugin and ansible_type test plugin - note that
ansible-core's Data Tagging feature implements new aliases, such as ``_AnsibleTaggedStr``
for ``str``, ``_AnsibleTaggedInt`` for ``int``, and ``_AnsibleTaggedFloat``
for ``float`` (https://github.com/ansible-collections/community.general/pull/9833).
minor_changes:
- apache2_module - added workaround for new PHP module name, from ``php7_module``
to ``php_module`` (https://github.com/ansible-collections/community.general/pull/9951).
release_summary: Regular bugfix release.
fragments:
- 10005-fix-method-exists-in-sysrc.yml
- 10011-github_deploy_key-check-key-present.yml
- 9.5.7.yml
- 9833-data-tagging.yml
- 9951-mod-php-identifier.yml
- 9952-proxmox-inventory-plugin-improve-ansible_host.yml
- 9963-proxmox_disk-storage.yml
- 9976-keycloak_client-fix-idempotency-regression.yml
- 9987-keycloak-auth-flow-fix-config.yaml
- 9992-filtertypeerror.yml
release_date: '2025-04-21'

View File

@@ -65,7 +65,7 @@ All three statements are equivalent and give:
.. note:: Be aware that in most cases, filter calls without any argument require ``flatten=true``, otherwise the input is returned as result. The reason for this is, that the input is considered as a variable argument and is wrapped by an additional outer list. ``flatten=true`` ensures that this list is removed before the input is processed by the filter logic.
The filters ansplugin:`community.general.lists_difference#filter` or :ansplugin:`community.general.lists_symmetric_difference#filter` can be used in the same way as the filters in the examples above. They calculate the difference or the symmetric difference between two or more lists and preserve the item order.
The filters :ansplugin:`community.general.lists_difference#filter` or :ansplugin:`community.general.lists_symmetric_difference#filter` can be used in the same way as the filters in the examples above. They calculate the difference or the symmetric difference between two or more lists and preserve the item order.
For example, the symmetric difference of ``A``, ``B`` and ``C`` may be written as:

View File

@@ -124,7 +124,7 @@ To get a hash map with all ports and names of a cluster:
var: item
loop: "{{ domain_definition | community.general.json_query(server_name_cluster1_query) }}"
vars:
server_name_cluster1_query: "domain.server[?cluster=='cluster2'].{name: name, port: port}"
server_name_cluster1_query: "domain.server[?cluster=='cluster1'].{name: name, port: port}"
To extract ports from all clusters with name starting with 'server1':

View File

@@ -5,7 +5,7 @@
namespace: community
name: general
version: 9.5.0
version: 9.5.7
readme: README.md
authors:
- Ansible (https://github.com/ansible)

38
noxfile.py Normal file
View File

@@ -0,0 +1,38 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2025 Felix Fontein <felix@fontein.de>
# /// script
# dependencies = ["nox>=2025.02.09", "antsibull-nox"]
# ///
import sys
import nox
try:
import antsibull_nox
except ImportError:
print("You need to install antsibull-nox in the same Python environment as nox.")
sys.exit(1)
antsibull_nox.load_antsibull_nox_toml()
@nox.session(name="aliases", python=False, default=True)
def aliases(session: nox.Session) -> None:
session.run("python", "tests/sanity/extra/aliases.py")
@nox.session(name="botmeta", default=True)
def botmeta(session: nox.Session) -> None:
session.install("PyYAML", "voluptuous")
session.run("python", "tests/sanity/extra/botmeta.py")
# Allow to run the noxfile with `python noxfile.py`, `pipx run noxfile.py`, or similar.
# Requires nox >= 2025.02.09
if __name__ == "__main__":
nox.main()

View File

@@ -7,46 +7,46 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: memcached
short_description: Use memcached DB for cache
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: memcached
short_description: Use memcached DB for cache
description:
- This cache uses JSON formatted, per host records saved in memcached.
requirements:
- memcache (python lib)
options:
_uri:
description:
- This cache uses JSON formatted, per host records saved in memcached.
requirements:
- memcache (python lib)
options:
_uri:
description:
- List of connection information for the memcached DBs
default: ['127.0.0.1:11211']
type: list
elements: string
env:
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
ini:
- key: fact_caching_connection
section: defaults
_prefix:
description: User defined prefix to use when creating the DB entries
type: string
default: ansible_facts
env:
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
ini:
- key: fact_caching_prefix
section: defaults
_timeout:
default: 86400
type: integer
- List of connection information for the memcached DBs.
default: ['127.0.0.1:11211']
type: list
elements: string
env:
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
ini:
- key: fact_caching_connection
section: defaults
_prefix:
description: User defined prefix to use when creating the DB entries.
type: string
default: ansible_facts
env:
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
ini:
- key: fact_caching_prefix
section: defaults
_timeout:
default: 86400
type: integer
# TODO: determine whether it is OK to change to: type: float
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire
env:
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
ini:
- key: fact_caching_timeout
section: defaults
'''
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire.
env:
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
ini:
- key: fact_caching_timeout
section: defaults
"""
import collections
import os

View File

@@ -8,41 +8,41 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
name: pickle
short_description: Pickle formatted files.
DOCUMENTATION = r"""
name: pickle
short_description: Pickle formatted files
description:
- This cache uses Python's pickle serialization format, in per host files, saved to the filesystem.
author: Brian Coca (@bcoca)
options:
_uri:
required: true
description:
- This cache uses Python's pickle serialization format, in per host files, saved to the filesystem.
author: Brian Coca (@bcoca)
options:
_uri:
required: true
description:
- Path in which the cache plugin will save the files
env:
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
ini:
- key: fact_caching_connection
section: defaults
type: path
_prefix:
description: User defined prefix to use when creating the files
env:
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
ini:
- key: fact_caching_prefix
section: defaults
type: string
_timeout:
default: 86400
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire
env:
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
ini:
- key: fact_caching_timeout
section: defaults
type: float
'''
- Path in which the cache plugin will save the files.
env:
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
ini:
- key: fact_caching_connection
section: defaults
type: path
_prefix:
description: User defined prefix to use when creating the files.
env:
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
ini:
- key: fact_caching_prefix
section: defaults
type: string
_timeout:
default: 86400
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire.
env:
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
ini:
- key: fact_caching_timeout
section: defaults
type: float
"""
try:
import cPickle as pickle

118
plugins/cache/redis.py vendored
View File

@@ -6,67 +6,67 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: redis
short_description: Use Redis DB for cache
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: redis
short_description: Use Redis DB for cache
description:
- This cache uses JSON formatted, per host records saved in Redis.
requirements:
- redis>=2.4.5 (python lib)
options:
_uri:
description:
- This cache uses JSON formatted, per host records saved in Redis.
requirements:
- redis>=2.4.5 (python lib)
options:
_uri:
description:
- A colon separated string of connection information for Redis.
- The format is V(host:port:db:password), for example V(localhost:6379:0:changeme).
- To use encryption in transit, prefix the connection with V(tls://), as in V(tls://localhost:6379:0:changeme).
- To use redis sentinel, use separator V(;), for example V(localhost:26379;localhost:26379;0:changeme). Requires redis>=2.9.0.
type: string
required: true
env:
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
ini:
- key: fact_caching_connection
section: defaults
_prefix:
description: User defined prefix to use when creating the DB entries
type: string
default: ansible_facts
env:
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
ini:
- key: fact_caching_prefix
section: defaults
_keyset_name:
description: User defined name for cache keyset name.
type: string
default: ansible_cache_keys
env:
- name: ANSIBLE_CACHE_REDIS_KEYSET_NAME
ini:
- key: fact_caching_redis_keyset_name
section: defaults
version_added: 1.3.0
_sentinel_service_name:
description: The redis sentinel service name (or referenced as cluster name).
type: string
env:
- name: ANSIBLE_CACHE_REDIS_SENTINEL
ini:
- key: fact_caching_redis_sentinel
section: defaults
version_added: 1.3.0
_timeout:
default: 86400
type: integer
- A colon separated string of connection information for Redis.
- The format is V(host:port:db:password), for example V(localhost:6379:0:changeme).
- To use encryption in transit, prefix the connection with V(tls://), as in V(tls://localhost:6379:0:changeme).
- To use redis sentinel, use separator V(;), for example V(localhost:26379;localhost:26379;0:changeme). Requires redis>=2.9.0.
type: string
required: true
env:
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
ini:
- key: fact_caching_connection
section: defaults
_prefix:
description: User defined prefix to use when creating the DB entries.
type: string
default: ansible_facts
env:
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
ini:
- key: fact_caching_prefix
section: defaults
_keyset_name:
description: User defined name for cache keyset name.
type: string
default: ansible_cache_keys
env:
- name: ANSIBLE_CACHE_REDIS_KEYSET_NAME
ini:
- key: fact_caching_redis_keyset_name
section: defaults
version_added: 1.3.0
_sentinel_service_name:
description: The redis sentinel service name (or referenced as cluster name).
type: string
env:
- name: ANSIBLE_CACHE_REDIS_SENTINEL
ini:
- key: fact_caching_redis_sentinel
section: defaults
version_added: 1.3.0
_timeout:
default: 86400
type: integer
# TODO: determine whether it is OK to change to: type: float
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire
env:
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
ini:
- key: fact_caching_timeout
section: defaults
'''
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire.
env:
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
ini:
- key: fact_caching_timeout
section: defaults
"""
import re
import time

68
plugins/cache/yaml.py vendored
View File

@@ -8,42 +8,42 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
name: yaml
short_description: YAML formatted files.
DOCUMENTATION = r"""
name: yaml
short_description: YAML formatted files
description:
- This cache uses YAML formatted, per host, files saved to the filesystem.
author: Brian Coca (@bcoca)
options:
_uri:
required: true
description:
- This cache uses YAML formatted, per host, files saved to the filesystem.
author: Brian Coca (@bcoca)
options:
_uri:
required: true
description:
- Path in which the cache plugin will save the files
env:
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
ini:
- key: fact_caching_connection
section: defaults
type: string
_prefix:
description: User defined prefix to use when creating the files
env:
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
ini:
- key: fact_caching_prefix
section: defaults
type: string
_timeout:
default: 86400
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire
env:
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
ini:
- key: fact_caching_timeout
section: defaults
type: integer
- Path in which the cache plugin will save the files.
env:
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
ini:
- key: fact_caching_connection
section: defaults
type: string
_prefix:
description: User defined prefix to use when creating the files.
env:
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
ini:
- key: fact_caching_prefix
section: defaults
type: string
_timeout:
default: 86400
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire.
env:
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
ini:
- key: fact_caching_timeout
section: defaults
type: integer
# TODO: determine whether it is OK to change to: type: float
'''
"""
import codecs

View File

@@ -7,40 +7,41 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: cgroup_memory_recap
type: aggregate
requirements:
- whitelist in configuration
- cgroups
short_description: Profiles maximum memory usage of tasks and full execution using cgroups
description:
- This is an ansible callback plugin that profiles maximum memory usage of ansible and individual tasks, and displays a recap at the end using cgroups.
notes:
- Requires ansible to be run from within a cgroup, such as with C(cgexec -g memory:ansible_profile ansible-playbook ...).
- This cgroup should only be used by ansible to get accurate results.
- To create the cgroup, first use a command such as C(sudo cgcreate -a ec2-user:ec2-user -t ec2-user:ec2-user -g memory:ansible_profile).
options:
max_mem_file:
required: true
description: Path to cgroups C(memory.max_usage_in_bytes) file. Example V(/sys/fs/cgroup/memory/ansible_profile/memory.max_usage_in_bytes).
type: str
env:
- name: CGROUP_MAX_MEM_FILE
ini:
- section: callback_cgroupmemrecap
key: max_mem_file
cur_mem_file:
required: true
description: Path to C(memory.usage_in_bytes) file. Example V(/sys/fs/cgroup/memory/ansible_profile/memory.usage_in_bytes).
type: str
env:
- name: CGROUP_CUR_MEM_FILE
ini:
- section: callback_cgroupmemrecap
key: cur_mem_file
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: cgroup_memory_recap
type: aggregate
requirements:
- whitelist in configuration
- cgroups
short_description: Profiles maximum memory usage of tasks and full execution using cgroups
description:
- This is an Ansible callback plugin that profiles maximum memory usage of Ansible and individual tasks, and displays a
recap at the end using cgroups.
notes:
- Requires ansible to be run from within a C(cgroup), such as with C(cgexec -g memory:ansible_profile ansible-playbook ...).
- This C(cgroup) should only be used by Ansible to get accurate results.
- To create the C(cgroup), first use a command such as C(sudo cgcreate -a ec2-user:ec2-user -t ec2-user:ec2-user -g memory:ansible_profile).
options:
max_mem_file:
required: true
description: Path to cgroups C(memory.max_usage_in_bytes) file. Example V(/sys/fs/cgroup/memory/ansible_profile/memory.max_usage_in_bytes).
type: str
env:
- name: CGROUP_MAX_MEM_FILE
ini:
- section: callback_cgroupmemrecap
key: max_mem_file
cur_mem_file:
required: true
description: Path to C(memory.usage_in_bytes) file. Example V(/sys/fs/cgroup/memory/ansible_profile/memory.usage_in_bytes).
type: str
env:
- name: CGROUP_CUR_MEM_FILE
ini:
- section: callback_cgroupmemrecap
key: cur_mem_file
"""
import time
import threading

View File

@@ -7,17 +7,17 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: context_demo
type: aggregate
short_description: demo callback that adds play/task context
description:
- Displays some play and task context along with normal output.
- This is mostly for demo purposes.
requirements:
- whitelist in configuration
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: context_demo
type: aggregate
short_description: demo callback that adds play/task context
description:
- Displays some play and task context along with normal output.
- This is mostly for demo purposes.
requirements:
- whitelist in configuration
"""
from ansible.plugins.callback import CallbackBase

View File

@@ -9,20 +9,20 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: counter_enabled
type: stdout
short_description: adds counters to the output items (tasks and hosts/task)
description:
- Use this callback when you need a kind of progress bar on a large environments.
- You will know how many tasks has the playbook to run, and which one is actually running.
- You will know how many hosts may run a task, and which of them is actually running.
extends_documentation_fragment:
- default_callback
requirements:
- set as stdout callback in C(ansible.cfg) (C(stdout_callback = counter_enabled))
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: counter_enabled
type: stdout
short_description: adds counters to the output items (tasks and hosts/task)
description:
- Use this callback when you need a kind of progress bar on a large environments.
- You will know how many tasks has the playbook to run, and which one is actually running.
- You will know how many hosts may run a task, and which of them is actually running.
extends_documentation_fragment:
- default_callback
requirements:
- set as stdout callback in C(ansible.cfg) (C(stdout_callback = counter_enabled))
"""
from ansible import constants as C
from ansible.plugins.callback import CallbackBase

View File

@@ -7,23 +7,22 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = r'''
name: default_without_diff
type: stdout
short_description: The default ansible callback without diff output
version_added: 8.4.0
description:
- This is basically the default ansible callback plugin (P(ansible.builtin.default#callback)) without
showing diff output. This can be useful when using another callback which sends more detailed information
to another service, like the L(ARA, https://ara.recordsansible.org/) callback, and you want diff output
sent to that plugin but not shown on the console output.
author: Felix Fontein (@felixfontein)
extends_documentation_fragment:
- ansible.builtin.default_callback
- ansible.builtin.result_format_callback
'''
DOCUMENTATION = r"""
name: default_without_diff
type: stdout
short_description: The default ansible callback without diff output
version_added: 8.4.0
description:
- This is basically the default ansible callback plugin (P(ansible.builtin.default#callback)) without showing diff output.
This can be useful when using another callback which sends more detailed information to another service, like the L(ARA,
https://ara.recordsansible.org/) callback, and you want diff output sent to that plugin but not shown on the console output.
author: Felix Fontein (@felixfontein)
extends_documentation_fragment:
- ansible.builtin.default_callback
- ansible.builtin.result_format_callback
"""
EXAMPLES = r'''
EXAMPLES = r"""
# Enable callback in ansible.cfg:
ansible_config: |
[defaults]
@@ -32,7 +31,7 @@ ansible_config: |
# Enable callback with environment variables:
environment_variable: |
ANSIBLE_STDOUT_CALLBACK=community.general.default_without_diff
'''
"""
from ansible.plugins.callback.default import CallbackModule as Default

View File

@@ -7,19 +7,19 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r"""
name: dense
type: stdout
short_description: minimal stdout output
extends_documentation_fragment:
- default_callback
- default_callback
description:
- When in verbose mode it will act the same as the default callback.
- When in verbose mode it will act the same as the default callback.
author:
- Dag Wieers (@dagwieers)
- Dag Wieers (@dagwieers)
requirements:
- set as stdout in configuration
'''
- set as stdout in configuration
"""
HAS_OD = False
try:

File diff suppressed because it is too large Load Diff

View File

@@ -5,69 +5,69 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Victor Martinez (@v1v) <VictorMartinezRubio@gmail.com>
name: elastic
type: notification
short_description: Create distributed traces for each Ansible task in Elastic APM
version_added: 3.8.0
DOCUMENTATION = r"""
author: Victor Martinez (@v1v) <VictorMartinezRubio@gmail.com>
name: elastic
type: notification
short_description: Create distributed traces for each Ansible task in Elastic APM
version_added: 3.8.0
description:
- This callback creates distributed traces for each Ansible task in Elastic APM.
- You can configure the plugin with environment variables.
- See U(https://www.elastic.co/guide/en/apm/agent/python/current/configuration.html).
options:
hide_task_arguments:
default: false
type: bool
description:
- This callback creates distributed traces for each Ansible task in Elastic APM.
- You can configure the plugin with environment variables.
- See U(https://www.elastic.co/guide/en/apm/agent/python/current/configuration.html).
options:
hide_task_arguments:
default: false
type: bool
description:
- Hide the arguments for a task.
env:
- name: ANSIBLE_OPENTELEMETRY_HIDE_TASK_ARGUMENTS
apm_service_name:
default: ansible
type: str
description:
- The service name resource attribute.
env:
- name: ELASTIC_APM_SERVICE_NAME
apm_server_url:
type: str
description:
- Use the APM server and its environment variables.
env:
- name: ELASTIC_APM_SERVER_URL
apm_secret_token:
type: str
description:
- Use the APM server token
env:
- name: ELASTIC_APM_SECRET_TOKEN
apm_api_key:
type: str
description:
- Use the APM API key
env:
- name: ELASTIC_APM_API_KEY
apm_verify_server_cert:
default: true
type: bool
description:
- Verifies the SSL certificate if an HTTPS connection.
env:
- name: ELASTIC_APM_VERIFY_SERVER_CERT
traceparent:
type: str
description:
- The L(W3C Trace Context header traceparent,https://www.w3.org/TR/trace-context-1/#traceparent-header).
env:
- name: TRACEPARENT
requirements:
- elastic-apm (Python library)
'''
- Hide the arguments for a task.
env:
- name: ANSIBLE_OPENTELEMETRY_HIDE_TASK_ARGUMENTS
apm_service_name:
default: ansible
type: str
description:
- The service name resource attribute.
env:
- name: ELASTIC_APM_SERVICE_NAME
apm_server_url:
type: str
description:
- Use the APM server and its environment variables.
env:
- name: ELASTIC_APM_SERVER_URL
apm_secret_token:
type: str
description:
- Use the APM server token.
env:
- name: ELASTIC_APM_SECRET_TOKEN
apm_api_key:
type: str
description:
- Use the APM API key.
env:
- name: ELASTIC_APM_API_KEY
apm_verify_server_cert:
default: true
type: bool
description:
- Verifies the SSL certificate if an HTTPS connection.
env:
- name: ELASTIC_APM_VERIFY_SERVER_CERT
traceparent:
type: str
description:
- The L(W3C Trace Context header traceparent,https://www.w3.org/TR/trace-context-1/#traceparent-header).
env:
- name: TRACEPARENT
requirements:
- elastic-apm (Python library)
"""
EXAMPLES = '''
examples: |
EXAMPLES = r"""
examples: |-
Enable the plugin in ansible.cfg:
[defaults]
callbacks_enabled = community.general.elastic
@@ -76,7 +76,7 @@ examples: |
export ELASTIC_APM_SERVER_URL=<your APM server URL)>
export ELASTIC_APM_SERVICE_NAME=your_service_name
export ELASTIC_APM_API_KEY=your_APM_API_KEY
'''
"""
import getpass
import socket

View File

@@ -7,42 +7,42 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: jabber
type: notification
short_description: post task events to a jabber server
description:
- The chatty part of ChatOps with a Hipchat server as a target.
- This callback plugin sends status updates to a HipChat channel during playbook execution.
requirements:
- xmpp (Python library U(https://github.com/ArchipelProject/xmpppy))
options:
server:
description: connection info to jabber server
type: str
required: true
env:
- name: JABBER_SERV
user:
description: Jabber user to authenticate as
type: str
required: true
env:
- name: JABBER_USER
password:
description: Password for the user to the jabber server
type: str
required: true
env:
- name: JABBER_PASS
to:
description: chat identifier that will receive the message
type: str
required: true
env:
- name: JABBER_TO
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: jabber
type: notification
short_description: post task events to a Jabber server
description:
- The chatty part of ChatOps with a Hipchat server as a target.
- This callback plugin sends status updates to a HipChat channel during playbook execution.
requirements:
- xmpp (Python library U(https://github.com/ArchipelProject/xmpppy))
options:
server:
description: Connection info to Jabber server.
type: str
required: true
env:
- name: JABBER_SERV
user:
description: Jabber user to authenticate as.
type: str
required: true
env:
- name: JABBER_USER
password:
description: Password for the user to the Jabber server.
type: str
required: true
env:
- name: JABBER_PASS
to:
description: Chat identifier that will receive the message.
type: str
required: true
env:
- name: JABBER_TO
"""
import os

View File

@@ -7,27 +7,27 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: log_plays
type: notification
short_description: write playbook output to log file
description:
- This callback writes playbook output to a file per host in the C(/var/log/ansible/hosts) directory.
requirements:
- Whitelist in configuration
- A writeable C(/var/log/ansible/hosts) directory by the user executing Ansible on the controller
options:
log_folder:
default: /var/log/ansible/hosts
description: The folder where log files will be created.
type: str
env:
- name: ANSIBLE_LOG_FOLDER
ini:
- section: callback_log_plays
key: log_folder
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: log_plays
type: notification
short_description: write playbook output to log file
description:
- This callback writes playbook output to a file per host in the C(/var/log/ansible/hosts) directory.
requirements:
- Whitelist in configuration
- A writeable C(/var/log/ansible/hosts) directory by the user executing Ansible on the controller
options:
log_folder:
default: /var/log/ansible/hosts
description: The folder where log files will be created.
type: str
env:
- name: ANSIBLE_LOG_FOLDER
ini:
- section: callback_log_plays
key: log_folder
"""
import os
import time

View File

@@ -6,41 +6,41 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
name: loganalytics
type: notification
short_description: Posts task results to Azure Log Analytics
author: "Cyrus Li (@zhcli) <cyrus1006@gmail.com>"
description:
- This callback plugin will post task results in JSON formatted to an Azure Log Analytics workspace.
- Credits to authors of splunk callback plugin.
version_added: "2.4.0"
requirements:
- Whitelisting this callback plugin.
- An Azure log analytics work space has been established.
options:
workspace_id:
description: Workspace ID of the Azure log analytics workspace.
type: str
required: true
env:
- name: WORKSPACE_ID
ini:
- section: callback_loganalytics
key: workspace_id
shared_key:
description: Shared key to connect to Azure log analytics workspace.
type: str
required: true
env:
- name: WORKSPACE_SHARED_KEY
ini:
- section: callback_loganalytics
key: shared_key
'''
DOCUMENTATION = r"""
name: loganalytics
type: notification
short_description: Posts task results to Azure Log Analytics
author: "Cyrus Li (@zhcli) <cyrus1006@gmail.com>"
description:
- This callback plugin will post task results in JSON formatted to an Azure Log Analytics workspace.
- Credits to authors of splunk callback plugin.
version_added: "2.4.0"
requirements:
- Whitelisting this callback plugin.
- An Azure log analytics work space has been established.
options:
workspace_id:
description: Workspace ID of the Azure log analytics workspace.
type: str
required: true
env:
- name: WORKSPACE_ID
ini:
- section: callback_loganalytics
key: workspace_id
shared_key:
description: Shared key to connect to Azure log analytics workspace.
type: str
required: true
env:
- name: WORKSPACE_SHARED_KEY
ini:
- section: callback_loganalytics
key: shared_key
"""
EXAMPLES = '''
examples: |
EXAMPLES = r"""
examples: |-
Whitelist the plugin in ansible.cfg:
[defaults]
callback_whitelist = community.general.loganalytics
@@ -51,7 +51,7 @@ examples: |
[callback_loganalytics]
workspace_id = 01234567-0123-0123-0123-01234567890a
shared_key = dZD0kCbKl3ehZG6LHFMuhtE0yHiFCmetzFMc2u+roXIUQuatqU924SsAAAAPemhjbGlAemhjbGktTUJQAQIDBA==
'''
"""
import hashlib
import hmac

View File

@@ -6,56 +6,56 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: logdna
type: notification
short_description: Sends playbook logs to LogDNA
description:
- This callback will report logs from playbook actions, tasks, and events to LogDNA (U(https://app.logdna.com)).
requirements:
- LogDNA Python Library (U(https://github.com/logdna/python))
- whitelisting in configuration
options:
conf_key:
required: true
description: LogDNA Ingestion Key.
type: string
env:
- name: LOGDNA_INGESTION_KEY
ini:
- section: callback_logdna
key: conf_key
plugin_ignore_errors:
required: false
description: Whether to ignore errors on failing or not.
type: boolean
env:
- name: ANSIBLE_IGNORE_ERRORS
ini:
- section: callback_logdna
key: plugin_ignore_errors
default: false
conf_hostname:
required: false
description: Alternative Host Name; the current host name by default.
type: string
env:
- name: LOGDNA_HOSTNAME
ini:
- section: callback_logdna
key: conf_hostname
conf_tags:
required: false
description: Tags.
type: string
env:
- name: LOGDNA_TAGS
ini:
- section: callback_logdna
key: conf_tags
default: ansible
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: logdna
type: notification
short_description: Sends playbook logs to LogDNA
description:
- This callback will report logs from playbook actions, tasks, and events to LogDNA (U(https://app.logdna.com)).
requirements:
- LogDNA Python Library (U(https://github.com/logdna/python))
- whitelisting in configuration
options:
conf_key:
required: true
description: LogDNA Ingestion Key.
type: string
env:
- name: LOGDNA_INGESTION_KEY
ini:
- section: callback_logdna
key: conf_key
plugin_ignore_errors:
required: false
description: Whether to ignore errors on failing or not.
type: boolean
env:
- name: ANSIBLE_IGNORE_ERRORS
ini:
- section: callback_logdna
key: plugin_ignore_errors
default: false
conf_hostname:
required: false
description: Alternative Host Name; the current host name by default.
type: string
env:
- name: LOGDNA_HOSTNAME
ini:
- section: callback_logdna
key: conf_hostname
conf_tags:
required: false
description: Tags.
type: string
env:
- name: LOGDNA_TAGS
ini:
- section: callback_logdna
key: conf_tags
default: ansible
"""
import logging
import json

View File

@@ -6,79 +6,77 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: logentries
type: notification
short_description: Sends events to Logentries
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: logentries
type: notification
short_description: Sends events to Logentries
description:
- This callback plugin will generate JSON objects and send them to Logentries using TCP for auditing/debugging purposes.
requirements:
- whitelisting in configuration
- certifi (Python library)
- flatdict (Python library), if you want to use the O(flatten) option
options:
api:
description: URI to the Logentries API.
type: str
env:
- name: LOGENTRIES_API
default: data.logentries.com
ini:
- section: callback_logentries
key: api
port:
description: HTTP port to use when connecting to the API.
type: int
env:
- name: LOGENTRIES_PORT
default: 80
ini:
- section: callback_logentries
key: port
tls_port:
description: Port to use when connecting to the API when TLS is enabled.
type: int
env:
- name: LOGENTRIES_TLS_PORT
default: 443
ini:
- section: callback_logentries
key: tls_port
token:
description: The logentries C(TCP token).
type: str
env:
- name: LOGENTRIES_ANSIBLE_TOKEN
required: true
ini:
- section: callback_logentries
key: token
use_tls:
description:
- This callback plugin will generate JSON objects and send them to Logentries via TCP for auditing/debugging purposes.
- Before 2.4, if you wanted to use an ini configuration, the file must be placed in the same directory as this plugin and named C(logentries.ini).
- In 2.4 and above you can just put it in the main Ansible configuration file.
requirements:
- whitelisting in configuration
- certifi (Python library)
- flatdict (Python library), if you want to use the O(flatten) option
options:
api:
description: URI to the Logentries API.
type: str
env:
- name: LOGENTRIES_API
default: data.logentries.com
ini:
- section: callback_logentries
key: api
port:
description: HTTP port to use when connecting to the API.
type: int
env:
- name: LOGENTRIES_PORT
default: 80
ini:
- section: callback_logentries
key: port
tls_port:
description: Port to use when connecting to the API when TLS is enabled.
type: int
env:
- name: LOGENTRIES_TLS_PORT
default: 443
ini:
- section: callback_logentries
key: tls_port
token:
description: The logentries C(TCP token).
type: str
env:
- name: LOGENTRIES_ANSIBLE_TOKEN
required: true
ini:
- section: callback_logentries
key: token
use_tls:
description:
- Toggle to decide whether to use TLS to encrypt the communications with the API server.
env:
- name: LOGENTRIES_USE_TLS
default: false
type: boolean
ini:
- section: callback_logentries
key: use_tls
flatten:
description: Flatten complex data structures into a single dictionary with complex keys.
type: boolean
default: false
env:
- name: LOGENTRIES_FLATTEN
ini:
- section: callback_logentries
key: flatten
'''
- Toggle to decide whether to use TLS to encrypt the communications with the API server.
env:
- name: LOGENTRIES_USE_TLS
default: false
type: boolean
ini:
- section: callback_logentries
key: use_tls
flatten:
description: Flatten complex data structures into a single dictionary with complex keys.
type: boolean
default: false
env:
- name: LOGENTRIES_FLATTEN
ini:
- section: callback_logentries
key: flatten
"""
EXAMPLES = '''
examples: >
EXAMPLES = r"""
examples: >-
To enable, add this to your ansible.cfg file in the defaults block
[defaults]
@@ -97,7 +95,7 @@ examples: >
use_tls = true
token = dd21fc88-f00a-43ff-b977-e3a4233c53af
flatten = false
'''
"""
import os
import socket

View File

@@ -7,95 +7,94 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = r'''
author: Yevhen Khmelenko (@ujenmr)
name: logstash
type: notification
short_description: Sends events to Logstash
description:
- This callback will report facts and task events to Logstash U(https://www.elastic.co/products/logstash).
requirements:
- whitelisting in configuration
- logstash (Python library)
options:
server:
description: Address of the Logstash server.
type: str
env:
- name: LOGSTASH_SERVER
ini:
- section: callback_logstash
key: server
version_added: 1.0.0
default: localhost
port:
description: Port on which logstash is listening.
type: int
env:
- name: LOGSTASH_PORT
ini:
- section: callback_logstash
key: port
version_added: 1.0.0
default: 5000
type:
description: Message type.
type: str
env:
- name: LOGSTASH_TYPE
ini:
- section: callback_logstash
key: type
version_added: 1.0.0
default: ansible
pre_command:
description: Executes command before run and its result is added to the C(ansible_pre_command_output) logstash field.
type: str
version_added: 2.0.0
ini:
- section: callback_logstash
key: pre_command
env:
- name: LOGSTASH_PRE_COMMAND
format_version:
description: Logging format.
type: str
version_added: 2.0.0
ini:
- section: callback_logstash
key: format_version
env:
- name: LOGSTASH_FORMAT_VERSION
default: v1
choices:
- v1
- v2
DOCUMENTATION = r"""
author: Yevhen Khmelenko (@ujenmr)
name: logstash
type: notification
short_description: Sends events to Logstash
description:
- This callback will report facts and task events to Logstash U(https://www.elastic.co/products/logstash).
requirements:
- whitelisting in configuration
- logstash (Python library)
options:
server:
description: Address of the Logstash server.
type: str
env:
- name: LOGSTASH_SERVER
ini:
- section: callback_logstash
key: server
version_added: 1.0.0
default: localhost
port:
description: Port on which logstash is listening.
type: int
env:
- name: LOGSTASH_PORT
ini:
- section: callback_logstash
key: port
version_added: 1.0.0
default: 5000
type:
description: Message type.
type: str
env:
- name: LOGSTASH_TYPE
ini:
- section: callback_logstash
key: type
version_added: 1.0.0
default: ansible
pre_command:
description: Executes command before run and its result is added to the C(ansible_pre_command_output) logstash field.
type: str
version_added: 2.0.0
ini:
- section: callback_logstash
key: pre_command
env:
- name: LOGSTASH_PRE_COMMAND
format_version:
description: Logging format.
type: str
version_added: 2.0.0
ini:
- section: callback_logstash
key: format_version
env:
- name: LOGSTASH_FORMAT_VERSION
default: v1
choices:
- v1
- v2
"""
'''
EXAMPLES = r'''
EXAMPLES = r"""
ansible.cfg: |
# Enable Callback plugin
[defaults]
callback_whitelist = community.general.logstash
# Enable Callback plugin
[defaults]
callback_whitelist = community.general.logstash
[callback_logstash]
server = logstash.example.com
port = 5000
pre_command = git rev-parse HEAD
type = ansible
[callback_logstash]
server = logstash.example.com
port = 5000
pre_command = git rev-parse HEAD
type = ansible
11-input-tcp.conf: |
# Enable Logstash TCP Input
input {
tcp {
port => 5000
codec => json
add_field => { "[@metadata][beat]" => "notify" }
add_field => { "[@metadata][type]" => "ansible" }
}
}
'''
11-input-tcp.conf: |-
# Enable Logstash TCP Input
input {
tcp {
port => 5000
codec => json
add_field => { "[@metadata][beat]" => "notify" }
add_field => { "[@metadata][type]" => "ansible" }
}
}
"""
import os
import json

View File

@@ -7,81 +7,80 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r"""
name: mail
type: notification
short_description: Sends failure events via email
short_description: Sends failure events through email
description:
- This callback will report failures via email.
- This callback will report failures through email.
author:
- Dag Wieers (@dagwieers)
- Dag Wieers (@dagwieers)
requirements:
- whitelisting in configuration
- whitelisting in configuration
options:
mta:
description:
- Mail Transfer Agent, server that accepts SMTP.
- Mail Transfer Agent, server that accepts SMTP.
type: str
env:
- name: SMTPHOST
- name: SMTPHOST
ini:
- section: callback_mail
key: smtphost
- section: callback_mail
key: smtphost
default: localhost
mtaport:
description:
- Mail Transfer Agent Port.
- Port at which server SMTP.
- Mail Transfer Agent Port.
- Port at which server SMTP.
type: int
ini:
- section: callback_mail
key: smtpport
- section: callback_mail
key: smtpport
default: 25
to:
description:
- Mail recipient.
- Mail recipient.
type: list
elements: str
ini:
- section: callback_mail
key: to
- section: callback_mail
key: to
default: [root]
sender:
description:
- Mail sender.
- This is required since community.general 6.0.0.
- Mail sender.
- This is required since community.general 6.0.0.
type: str
required: true
ini:
- section: callback_mail
key: sender
- section: callback_mail
key: sender
cc:
description:
- CC'd recipients.
- CC'd recipients.
type: list
elements: str
ini:
- section: callback_mail
key: cc
- section: callback_mail
key: cc
bcc:
description:
- BCC'd recipients.
- BCC'd recipients.
type: list
elements: str
ini:
- section: callback_mail
key: bcc
- section: callback_mail
key: bcc
message_id_domain:
description:
- The domain name to use for the L(Message-ID header, https://en.wikipedia.org/wiki/Message-ID).
- The default is the hostname of the control node.
- The domain name to use for the L(Message-ID header, https://en.wikipedia.org/wiki/Message-ID).
- The default is the hostname of the control node.
type: str
ini:
- section: callback_mail
key: message_id_domain
- section: callback_mail
key: message_id_domain
version_added: 8.2.0
'''
"""
import json
import os

View File

@@ -7,65 +7,65 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
name: nrdp
type: notification
author: "Remi VERCHERE (@rverchere)"
short_description: Post task results to a Nagios server through nrdp
description:
- This callback send playbook result to Nagios.
- Nagios shall use NRDP to receive passive events.
- The passive check is sent to a dedicated host/service for Ansible.
options:
url:
description: URL of the nrdp server.
required: true
env:
- name : NRDP_URL
ini:
- section: callback_nrdp
key: url
type: string
validate_certs:
description: Validate the SSL certificate of the nrdp server. (Used for HTTPS URLs.)
env:
- name: NRDP_VALIDATE_CERTS
ini:
- section: callback_nrdp
key: validate_nrdp_certs
- section: callback_nrdp
key: validate_certs
type: boolean
default: false
aliases: [ validate_nrdp_certs ]
token:
description: Token to be allowed to push nrdp events.
required: true
env:
- name: NRDP_TOKEN
ini:
- section: callback_nrdp
key: token
type: string
hostname:
description: Hostname where the passive check is linked to.
required: true
env:
- name : NRDP_HOSTNAME
ini:
- section: callback_nrdp
key: hostname
type: string
servicename:
description: Service where the passive check is linked to.
required: true
env:
- name : NRDP_SERVICENAME
ini:
- section: callback_nrdp
key: servicename
type: string
'''
DOCUMENTATION = r"""
name: nrdp
type: notification
author: "Remi VERCHERE (@rverchere)"
short_description: Post task results to a Nagios server through nrdp
description:
- This callback send playbook result to Nagios.
- Nagios shall use NRDP to receive passive events.
- The passive check is sent to a dedicated host/service for Ansible.
options:
url:
description: URL of the nrdp server.
required: true
env:
- name: NRDP_URL
ini:
- section: callback_nrdp
key: url
type: string
validate_certs:
description: Validate the SSL certificate of the nrdp server. (Used for HTTPS URLs).
env:
- name: NRDP_VALIDATE_CERTS
ini:
- section: callback_nrdp
key: validate_nrdp_certs
- section: callback_nrdp
key: validate_certs
type: boolean
default: false
aliases: [validate_nrdp_certs]
token:
description: Token to be allowed to push nrdp events.
required: true
env:
- name: NRDP_TOKEN
ini:
- section: callback_nrdp
key: token
type: string
hostname:
description: Hostname where the passive check is linked to.
required: true
env:
- name: NRDP_HOSTNAME
ini:
- section: callback_nrdp
key: hostname
type: string
servicename:
description: Service where the passive check is linked to.
required: true
env:
- name: NRDP_SERVICENAME
ini:
- section: callback_nrdp
key: servicename
type: string
"""
from ansible.module_utils.six.moves.urllib.parse import urlencode
from ansible.module_utils.common.text.converters import to_bytes

View File

@@ -7,16 +7,16 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: 'null'
type: stdout
requirements:
- set as main display callback
short_description: Don't display stuff to screen
description:
- This callback prevents outputting events to screen.
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: 'null'
type: stdout
requirements:
- set as main display callback
short_description: do not display stuff to screen
description:
- This callback prevents outputting events to screen.
"""
from ansible.plugins.callback import CallbackBase

View File

@@ -6,119 +6,120 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Victor Martinez (@v1v) <VictorMartinezRubio@gmail.com>
name: opentelemetry
type: notification
short_description: Create distributed traces with OpenTelemetry
version_added: 3.7.0
DOCUMENTATION = r"""
author: Victor Martinez (@v1v) <VictorMartinezRubio@gmail.com>
name: opentelemetry
type: notification
short_description: Create distributed traces with OpenTelemetry
version_added: 3.7.0
description:
- This callback creates distributed traces for each Ansible task with OpenTelemetry.
- You can configure the OpenTelemetry exporter and SDK with environment variables.
- See U(https://opentelemetry-python.readthedocs.io/en/latest/exporter/otlp/otlp.html).
- See
U(https://opentelemetry-python.readthedocs.io/en/latest/sdk/environment_variables.html#opentelemetry-sdk-environment-variables).
options:
hide_task_arguments:
default: false
type: bool
description:
- This callback creates distributed traces for each Ansible task with OpenTelemetry.
- You can configure the OpenTelemetry exporter and SDK with environment variables.
- See U(https://opentelemetry-python.readthedocs.io/en/latest/exporter/otlp/otlp.html).
- See U(https://opentelemetry-python.readthedocs.io/en/latest/sdk/environment_variables.html#opentelemetry-sdk-environment-variables).
options:
hide_task_arguments:
default: false
type: bool
description:
- Hide the arguments for a task.
env:
- name: ANSIBLE_OPENTELEMETRY_HIDE_TASK_ARGUMENTS
ini:
- section: callback_opentelemetry
key: hide_task_arguments
version_added: 5.3.0
enable_from_environment:
type: str
description:
- Whether to enable this callback only if the given environment variable exists and it is set to V(true).
- This is handy when you use Configuration as Code and want to send distributed traces
if running in the CI rather when running Ansible locally.
- For such, it evaluates the given O(enable_from_environment) value as environment variable
and if set to true this plugin will be enabled.
env:
- name: ANSIBLE_OPENTELEMETRY_ENABLE_FROM_ENVIRONMENT
ini:
- section: callback_opentelemetry
key: enable_from_environment
version_added: 5.3.0
version_added: 3.8.0
otel_service_name:
default: ansible
type: str
description:
- The service name resource attribute.
env:
- name: OTEL_SERVICE_NAME
ini:
- section: callback_opentelemetry
key: otel_service_name
version_added: 5.3.0
traceparent:
default: None
type: str
description:
- The L(W3C Trace Context header traceparent,https://www.w3.org/TR/trace-context-1/#traceparent-header).
env:
- name: TRACEPARENT
disable_logs:
default: false
type: bool
description:
- Disable sending logs.
env:
- name: ANSIBLE_OPENTELEMETRY_DISABLE_LOGS
ini:
- section: callback_opentelemetry
key: disable_logs
version_added: 5.8.0
disable_attributes_in_logs:
default: false
type: bool
description:
- Disable populating span attributes to the logs.
env:
- name: ANSIBLE_OPENTELEMETRY_DISABLE_ATTRIBUTES_IN_LOGS
ini:
- section: callback_opentelemetry
key: disable_attributes_in_logs
version_added: 7.1.0
store_spans_in_file:
type: str
description:
- It stores the exported spans in the given file
env:
- name: ANSIBLE_OPENTELEMETRY_STORE_SPANS_IN_FILE
ini:
- section: callback_opentelemetry
key: store_spans_in_file
version_added: 9.0.0
otel_exporter_otlp_traces_protocol:
type: str
description:
- E(OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) represents the the transport protocol for spans.
- See
U(https://opentelemetry-python.readthedocs.io/en/latest/sdk/environment_variables.html#envvar-OTEL_EXPORTER_OTLP_TRACES_PROTOCOL).
default: grpc
choices:
- grpc
- http/protobuf
env:
- name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
ini:
- section: callback_opentelemetry
key: otel_exporter_otlp_traces_protocol
version_added: 9.0.0
requirements:
- opentelemetry-api (Python library)
- opentelemetry-exporter-otlp (Python library)
- opentelemetry-sdk (Python library)
'''
- Hide the arguments for a task.
env:
- name: ANSIBLE_OPENTELEMETRY_HIDE_TASK_ARGUMENTS
ini:
- section: callback_opentelemetry
key: hide_task_arguments
version_added: 5.3.0
enable_from_environment:
type: str
description:
- Whether to enable this callback only if the given environment variable exists and it is set to V(true).
- This is handy when you use Configuration as Code and want to send distributed traces if running in the CI rather when
running Ansible locally.
- For such, it evaluates the given O(enable_from_environment) value as environment variable and if set to true this
plugin will be enabled.
env:
- name: ANSIBLE_OPENTELEMETRY_ENABLE_FROM_ENVIRONMENT
ini:
- section: callback_opentelemetry
key: enable_from_environment
version_added: 5.3.0
version_added: 3.8.0
otel_service_name:
default: ansible
type: str
description:
- The service name resource attribute.
env:
- name: OTEL_SERVICE_NAME
ini:
- section: callback_opentelemetry
key: otel_service_name
version_added: 5.3.0
traceparent:
default: None
type: str
description:
- The L(W3C Trace Context header traceparent,https://www.w3.org/TR/trace-context-1/#traceparent-header).
env:
- name: TRACEPARENT
disable_logs:
default: false
type: bool
description:
- Disable sending logs.
env:
- name: ANSIBLE_OPENTELEMETRY_DISABLE_LOGS
ini:
- section: callback_opentelemetry
key: disable_logs
version_added: 5.8.0
disable_attributes_in_logs:
default: false
type: bool
description:
- Disable populating span attributes to the logs.
env:
- name: ANSIBLE_OPENTELEMETRY_DISABLE_ATTRIBUTES_IN_LOGS
ini:
- section: callback_opentelemetry
key: disable_attributes_in_logs
version_added: 7.1.0
store_spans_in_file:
type: str
description:
- It stores the exported spans in the given file.
env:
- name: ANSIBLE_OPENTELEMETRY_STORE_SPANS_IN_FILE
ini:
- section: callback_opentelemetry
key: store_spans_in_file
version_added: 9.0.0
otel_exporter_otlp_traces_protocol:
type: str
description:
- E(OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) represents the the transport protocol for spans.
- See
U(https://opentelemetry-python.readthedocs.io/en/latest/sdk/environment_variables.html#envvar-OTEL_EXPORTER_OTLP_TRACES_PROTOCOL).
default: grpc
choices:
- grpc
- http/protobuf
env:
- name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
ini:
- section: callback_opentelemetry
key: otel_exporter_otlp_traces_protocol
version_added: 9.0.0
requirements:
- opentelemetry-api (Python library)
- opentelemetry-exporter-otlp (Python library)
- opentelemetry-sdk (Python library)
"""
EXAMPLES = '''
examples: |
EXAMPLES = r"""
examples: |-
Enable the plugin in ansible.cfg:
[defaults]
callbacks_enabled = community.general.opentelemetry
@@ -130,7 +131,7 @@ examples: |
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer your_otel_token"
export OTEL_SERVICE_NAME=your_service_name
export ANSIBLE_OPENTELEMETRY_ENABLED=true
'''
"""
import getpass
import json

View File

@@ -8,17 +8,17 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: say
type: notification
requirements:
- whitelisting in configuration
- the C(/usr/bin/say) command line program (standard on macOS) or C(espeak) command line program
short_description: notify using software speech synthesizer
description:
- This plugin will use the C(say) or C(espeak) program to "speak" about play events.
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: say
type: notification
requirements:
- whitelisting in configuration
- the C(/usr/bin/say) command line program (standard on macOS) or C(espeak) command line program
short_description: notify using software speech synthesizer
description:
- This plugin will use the C(say) or C(espeak) program to "speak" about play events.
"""
import platform
import subprocess

View File

@@ -7,35 +7,35 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: selective
type: stdout
requirements:
- set as main display callback
short_description: only print certain tasks
description:
- This callback only prints tasks that have been tagged with C(print_action) or that have failed.
This allows operators to focus on the tasks that provide value only.
- Tasks that are not printed are placed with a C(.).
- If you increase verbosity all tasks are printed.
options:
nocolor:
default: false
description: This setting allows suppressing colorizing output.
env:
- name: ANSIBLE_NOCOLOR
- name: ANSIBLE_SELECTIVE_DONT_COLORIZE
ini:
- section: defaults
key: nocolor
type: boolean
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: selective
type: stdout
requirements:
- set as main display callback
short_description: only print certain tasks
description:
- This callback only prints tasks that have been tagged with C(print_action) or that have failed. This allows operators
to focus on the tasks that provide value only.
- Tasks that are not printed are placed with a C(.).
- If you increase verbosity all tasks are printed.
options:
nocolor:
default: false
description: This setting allows suppressing colorizing output.
env:
- name: ANSIBLE_NOCOLOR
- name: ANSIBLE_SELECTIVE_DONT_COLORIZE
ini:
- section: defaults
key: nocolor
type: boolean
"""
EXAMPLES = """
- ansible.builtin.debug: msg="This will not be printed"
- ansible.builtin.debug: msg="But this will"
tags: [print_action]
EXAMPLES = r"""
- ansible.builtin.debug: msg="This will not be printed"
- ansible.builtin.debug: msg="But this will"
tags: [print_action]
"""
import difflib

View File

@@ -8,54 +8,54 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: slack
type: notification
requirements:
- whitelist in configuration
- prettytable (python library)
short_description: Sends play events to a Slack channel
description:
- This is an ansible callback plugin that sends status updates to a Slack channel during playbook execution.
options:
webhook_url:
required: true
description: Slack Webhook URL.
type: str
env:
- name: SLACK_WEBHOOK_URL
ini:
- section: callback_slack
key: webhook_url
channel:
default: "#ansible"
description: Slack room to post in.
type: str
env:
- name: SLACK_CHANNEL
ini:
- section: callback_slack
key: channel
username:
description: Username to post as.
type: str
env:
- name: SLACK_USERNAME
default: ansible
ini:
- section: callback_slack
key: username
validate_certs:
description: Validate the SSL certificate of the Slack server for HTTPS URLs.
env:
- name: SLACK_VALIDATE_CERTS
ini:
- section: callback_slack
key: validate_certs
default: true
type: bool
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: slack
type: notification
requirements:
- whitelist in configuration
- prettytable (python library)
short_description: Sends play events to a Slack channel
description:
- This is an ansible callback plugin that sends status updates to a Slack channel during playbook execution.
options:
webhook_url:
required: true
description: Slack Webhook URL.
type: str
env:
- name: SLACK_WEBHOOK_URL
ini:
- section: callback_slack
key: webhook_url
channel:
default: "#ansible"
description: Slack room to post in.
type: str
env:
- name: SLACK_CHANNEL
ini:
- section: callback_slack
key: channel
username:
description: Username to post as.
type: str
env:
- name: SLACK_USERNAME
default: ansible
ini:
- section: callback_slack
key: username
validate_certs:
description: Validate the SSL certificate of the Slack server for HTTPS URLs.
env:
- name: SLACK_VALIDATE_CERTS
ini:
- section: callback_slack
key: validate_certs
default: true
type: bool
"""
import json
import os

View File

@@ -6,73 +6,73 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
name: splunk
type: notification
short_description: Sends task result events to Splunk HTTP Event Collector
author: "Stuart Hirst (!UNKNOWN) <support@convergingdata.com>"
DOCUMENTATION = r"""
name: splunk
type: notification
short_description: Sends task result events to Splunk HTTP Event Collector
author: "Stuart Hirst (!UNKNOWN) <support@convergingdata.com>"
description:
- This callback plugin will send task results as JSON formatted events to a Splunk HTTP collector.
- The companion Splunk Monitoring & Diagnostics App is available here U(https://splunkbase.splunk.com/app/4023/).
- Credit to "Ryan Currah (@ryancurrah)" for original source upon which this is based.
requirements:
- Whitelisting this callback plugin
- 'Create a HTTP Event Collector in Splunk'
- 'Define the URL and token in C(ansible.cfg)'
options:
url:
description: URL to the Splunk HTTP collector source.
type: str
env:
- name: SPLUNK_URL
ini:
- section: callback_splunk
key: url
authtoken:
description: Token to authenticate the connection to the Splunk HTTP collector.
type: str
env:
- name: SPLUNK_AUTHTOKEN
ini:
- section: callback_splunk
key: authtoken
validate_certs:
description: Whether to validate certificates for connections to HEC. It is not recommended to set to V(false) except
when you are sure that nobody can intercept the connection between this plugin and HEC, as setting it to V(false) allows
man-in-the-middle attacks!
env:
- name: SPLUNK_VALIDATE_CERTS
ini:
- section: callback_splunk
key: validate_certs
type: bool
default: true
version_added: '1.0.0'
include_milliseconds:
description: Whether to include milliseconds as part of the generated timestamp field in the event sent to the Splunk
HTTP collector.
env:
- name: SPLUNK_INCLUDE_MILLISECONDS
ini:
- section: callback_splunk
key: include_milliseconds
type: bool
default: false
version_added: 2.0.0
batch:
description:
- This callback plugin will send task results as JSON formatted events to a Splunk HTTP collector.
- The companion Splunk Monitoring & Diagnostics App is available here U(https://splunkbase.splunk.com/app/4023/).
- Credit to "Ryan Currah (@ryancurrah)" for original source upon which this is based.
requirements:
- Whitelisting this callback plugin
- 'Create a HTTP Event Collector in Splunk'
- 'Define the URL and token in C(ansible.cfg)'
options:
url:
description: URL to the Splunk HTTP collector source.
type: str
env:
- name: SPLUNK_URL
ini:
- section: callback_splunk
key: url
authtoken:
description: Token to authenticate the connection to the Splunk HTTP collector.
type: str
env:
- name: SPLUNK_AUTHTOKEN
ini:
- section: callback_splunk
key: authtoken
validate_certs:
description: Whether to validate certificates for connections to HEC. It is not recommended to set to
V(false) except when you are sure that nobody can intercept the connection
between this plugin and HEC, as setting it to V(false) allows man-in-the-middle attacks!
env:
- name: SPLUNK_VALIDATE_CERTS
ini:
- section: callback_splunk
key: validate_certs
type: bool
default: true
version_added: '1.0.0'
include_milliseconds:
description: Whether to include milliseconds as part of the generated timestamp field in the event
sent to the Splunk HTTP collector.
env:
- name: SPLUNK_INCLUDE_MILLISECONDS
ini:
- section: callback_splunk
key: include_milliseconds
type: bool
default: false
version_added: 2.0.0
batch:
description:
- Correlation ID which can be set across multiple playbook executions.
env:
- name: SPLUNK_BATCH
ini:
- section: callback_splunk
key: batch
type: str
version_added: 3.3.0
'''
- Correlation ID which can be set across multiple playbook executions.
env:
- name: SPLUNK_BATCH
ini:
- section: callback_splunk
key: batch
type: str
version_added: 3.3.0
"""
EXAMPLES = '''
examples: >
EXAMPLES = r"""
examples: >-
To enable, add this to your ansible.cfg file in the defaults block
[defaults]
callback_whitelist = community.general.splunk
@@ -83,7 +83,7 @@ examples: >
[callback_splunk]
url = http://mysplunkinstance.datapaas.io:8088/services/collector/event
authtoken = f23blad6-5965-4537-bf69-5b5a545blabla88
'''
"""
import json
import uuid

View File

@@ -6,7 +6,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = r'''
DOCUMENTATION = r"""
name: sumologic
type: notification
short_description: Sends task result events to Sumologic
@@ -15,8 +15,8 @@ description:
- This callback plugin will send task results as JSON formatted events to a Sumologic HTTP collector source.
requirements:
- Whitelisting this callback plugin
- 'Create a HTTP collector source in Sumologic and specify a custom timestamp format of V(yyyy-MM-dd HH:mm:ss ZZZZ) and a custom timestamp locator
of V("timestamp": "(.*\)")'
- 'Create a HTTP collector source in Sumologic and specify a custom timestamp format of V(yyyy-MM-dd HH:mm:ss ZZZZ) and
a custom timestamp locator of V("timestamp": "(.*\)")'
options:
url:
description: URL to the Sumologic HTTP collector source.
@@ -26,10 +26,10 @@ options:
ini:
- section: callback_sumologic
key: url
'''
"""
EXAMPLES = '''
examples: |
EXAMPLES = r"""
examples: |-
To enable, add this to your ansible.cfg file in the defaults block
[defaults]
callback_whitelist = community.general.sumologic
@@ -40,7 +40,7 @@ examples: |
Set the ansible.cfg variable in the callback_sumologic block
[callback_sumologic]
url = https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/R8moSv1d8EW9LAUFZJ6dbxCFxwLH6kfCdcBfddlfxCbLuL-BN5twcTpMk__pYy_cDmp==
'''
"""
import json
import uuid

View File

@@ -7,54 +7,54 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: syslog_json
type: notification
requirements:
- whitelist in configuration
short_description: sends JSON events to syslog
description:
- This plugin logs ansible-playbook and ansible runs to a syslog server in JSON format.
options:
server:
description: Syslog server that will receive the event.
type: str
env:
- name: SYSLOG_SERVER
default: localhost
ini:
- section: callback_syslog_json
key: syslog_server
port:
description: Port on which the syslog server is listening.
type: int
env:
- name: SYSLOG_PORT
default: 514
ini:
- section: callback_syslog_json
key: syslog_port
facility:
description: Syslog facility to log as.
type: str
env:
- name: SYSLOG_FACILITY
default: user
ini:
- section: callback_syslog_json
key: syslog_facility
setup:
description: Log setup tasks.
env:
- name: ANSIBLE_SYSLOG_SETUP
type: bool
default: true
ini:
- section: callback_syslog_json
key: syslog_setup
version_added: 4.5.0
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: syslog_json
type: notification
requirements:
- whitelist in configuration
short_description: sends JSON events to syslog
description:
- This plugin logs ansible-playbook and ansible runs to a syslog server in JSON format.
options:
server:
description: Syslog server that will receive the event.
type: str
env:
- name: SYSLOG_SERVER
default: localhost
ini:
- section: callback_syslog_json
key: syslog_server
port:
description: Port on which the syslog server is listening.
type: int
env:
- name: SYSLOG_PORT
default: 514
ini:
- section: callback_syslog_json
key: syslog_port
facility:
description: Syslog facility to log as.
type: str
env:
- name: SYSLOG_FACILITY
default: user
ini:
- section: callback_syslog_json
key: syslog_facility
setup:
description: Log setup tasks.
env:
- name: ANSIBLE_SYSLOG_SETUP
type: bool
default: true
ini:
- section: callback_syslog_json
key: syslog_setup
version_added: 4.5.0
"""
import logging
import logging.handlers

View File

@@ -10,46 +10,45 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r"""
name: timestamp
type: stdout
short_description: Adds simple timestamp for each header
version_added: 9.0.0
description:
- This callback adds simple timestamp for each header.
author: kurokobo (@kurokobo)
options:
timezone:
description:
- Timezone to use for the timestamp in IANA time zone format.
- For example C(America/New_York), C(Asia/Tokyo)). Ignored on Python < 3.9.
ini:
- section: callback_timestamp
key: timezone
env:
- name: ANSIBLE_CALLBACK_TIMESTAMP_TIMEZONE
type: string
format_string:
description:
- Format of the timestamp shown to user in 1989 C standard format.
- >
Refer to L(the Python documentation,https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes)
for the available format codes.
ini:
- section: callback_timestamp
key: format_string
env:
- name: ANSIBLE_CALLBACK_TIMESTAMP_FORMAT_STRING
default: "%H:%M:%S"
type: string
seealso:
- plugin: ansible.posix.profile_tasks
plugin_type: callback
description: >
You can use P(ansible.posix.profile_tasks#callback) callback plugin to time individual tasks and overall execution time
with detailed timestamps.
extends_documentation_fragment:
- ansible.builtin.default_callback
- ansible.builtin.result_format_callback
name: timestamp
type: stdout
short_description: Adds simple timestamp for each header
version_added: 9.0.0
description:
- This callback adds simple timestamp for each header.
author: kurokobo (@kurokobo)
options:
timezone:
description:
- Timezone to use for the timestamp in IANA time zone format.
- For example V(America/New_York), V(Asia/Tokyo)). Ignored on Python < 3.9.
ini:
- section: callback_timestamp
key: timezone
env:
- name: ANSIBLE_CALLBACK_TIMESTAMP_TIMEZONE
type: string
format_string:
description:
- Format of the timestamp shown to user in 1989 C standard format.
- Refer to L(the Python documentation,https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes)
for the available format codes.
ini:
- section: callback_timestamp
key: format_string
env:
- name: ANSIBLE_CALLBACK_TIMESTAMP_FORMAT_STRING
default: "%H:%M:%S"
type: string
seealso:
- plugin: ansible.posix.profile_tasks
plugin_type: callback
description: >-
You can use P(ansible.posix.profile_tasks#callback) callback plugin to time individual tasks and overall execution time
with detailed timestamps.
extends_documentation_fragment:
- ansible.builtin.default_callback
- ansible.builtin.result_format_callback
"""

View File

@@ -8,18 +8,18 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
name: unixy
type: stdout
author: Al Bowles (@akatch)
short_description: condensed Ansible output
description:
- Consolidated Ansible output in the style of LINUX/UNIX startup logs.
extends_documentation_fragment:
- default_callback
requirements:
- set as stdout in configuration
'''
DOCUMENTATION = r"""
name: unixy
type: stdout
author: Al Bowles (@akatch)
short_description: condensed Ansible output
description:
- Consolidated Ansible output in the style of LINUX/UNIX startup logs.
extends_documentation_fragment:
- default_callback
requirements:
- set as stdout in configuration
"""
from os.path import basename
from ansible import constants as C

View File

@@ -7,29 +7,27 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: yaml
type: stdout
short_description: YAML-ized Ansible screen output
description:
- Ansible output that can be quite a bit easier to read than the
default JSON formatting.
extends_documentation_fragment:
- default_callback
requirements:
- set as stdout in configuration
seealso:
- plugin: ansible.builtin.default
plugin_type: callback
description: >
There is a parameter O(ansible.builtin.default#callback:result_format) in P(ansible.builtin.default#callback)
that allows you to change the output format to YAML.
notes:
- >
With ansible-core 2.13 or newer, you can instead specify V(yaml) for the parameter O(ansible.builtin.default#callback:result_format)
in P(ansible.builtin.default#callback).
'''
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: yaml
type: stdout
short_description: YAML-ized Ansible screen output
description:
- Ansible output that can be quite a bit easier to read than the default JSON formatting.
extends_documentation_fragment:
- default_callback
requirements:
- set as stdout in configuration
seealso:
- plugin: ansible.builtin.default
plugin_type: callback
description: >-
There is a parameter O(ansible.builtin.default#callback:result_format) in P(ansible.builtin.default#callback) that allows
you to change the output format to YAML.
notes:
- With ansible-core 2.13 or newer, you can instead specify V(yaml) for the parameter O(ansible.builtin.default#callback:result_format)
in P(ansible.builtin.default#callback).
"""
import yaml
import json
@@ -51,29 +49,77 @@ def should_use_block(value):
return False
class MyDumper(AnsibleDumper):
def represent_scalar(self, tag, value, style=None):
"""Uses block style for multi-line strings"""
if style is None:
if should_use_block(value):
style = '|'
# we care more about readable than accuracy, so...
# ...no trailing space
value = value.rstrip()
# ...and non-printable characters
value = ''.join(x for x in value if x in string.printable or ord(x) >= 0xA0)
# ...tabs prevent blocks from expanding
value = value.expandtabs()
# ...and odd bits of whitespace
value = re.sub(r'[\x0b\x0c\r]', '', value)
# ...as does trailing space
value = re.sub(r' +\n', '\n', value)
else:
style = self.default_style
node = yaml.representer.ScalarNode(tag, value, style=style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
return node
try:
class MyDumper(AnsibleDumper): # pylint: disable=inherit-non-class
def represent_scalar(self, tag, value, style=None):
"""Uses block style for multi-line strings"""
if style is None:
if should_use_block(value):
style = '|'
# we care more about readable than accuracy, so...
# ...no trailing space
value = value.rstrip()
# ...and non-printable characters
value = ''.join(x for x in value if x in string.printable or ord(x) >= 0xA0)
# ...tabs prevent blocks from expanding
value = value.expandtabs()
# ...and odd bits of whitespace
value = re.sub(r'[\x0b\x0c\r]', '', value)
# ...as does trailing space
value = re.sub(r' +\n', '\n', value)
else:
style = self.default_style
node = yaml.representer.ScalarNode(tag, value, style=style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
return node
except: # noqa: E722, pylint: disable=bare-except
# This happens with Data Tagging, see https://github.com/ansible/ansible/issues/84781
# Until there is a better solution we'll resort to using ansible-core internals.
from ansible._internal._yaml import _dumper
import typing as t
class MyDumper(_dumper._BaseDumper):
# This code is mostly taken from ansible._internal._yaml._dumper
@classmethod
def _register_representers(cls) -> None:
cls.add_multi_representer(_dumper.AnsibleTaggedObject, cls.represent_ansible_tagged_object)
cls.add_multi_representer(_dumper.Tripwire, cls.represent_tripwire)
cls.add_multi_representer(_dumper.c.Mapping, _dumper.SafeRepresenter.represent_dict)
cls.add_multi_representer(_dumper.c.Sequence, _dumper.SafeRepresenter.represent_list)
def represent_ansible_tagged_object(self, data):
if ciphertext := _dumper.VaultHelper.get_ciphertext(data, with_tags=False):
return self.represent_scalar('!vault', ciphertext, style='|')
return self.represent_data(_dumper.AnsibleTagHelper.as_native_type(data)) # automatically decrypts encrypted strings
def represent_tripwire(self, data: _dumper.Tripwire) -> t.NoReturn:
data.trip()
# The following function is the same as in the try/except
def represent_scalar(self, tag, value, style=None):
"""Uses block style for multi-line strings"""
if style is None:
if should_use_block(value):
style = '|'
# we care more about readable than accuracy, so...
# ...no trailing space
value = value.rstrip()
# ...and non-printable characters
value = ''.join(x for x in value if x in string.printable or ord(x) >= 0xA0)
# ...tabs prevent blocks from expanding
value = value.expandtabs()
# ...and odd bits of whitespace
value = re.sub(r'[\x0b\x0c\r]', '', value)
# ...as does trailing space
value = re.sub(r' +\n', '\n', value)
else:
style = self.default_style
node = yaml.representer.ScalarNode(tag, value, style=style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
return node
class CallbackModule(Default):

View File

@@ -10,79 +10,66 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Maykel Moya (!UNKNOWN) <mmoya@speedyrails.com>
name: chroot
short_description: Interact with local chroot
DOCUMENTATION = r"""
author: Maykel Moya (!UNKNOWN) <mmoya@speedyrails.com>
name: chroot
short_description: Interact with local chroot
description:
- Run commands or put/fetch files to an existing chroot on the Ansible controller.
options:
remote_addr:
description:
- Run commands or put/fetch files to an existing chroot on the Ansible controller.
options:
remote_addr:
description:
- The path of the chroot you want to access.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
executable:
description:
- User specified executable shell
type: string
ini:
- section: defaults
key: executable
env:
- name: ANSIBLE_EXECUTABLE
vars:
- name: ansible_executable
default: /bin/sh
chroot_exe:
description:
- User specified chroot binary
type: string
ini:
- section: chroot_connection
key: exe
env:
- name: ANSIBLE_CHROOT_EXE
vars:
- name: ansible_chroot_exe
default: chroot
disable_root_check:
description:
- Do not check that the user is not root.
ini:
- section: chroot_connection
key: disable_root_check
env:
- name: ANSIBLE_CHROOT_DISABLE_ROOT_CHECK
vars:
- name: ansible_chroot_disable_root_check
default: false
type: bool
version_added: 7.3.0
'''
- The path of the chroot you want to access.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
executable:
description:
- User specified executable shell.
type: string
ini:
- section: defaults
key: executable
env:
- name: ANSIBLE_EXECUTABLE
vars:
- name: ansible_executable
default: /bin/sh
chroot_exe:
description:
- User specified chroot binary.
type: string
ini:
- section: chroot_connection
key: exe
env:
- name: ANSIBLE_CHROOT_EXE
vars:
- name: ansible_chroot_exe
default: chroot
disable_root_check:
description:
- Do not check that the user is not root.
ini:
- section: chroot_connection
key: disable_root_check
env:
- name: ANSIBLE_CHROOT_DISABLE_ROOT_CHECK
vars:
- name: ansible_chroot_disable_root_check
default: false
type: bool
version_added: 7.3.0
"""
EXAMPLES = r"""
# Plugin requires root privileges for chroot, -E preserves your env (and location of ~/.ansible):
# sudo -E ansible-playbook ...
#
# Static inventory file
# [chroots]
# /path/to/debootstrap
# /path/to/feboostrap
# /path/to/lxc-image
# /path/to/chroot
# playbook
---
- hosts: chroots
connection: community.general.chroot
tasks:
- debug:
msg: "This is coming from chroot environment"
"""
import os

View File

@@ -9,24 +9,24 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Michael Scherer (@mscherer) <misc@zarb.org>
name: funcd
short_description: Use funcd to connect to target
DOCUMENTATION = r"""
author: Michael Scherer (@mscherer) <misc@zarb.org>
name: funcd
short_description: Use funcd to connect to target
description:
- This transport permits you to use Ansible over Func.
- For people who have already setup func and that wish to play with ansible, this permit to move gradually to ansible without
having to redo completely the setup of the network.
options:
remote_addr:
description:
- This transport permits you to use Ansible over Func.
- For people who have already setup func and that wish to play with ansible,
this permit to move gradually to ansible without having to redo completely the setup of the network.
options:
remote_addr:
description:
- The path of the chroot you want to access.
type: string
default: inventory_hostname
vars:
- name: ansible_host
- name: ansible_func_host
'''
- The path of the chroot you want to access.
type: string
default: inventory_hostname
vars:
- name: ansible_host
- name: ansible_func_host
"""
HAVE_FUNC = False
try:

View File

@@ -8,47 +8,47 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
author: Stéphane Graber (@stgraber)
name: incus
short_description: Run tasks in Incus instances via the Incus CLI.
DOCUMENTATION = r"""
author: Stéphane Graber (@stgraber)
name: incus
short_description: Run tasks in Incus instances using the Incus CLI
description:
- Run commands or put/fetch files to an existing Incus instance using Incus CLI.
version_added: "8.2.0"
options:
remote_addr:
description:
- Run commands or put/fetch files to an existing Incus instance using Incus CLI.
version_added: "8.2.0"
options:
remote_addr:
description:
- The instance identifier.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
- name: ansible_incus_host
executable:
description:
- The shell to use for execution inside the instance.
type: string
default: /bin/sh
vars:
- name: ansible_executable
- name: ansible_incus_executable
remote:
description:
- The name of the Incus remote to use (per C(incus remote list)).
- Remotes are used to access multiple servers from a single client.
type: string
default: local
vars:
- name: ansible_incus_remote
project:
description:
- The name of the Incus project to use (per C(incus project list)).
- Projects are used to divide the instances running on a server.
type: string
default: default
vars:
- name: ansible_incus_project
- The instance identifier.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
- name: ansible_incus_host
executable:
description:
- The shell to use for execution inside the instance.
type: string
default: /bin/sh
vars:
- name: ansible_executable
- name: ansible_incus_executable
remote:
description:
- The name of the Incus remote to use (per C(incus remote list)).
- Remotes are used to access multiple servers from a single client.
type: string
default: local
vars:
- name: ansible_incus_remote
project:
description:
- The name of the Incus project to use (per C(incus project list)).
- Projects are used to divide the instances running on a server.
type: string
default: default
vars:
- name: ansible_incus_project
"""
import os

View File

@@ -10,28 +10,28 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Stephan Lohse (!UNKNOWN) <dev-github@ploek.org>
name: iocage
short_description: Run tasks in iocage jails
DOCUMENTATION = r"""
author: Stephan Lohse (!UNKNOWN) <dev-github@ploek.org>
name: iocage
short_description: Run tasks in iocage jails
description:
- Run commands or put/fetch files to an existing iocage jail.
options:
remote_addr:
description:
- Run commands or put/fetch files to an existing iocage jail
options:
remote_addr:
description:
- Path to the jail
type: string
vars:
- name: ansible_host
- name: ansible_iocage_host
remote_user:
description:
- User to execute as inside the jail
type: string
vars:
- name: ansible_user
- name: ansible_iocage_user
'''
- Path to the jail.
type: string
vars:
- name: ansible_host
- name: ansible_iocage_host
remote_user:
description:
- User to execute as inside the jail.
type: string
vars:
- name: ansible_user
- name: ansible_iocage_user
"""
import subprocess

View File

@@ -10,30 +10,30 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Ansible Core Team
name: jail
short_description: Run tasks in jails
DOCUMENTATION = r"""
author: Ansible Core Team
name: jail
short_description: Run tasks in jails
description:
- Run commands or put/fetch files to an existing jail.
options:
remote_addr:
description:
- Run commands or put/fetch files to an existing jail
options:
remote_addr:
description:
- Path to the jail
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
- name: ansible_jail_host
remote_user:
description:
- User to execute as inside the jail
type: string
vars:
- name: ansible_user
- name: ansible_jail_user
'''
- Path to the jail.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
- name: ansible_jail_host
remote_user:
description:
- User to execute as inside the jail.
type: string
vars:
- name: ansible_user
- name: ansible_jail_user
"""
import os
import os.path

View File

@@ -7,31 +7,31 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Joerg Thalheim (!UNKNOWN) <joerg@higgsboson.tk>
name: lxc
short_description: Run tasks in lxc containers via lxc python library
DOCUMENTATION = r"""
author: Joerg Thalheim (!UNKNOWN) <joerg@higgsboson.tk>
name: lxc
short_description: Run tasks in LXC containers using lxc python library
description:
- Run commands or put/fetch files to an existing LXC container using lxc python library.
options:
remote_addr:
description:
- Run commands or put/fetch files to an existing lxc container using lxc python library
options:
remote_addr:
description:
- Container identifier
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
- name: ansible_lxc_host
executable:
default: /bin/sh
description:
- Shell executable
type: string
vars:
- name: ansible_executable
- name: ansible_lxc_executable
'''
- Container identifier.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
- name: ansible_lxc_host
executable:
default: /bin/sh
description:
- Shell executable.
type: string
vars:
- name: ansible_executable
- name: ansible_lxc_executable
"""
import os
import shutil

View File

@@ -7,48 +7,48 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Matt Clay (@mattclay) <matt@mystile.com>
name: lxd
short_description: Run tasks in LXD instances via C(lxc) CLI
DOCUMENTATION = r"""
author: Matt Clay (@mattclay) <matt@mystile.com>
name: lxd
short_description: Run tasks in LXD instances using C(lxc) CLI
description:
- Run commands or put/fetch files to an existing instance using C(lxc) CLI.
options:
remote_addr:
description:
- Run commands or put/fetch files to an existing instance using C(lxc) CLI.
options:
remote_addr:
description:
- Instance (container/VM) identifier.
- Since community.general 8.0.0, a FQDN can be provided; in that case, the first component (the part before C(.))
is used as the instance identifier.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
- name: ansible_lxd_host
executable:
description:
- Shell to use for execution inside instance.
type: string
default: /bin/sh
vars:
- name: ansible_executable
- name: ansible_lxd_executable
remote:
description:
- Name of the LXD remote to use.
type: string
default: local
vars:
- name: ansible_lxd_remote
version_added: 2.0.0
project:
description:
- Name of the LXD project to use.
type: string
vars:
- name: ansible_lxd_project
version_added: 2.0.0
'''
- Instance (container/VM) identifier.
- Since community.general 8.0.0, a FQDN can be provided; in that case, the first component (the part before C(.)) is
used as the instance identifier.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
- name: ansible_lxd_host
executable:
description:
- Shell to use for execution inside instance.
type: string
default: /bin/sh
vars:
- name: ansible_executable
- name: ansible_lxd_executable
remote:
description:
- Name of the LXD remote to use.
type: string
default: local
vars:
- name: ansible_lxd_remote
version_added: 2.0.0
project:
description:
- Name of the LXD project to use.
type: string
vars:
- name: ansible_lxd_project
version_added: 2.0.0
"""
import os
from subprocess import Popen, PIPE

View File

@@ -12,34 +12,33 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
name: qubes
short_description: Interact with an existing QubesOS AppVM
DOCUMENTATION = r"""
name: qubes
short_description: Interact with an existing QubesOS AppVM
description:
- Run commands or put/fetch files to an existing Qubes AppVM using qubes tools.
author: Kushal Das (@kushaldas)
options:
remote_addr:
description:
- Run commands or put/fetch files to an existing Qubes AppVM using qubes tools.
author: Kushal Das (@kushaldas)
options:
remote_addr:
description:
- VM name.
type: string
default: inventory_hostname
vars:
- name: ansible_host
remote_user:
description:
- The user to execute as inside the VM.
type: string
default: The I(user) account as default in Qubes OS.
vars:
- name: ansible_user
- VM name.
type: string
default: inventory_hostname
vars:
- name: ansible_host
remote_user:
description:
- The user to execute as inside the VM.
type: string
default: The I(user) account as default in Qubes OS.
vars:
- name: ansible_user
# keyword:
# - name: hosts
'''
"""
import subprocess
@@ -118,7 +117,7 @@ class Connection(ConnectionBase):
rc, stdout, stderr = self._qubes(cmd)
display.vvvvv("STDOUT %r STDERR %r" % (stderr, stderr))
display.vvvvv("STDOUT %r STDERR %r" % (stdout, stderr))
return rc, stdout, stderr
def put_file(self, in_path, out_path):

View File

@@ -10,13 +10,13 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Michael Scherer (@mscherer) <misc@zarb.org>
name: saltstack
short_description: Allow ansible to piggyback on salt minions
description:
- This allows you to use existing Saltstack infrastructure to connect to targets.
'''
DOCUMENTATION = r"""
author: Michael Scherer (@mscherer) <misc@zarb.org>
name: saltstack
short_description: Allow ansible to piggyback on salt minions
description:
- This allows you to use existing Saltstack infrastructure to connect to targets.
"""
import os
import base64

View File

@@ -11,22 +11,22 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
author: Ansible Core Team
name: zone
short_description: Run tasks in a zone instance
DOCUMENTATION = r"""
author: Ansible Core Team
name: zone
short_description: Run tasks in a zone instance
description:
- Run commands or put/fetch files to an existing zone.
options:
remote_addr:
description:
- Run commands or put/fetch files to an existing zone.
options:
remote_addr:
description:
- Zone identifier
type: string
default: inventory_hostname
vars:
- name: ansible_host
- name: ansible_zone_host
'''
- Zone identifier.
type: string
default: inventory_hostname
vars:
- name: ansible_host
- name: ansible_zone_host
"""
import os
import os.path

View File

@@ -9,7 +9,7 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = r'''
DOCUMENTATION = r"""
requirements:
- See U(https://support.1password.com/command-line/)
options:
@@ -18,7 +18,8 @@ options:
aliases: ['vault_password']
type: str
section:
description: Item section containing the field to retrieve (case-insensitive). If absent will return first match from any section.
description: Item section containing the field to retrieve (case-insensitive). If absent will return first match from
any section.
domain:
description: Domain of 1Password.
default: '1password.com'
@@ -55,25 +56,25 @@ options:
env:
- name: OP_CONNECT_TOKEN
version_added: 8.1.0
'''
"""
LOOKUP = r'''
LOOKUP = r"""
options:
service_account_token:
env:
- name: OP_SERVICE_ACCOUNT_TOKEN
version_added: 8.2.0
notes:
- This lookup will use an existing 1Password session if one exists. If not, and you have already
performed an initial sign in (meaning C(~/.op/config), C(~/.config/op/config) or C(~/.config/.op/config) exists), then only the
O(master_password) is required. You may optionally specify O(subdomain) in this scenario, otherwise the last used subdomain will be used by C(op).
- This lookup will use an existing 1Password session if one exists. If not, and you have already performed an initial sign
in (meaning C(~/.op/config), C(~/.config/op/config) or C(~/.config/.op/config) exists), then only the O(master_password)
is required. You may optionally specify O(subdomain) in this scenario, otherwise the last used subdomain will be used
by C(op).
- This lookup can perform an initial login by providing O(subdomain), O(username), O(secret_key), and O(master_password).
- Can target a specific account by providing the O(account_id).
- Due to the B(very) sensitive nature of these credentials, it is B(highly) recommended that you only pass in the minimal credentials
needed at any given time. Also, store these credentials in an Ansible Vault using a key that is equal to or greater in strength
to the 1Password master password.
- This lookup stores potentially sensitive data from 1Password as Ansible facts.
Facts are subject to caching if enabled, which means this data could be stored in clear text
on disk or in a database.
- Due to the B(very) sensitive nature of these credentials, it is B(highly) recommended that you only pass in the minimal
credentials needed at any given time. Also, store these credentials in an Ansible Vault using a key that is equal to or
greater in strength to the 1Password master password.
- This lookup stores potentially sensitive data from 1Password as Ansible facts. Facts are subject to caching if enabled,
which means this data could be stored in clear text on disk or in a database.
- Tested with C(op) version 2.7.2.
'''
"""

View File

@@ -11,70 +11,67 @@ __metaclass__ = type
class ModuleDocFragment(object):
# OneView doc fragment
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
config:
description:
- Path to a JSON configuration file containing the OneView client configuration.
The configuration file is optional and when used should be present in the host running the ansible commands.
If the file path is not provided, the configuration will be loaded from environment variables.
For links to example configuration files or how to use the environment variables verify the notes section.
type: path
api_version:
description:
- OneView API Version.
type: int
image_streamer_hostname:
description:
- IP address or hostname for the HPE Image Streamer REST API.
type: str
hostname:
description:
- IP address or hostname for the appliance.
type: str
username:
description:
- Username for API authentication.
type: str
password:
description:
- Password for API authentication.
type: str
config:
description:
- Path to a JSON configuration file containing the OneView client configuration. The configuration file is optional
and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration
will be loaded from environment variables. For links to example configuration files or how to use the environment
variables verify the notes section.
type: path
api_version:
description:
- OneView API Version.
type: int
image_streamer_hostname:
description:
- IP address or hostname for the HPE Image Streamer REST API.
type: str
hostname:
description:
- IP address or hostname for the appliance.
type: str
username:
description:
- Username for API authentication.
type: str
password:
description:
- Password for API authentication.
type: str
requirements:
- Python >= 2.7.9
notes:
- "A sample configuration file for the config parameter can be found at:
U(https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json)"
- "Check how to use environment variables for configuration at:
U(https://github.com/HewlettPackard/oneview-ansible#environment-variables)"
- "Additional Playbooks for the HPE OneView Ansible modules can be found at:
U(https://github.com/HewlettPackard/oneview-ansible/tree/master/examples)"
- "The OneView API version used will directly affect returned and expected fields in resources.
Information on setting the desired API version and can be found at:
U(https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version)"
'''
- 'A sample configuration file for the config parameter can be found at:
U(https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json).'
- 'Check how to use environment variables for configuration at: U(https://github.com/HewlettPackard/oneview-ansible#environment-variables).'
- 'Additional Playbooks for the HPE OneView Ansible modules can be found at: U(https://github.com/HewlettPackard/oneview-ansible/tree/master/examples).'
- 'The OneView API version used will directly affect returned and expected fields in resources. Information on setting the
desired API version and can be found at: U(https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version).'
"""
VALIDATEETAG = r'''
VALIDATEETAG = r"""
options:
validate_etag:
description:
- When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag
for the resource matches the ETag provided in the data.
type: bool
default: true
'''
validate_etag:
description:
- When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the
resource matches the ETag provided in the data.
type: bool
default: true
"""
FACTSPARAMS = r'''
FACTSPARAMS = r"""
options:
params:
description:
- List of parameters to delimit, filter and sort the list of resources.
- "Parameter keys allowed are:"
- "C(start): The first item to return, using 0-based indexing."
- "C(count): The number of resources to return."
- "C(filter): A general filter/query string to narrow the list of items returned."
- "C(sort): The sort order of the returned data set."
type: dict
'''
params:
description:
- List of parameters to delimit, filter and sort the list of resources.
- 'Parameter keys allowed are:'
- 'V(start): The first item to return, using 0-based indexing.'
- 'V(count): The number of resources to return.'
- 'V(filter): A general filter/query string to narrow the list of items returned.'
- 'V(sort): The sort order of the returned data set.'
type: dict
"""

View File

@@ -10,26 +10,26 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Standard documentation fragment
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
api_token:
description:
- Online OAuth token.
type: str
required: true
aliases: [ oauth_token ]
aliases: [oauth_token]
api_url:
description:
- Online API URL.
type: str
default: 'https://api.online.net'
aliases: [ base_url ]
aliases: [base_url]
api_timeout:
description:
- HTTP timeout to Online API in seconds.
type: int
default: 30
aliases: [ timeout ]
aliases: [timeout]
validate_certs:
description:
- Validate SSL certs of the Online API.
@@ -37,9 +37,7 @@ options:
default: true
notes:
- Also see the API documentation on U(https://console.online.net/en/api/).
- If O(api_token) is not set within the module, the following
environment variables can be used in decreasing order of precedence
- If O(api_token) is not set within the module, the following environment variables can be used in decreasing order of precedence
E(ONLINE_TOKEN), E(ONLINE_API_KEY), E(ONLINE_OAUTH_TOKEN), E(ONLINE_API_TOKEN).
- If one wants to use a different O(api_url) one can also set the E(ONLINE_API_URL)
environment variable.
'''
- If one wants to use a different O(api_url) one can also set the E(ONLINE_API_URL) environment variable.
"""

View File

@@ -10,36 +10,36 @@ __metaclass__ = type
class ModuleDocFragment(object):
# OpenNebula common documentation
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
api_url:
description:
- The ENDPOINT URL of the XMLRPC server.
- If not specified then the value of the E(ONE_URL) environment variable, if any, is used.
type: str
aliases:
- api_endpoint
api_username:
description:
- The name of the user for XMLRPC authentication.
- If not specified then the value of the E(ONE_USERNAME) environment variable, if any, is used.
type: str
api_password:
description:
- The password or token for XMLRPC authentication.
- If not specified then the value of the E(ONE_PASSWORD) environment variable, if any, is used.
type: str
aliases:
- api_token
validate_certs:
description:
- Whether to validate the TLS/SSL certificates or not.
- This parameter is ignored if E(PYTHONHTTPSVERIFY) environment variable is used.
type: bool
default: true
wait_timeout:
description:
- Time to wait for the desired state to be reached before timeout, in seconds.
type: int
default: 300
'''
api_url:
description:
- The ENDPOINT URL of the XMLRPC server.
- If not specified then the value of the E(ONE_URL) environment variable, if any, is used.
type: str
aliases:
- api_endpoint
api_username:
description:
- The name of the user for XMLRPC authentication.
- If not specified then the value of the E(ONE_USERNAME) environment variable, if any, is used.
type: str
api_password:
description:
- The password or token for XMLRPC authentication.
- If not specified then the value of the E(ONE_PASSWORD) environment variable, if any, is used.
type: str
aliases:
- api_token
validate_certs:
description:
- Whether to validate the TLS/SSL certificates or not.
- This parameter is ignored if E(PYTHONHTTPSVERIFY) environment variable is used.
type: bool
default: true
wait_timeout:
description:
- Time to wait for the desired state to be reached before timeout, in seconds.
type: int
default: 300
"""

View File

@@ -11,75 +11,62 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
host:
description:
- Specifies the DNS host name or address for connecting to the remote
device over the specified transport. The value of host is used as
the destination address for the transport. Note this argument
does not affect the SSH argument.
- Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value
of host is used as the destination address for the transport. Note this argument does not affect the SSH argument.
type: str
port:
description:
- Specifies the port to use when building the connection to the remote
device. This value applies to either O(transport=cli) or O(transport=rest). The port
value will default to the appropriate transport common port if
none is provided in the task. (cli=22, http=80, https=443). Note
this argument does not affect the SSH transport.
- Specifies the port to use when building the connection to the remote device. This value applies to either O(transport=cli)
or O(transport=rest). The port value will default to the appropriate transport common port if none is provided in
the task. (cli=22, http=80, https=443). Note this argument does not affect the SSH transport.
type: int
default: 0 (use common port)
username:
description:
- Configures the username to use to authenticate the connection to
the remote device. This value is used to authenticate
either the CLI login or the eAPI authentication depending on which
transport is used. Note this argument does not affect the SSH
transport. If the value is not specified in the task, the value of
environment variable E(ANSIBLE_NET_USERNAME) will be used instead.
- Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate
either the CLI login or the eAPI authentication depending on which transport is used. Note this argument does not
affect the SSH transport. If the value is not specified in the task, the value of environment variable E(ANSIBLE_NET_USERNAME)
will be used instead.
type: str
password:
description:
- Specifies the password to use to authenticate the connection to
the remote device. This is a common argument used for either O(transport=cli)
or O(transport=rest). Note this argument does not affect the SSH
transport. If the value is not specified in the task, the value of
environment variable E(ANSIBLE_NET_PASSWORD) will be used instead.
- Specifies the password to use to authenticate the connection to the remote device. This is a common argument used
for either O(transport=cli) or O(transport=rest). Note this argument does not affect the SSH transport. If the value
is not specified in the task, the value of environment variable E(ANSIBLE_NET_PASSWORD) will be used instead.
type: str
timeout:
description:
- Specifies the timeout in seconds for communicating with the network device
for either connecting or sending commands. If the timeout is
exceeded before the operation is completed, the module will error.
- Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands.
If the timeout is exceeded before the operation is completed, the module will error.
type: int
default: 10
ssh_keyfile:
description:
- Specifies the SSH key to use to authenticate the connection to
the remote device. This argument is only used for O(transport=cli).
If the value is not specified in the task, the value of
environment variable E(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
- Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for O(transport=cli).
If the value is not specified in the task, the value of environment variable E(ANSIBLE_NET_SSH_KEYFILE) will be used
instead.
type: path
transport:
description:
- Configures the transport connection to use when connecting to the
remote device. The transport argument supports connectivity to the
device over SSH (V(ssh)), CLI (V(cli)), or REST (V(rest)).
- Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity
to the device over SSH (V(ssh)), CLI (V(cli)), or REST (V(rest)).
required: true
type: str
choices: [ cli, rest, ssh ]
choices: [cli, rest, ssh]
default: ssh
use_ssl:
description:
- Configures the O(transport) to use SSL if set to V(true) only when the
O(transport) argument is configured as rest. If the transport
argument is not V(rest), this value is ignored.
- Configures the O(transport) to use SSL if set to V(true) only when the O(transport) argument is configured as rest.
If the transport argument is not V(rest), this value is ignored.
type: bool
default: true
provider:
description:
- Convenience method that allows all C(openswitch) arguments to be passed as
a dict object. All constraints (required, choices, etc) must be
met either by individual arguments or values in this dict.
- Convenience method that allows all C(openswitch) arguments to be passed as a dict object. All constraints (required,
choices, and so on) must be met either by individual arguments or values in this dict.
type: dict
'''
"""

View File

@@ -8,76 +8,68 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = """
requirements:
- Python SDK for Oracle Cloud Infrastructure U(https://oracle-cloud-infrastructure-python-sdk.readthedocs.io)
notes:
- For OCI Python SDK configuration, please refer to
U(https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/configuration.html).
options:
config_file_location:
description:
- Path to configuration file. If not set then the value of the E(OCI_CONFIG_FILE) environment variable,
if any, is used. Otherwise, defaults to C(~/.oci/config).
type: str
config_profile_name:
description:
- The profile to load from the config file referenced by O(config_file_location). If not set, then the
value of the E(OCI_CONFIG_PROFILE) environment variable, if any, is used. Otherwise, defaults to the
C(DEFAULT) profile in O(config_file_location).
default: "DEFAULT"
type: str
api_user:
description:
- The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the
value of the E(OCI_USER_OCID) environment variable, if any, is used. This option is required if the user
is not specified through a configuration file (See O(config_file_location)). To get the user's OCID,
please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
type: str
api_user_fingerprint:
description:
- Fingerprint for the key pair being used. If not set, then the value of the E(OCI_USER_FINGERPRINT)
environment variable, if any, is used. This option is required if the key fingerprint is not
specified through a configuration file (See O(config_file_location)). To get the key pair's
fingerprint value please refer
U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
type: str
api_user_key_file:
description:
- Full path and filename of the private key (in PEM format). If not set, then the value of the
OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is
not specified through a configuration file (See O(config_file_location)). If the key is encrypted
with a pass-phrase, the O(api_user_key_pass_phrase) option must also be provided.
type: path
api_user_key_pass_phrase:
description:
- Passphrase used by the key referenced in O(api_user_key_file), if it is encrypted. If not set, then
the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the
key passphrase is not specified through a configuration file (See O(config_file_location)).
type: str
auth_type:
description:
- The type of authentication to use for making API requests. By default O(auth_type=api_key) based
authentication is performed and the API key (see O(api_user_key_file)) in your config file will be
used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE,
if any, is used. Use O(auth_type=instance_principal) to use instance principal based authentication
when running ansible playbooks within an OCI compute instance.
choices: ['api_key', 'instance_principal']
default: 'api_key'
type: str
tenancy:
description:
- OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is
used. This option is required if the tenancy OCID is not specified through a configuration file
(See O(config_file_location)). To get the tenancy OCID, please refer to
U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
type: str
region:
description:
- The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the
value of the OCI_REGION variable, if any, is used. This option is required if the region is
not specified through a configuration file (See O(config_file_location)). Please refer to
U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm) for more information
on OCI regions.
type: str
"""
DOCUMENTATION = r"""
requirements:
- Python SDK for Oracle Cloud Infrastructure U(https://oracle-cloud-infrastructure-python-sdk.readthedocs.io)
notes:
- For OCI Python SDK configuration, please refer to U(https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/configuration.html).
options:
config_file_location:
description:
- Path to configuration file. If not set then the value of the E(OCI_CONFIG_FILE) environment variable, if any, is used.
Otherwise, defaults to C(~/.oci/config).
type: str
config_profile_name:
description:
- The profile to load from the config file referenced by O(config_file_location). If not set, then the value of the
E(OCI_CONFIG_PROFILE) environment variable, if any, is used. Otherwise, defaults to the C(DEFAULT) profile in O(config_file_location).
default: "DEFAULT"
type: str
api_user:
description:
- The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the E(OCI_USER_OCID) environment
variable, if any, is used. This option is required if the user is not specified through a configuration file (See
O(config_file_location)). To get the user's OCID, please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
type: str
api_user_fingerprint:
description:
- Fingerprint for the key pair being used. If not set, then the value of the E(OCI_USER_FINGERPRINT) environment variable,
if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See
O(config_file_location)). To get the key pair's fingerprint value please refer to
U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
type: str
api_user_key_file:
description:
- Full path and filename of the private key (in PEM format). If not set, then the value of the E(OCI_USER_KEY_FILE) variable,
if any, is used. This option is required if the private key is not specified through a configuration file (See O(config_file_location)).
If the key is encrypted with a pass-phrase, the O(api_user_key_pass_phrase) option must also be provided.
type: path
api_user_key_pass_phrase:
description:
- Passphrase used by the key referenced in O(api_user_key_file), if it is encrypted. If not set, then the value of the
E(OCI_USER_KEY_PASS_PHRASE) variable, if any, is used. This option is required if the key passphrase is not specified
through a configuration file (See O(config_file_location)).
type: str
auth_type:
description:
- The type of authentication to use for making API requests. By default O(auth_type=api_key) based authentication is
performed and the API key (see O(api_user_key_file)) in your config file will be used. If this 'auth_type' module
option is not specified, the value of the E(OCI_ANSIBLE_AUTH_TYPE), if any, is used. Use O(auth_type=instance_principal)
to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
choices: ['api_key', 'instance_principal']
default: 'api_key'
type: str
tenancy:
description:
- OCID of your tenancy. If not set, then the value of the E(OCI_TENANCY) variable, if any, is used. This option is required
if the tenancy OCID is not specified through a configuration file (See O(config_file_location)). To get the tenancy
OCID, please refer to U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
type: str
region:
description:
- The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the E(OCI_REGION)
variable, if any, is used. This option is required if the region is not specified through a configuration file (See
O(config_file_location)). Please refer to U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm)
for more information on OCI regions.
type: str
"""

View File

@@ -8,19 +8,18 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = """
options:
force_create:
description: Whether to attempt non-idempotent creation of a resource. By default, create resource is an
idempotent operation, and doesn't create the resource if it already exists. Setting this option
to true, forcefully creates a copy of the resource, even if it already exists.This option is
mutually exclusive with O(key_by).
default: false
type: bool
key_by:
description: The list of comma-separated attributes of this resource which should be used to uniquely
identify an instance of the resource. By default, all the attributes of a resource except
O(freeform_tags) are used to uniquely identify a resource.
type: list
elements: str
"""
DOCUMENTATION = r"""
options:
force_create:
description: Whether to attempt non-idempotent creation of a resource. By default, create resource is an idempotent operation,
and does not create the resource if it already exists. Setting this option to V(true), forcefully creates a copy of the
resource, even if it already exists. This option is mutually exclusive with O(key_by).
default: false
type: bool
key_by:
description: The list of comma-separated attributes of this resource which should be used to uniquely identify an instance
of the resource. By default, all the attributes of a resource except O(freeform_tags) are used to uniquely identify
a resource.
type: list
elements: str
"""

View File

@@ -8,10 +8,10 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = """
options:
display_name:
description: Use O(display_name) along with the other options to return only resources that match the given
display name exactly.
type: str
"""
DOCUMENTATION = r"""
options:
display_name:
description: Use O(display_name) along with the other options to return only resources that match the given display name
exactly.
type: str
"""

View File

@@ -8,10 +8,9 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = """
options:
name:
description: Use O(name) along with the other options to return only resources that match the given name
exactly.
type: str
"""
DOCUMENTATION = r"""
options:
name:
description: Use O(name) along with the other options to return only resources that match the given name exactly.
type: str
"""

View File

@@ -8,16 +8,14 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = """
options:
defined_tags:
description: Defined tags for this resource. Each key is predefined and scoped to a namespace. For more
information, see
U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
type: dict
freeform_tags:
description: Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name,
type, or namespace. For more information, see
U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
type: dict
"""
DOCUMENTATION = r"""
options:
defined_tags:
description: Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see
U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
type: dict
freeform_tags:
description: Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
For more information, see U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
type: dict
"""

View File

@@ -8,20 +8,19 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = """
options:
wait:
description: Whether to wait for create or delete operation to complete.
default: true
type: bool
wait_timeout:
description: Time, in seconds, to wait when O(wait=true).
default: 1200
type: int
wait_until:
description: The lifecycle state to wait for the resource to transition into when O(wait=true). By default,
when O(wait=true), we wait for the resource to get into ACTIVE/ATTACHED/AVAILABLE/PROVISIONED/
RUNNING applicable lifecycle state during create operation and to get into DELETED/DETACHED/
TERMINATED lifecycle state during delete operation.
type: str
"""
DOCUMENTATION = r"""
options:
wait:
description: Whether to wait for create or delete operation to complete.
default: true
type: bool
wait_timeout:
description: Time, in seconds, to wait when O(wait=true).
default: 1200
type: int
wait_until:
description: The lifecycle state to wait for the resource to transition into when O(wait=true). By default, when O(wait=true),
we wait for the resource to get into ACTIVE/ATTACHED/AVAILABLE/PROVISIONED/ RUNNING applicable lifecycle state during
create operation and to get into DELETED/DETACHED/ TERMINATED lifecycle state during delete operation.
type: str
"""

View File

@@ -9,34 +9,32 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
global:
description:
- The module will pass the C(--global) argument to C(pipx), to execute actions in global scope.
- The C(--global) is only available in C(pipx>=1.6.0), so make sure to have a compatible version when using this option.
Moreover, a nasty bug with C(--global) was fixed in C(pipx==1.7.0), so it is strongly recommended you used that version or newer.
Moreover, a nasty bug with C(--global) was fixed in C(pipx==1.7.0), so it is strongly recommended you used that version
or newer.
type: bool
default: false
executable:
description:
- Path to the C(pipx) installed in the system.
- >
If not specified, the module will use C(python -m pipx) to run the tool,
using the same Python interpreter as ansible itself.
- If not specified, the module will use C(python -m pipx) to run the tool, using the same Python interpreter as ansible
itself.
type: path
notes:
- This module requires C(pipx) version 0.16.2.1 or above. From community.general 11.0.0 onwards, the module will require C(pipx>=1.7.0).
- Please note that C(pipx) requires Python 3.6 or above.
- This module does not install the C(pipx) python package, however that can be easily done with the module M(ansible.builtin.pip).
- This module does not require C(pipx) to be in the shell C(PATH), but it must be loadable by Python as a module.
- >
This module will honor C(pipx) environment variables such as but not limited to E(PIPX_HOME) and E(PIPX_BIN_DIR)
passed using the R(environment Ansible keyword, playbooks_environment).
- This module requires C(pipx) version 0.16.2.1 or above. From community.general 11.0.0 onwards, the module will require
C(pipx>=1.7.0).
- Please note that C(pipx) requires Python 3.6 or above.
- This module does not install the C(pipx) python package, however that can be easily done with the module M(ansible.builtin.pip).
- This module does not require C(pipx) to be in the shell C(PATH), but it must be loadable by Python as a module.
- This module will honor C(pipx) environment variables such as but not limited to E(PIPX_HOME) and E(PIPX_BIN_DIR) passed
using the R(environment Ansible keyword, playbooks_environment).
seealso:
- name: C(pipx) command manual page
description: Manual page for the command.
link: https://pipx.pypa.io/latest/docs/
'''
"""

View File

@@ -13,32 +13,28 @@ class ModuleDocFragment(object):
DOCUMENTATION = r"""
options:
pritunl_url:
type: str
required: true
description:
- URL and port of the Pritunl server on which the API is enabled.
pritunl_api_token:
type: str
required: true
description:
- API Token of a Pritunl admin user.
- It needs to be enabled in Administrators > USERNAME > Enable Token Authentication.
pritunl_api_secret:
type: str
required: true
description:
- API Secret found in Administrators > USERNAME > API Secret.
validate_certs:
type: bool
required: false
default: true
description:
- If certificates should be validated or not.
- This should never be set to V(false), except if you are very sure that
your connection to the server can not be subject to a Man In The Middle
attack.
pritunl_url:
type: str
required: true
description:
- URL and port of the Pritunl server on which the API is enabled.
pritunl_api_token:
type: str
required: true
description:
- API Token of a Pritunl admin user.
- It needs to be enabled in Administrators > USERNAME > Enable Token Authentication.
pritunl_api_secret:
type: str
required: true
description:
- API Secret found in Administrators > USERNAME > API Secret.
validate_certs:
type: bool
required: false
default: true
description:
- If certificates should be validated or not.
- This should never be set to V(false), except if you are very sure that your connection to the server can not be subject
to a Man In The Middle attack.
"""

View File

@@ -9,7 +9,7 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Common parameters for Proxmox VE modules
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
api_host:
description:
@@ -51,10 +51,10 @@ options:
- This should only be used on personally controlled sites using self-signed certificates.
type: bool
default: false
requirements: [ "proxmoxer", "requests" ]
'''
requirements: ["proxmoxer", "requests"]
"""
SELECTION = r'''
SELECTION = r"""
options:
vmid:
description:
@@ -71,7 +71,7 @@ options:
description:
- Add the new VM to the specified pool.
type: str
'''
"""
ACTIONGROUP_PROXMOX = r"""
options: {}

View File

@@ -11,17 +11,17 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Standard Pure Storage documentation fragment
DOCUMENTATION = r'''
options:
- See separate platform section for more details
DOCUMENTATION = r"""
options: {}
# See separate platform section for more details
requirements:
- See separate platform section for more details
notes:
- Ansible modules are available for the following Pure Storage products: FlashArray, FlashBlade
'''
- 'Ansible modules are available for the following Pure Storage products: FlashArray, FlashBlade.'
"""
# Documentation fragment for FlashBlade
FB = r'''
FB = r"""
options:
fb_url:
description:
@@ -33,14 +33,14 @@ options:
type: str
notes:
- This module requires the C(purity_fb) Python library.
- You must set E(PUREFB_URL) and E(PUREFB_API) environment variables
if O(fb_url) and O(api_token) arguments are not passed to the module directly.
- You must set E(PUREFB_URL) and E(PUREFB_API) environment variables if O(fb_url) and O(api_token) arguments are not passed
to the module directly.
requirements:
- purity_fb >= 1.1
'''
"""
# Documentation fragment for FlashArray
FA = r'''
FA = r"""
options:
fa_url:
description:
@@ -54,8 +54,8 @@ options:
required: true
notes:
- This module requires the C(purestorage) Python library.
- You must set E(PUREFA_URL) and E(PUREFA_API) environment variables
if O(fa_url) and O(api_token) arguments are not passed to the module directly.
- You must set E(PUREFA_URL) and E(PUREFA_API) environment variables if O(fa_url) and O(api_token) arguments are not passed
to the module directly.
requirements:
- purestorage
'''
"""

View File

@@ -10,7 +10,7 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Common parameters for Redis modules
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
login_host:
description:
@@ -40,14 +40,12 @@ options:
validate_certs:
description:
- Specify whether or not to validate TLS certificates.
- This should only be turned off for personally controlled sites or with
C(localhost) as target.
- This should only be turned off for personally controlled sites or with C(localhost) as target.
type: bool
default: true
ca_certs:
description:
- Path to root certificates file. If not set and O(tls) is
set to V(true), certifi ca-certificates will be used.
- Path to root certificates file. If not set and O(tls) is set to V(true), certifi ca-certificates will be used.
type: str
client_cert_file:
description:
@@ -59,10 +57,9 @@ options:
- Path to the client private key file.
type: str
version_added: 9.3.0
requirements: [ "redis", "certifi" ]
requirements: ["redis", "certifi"]
notes:
- Requires the C(redis) Python package on the remote host. You can
install it with pip (C(pip install redis)) or with a package manager.
Information on the library can be found at U(https://github.com/andymccurdy/redis-py).
'''
- Requires the C(redis) Python package on the remote host. You can install it with pip (C(pip install redis)) or with a
package manager. Information on the library can be found at U(https://github.com/andymccurdy/redis-py).
"""

View File

@@ -11,7 +11,7 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
url:
type: str
@@ -29,4 +29,4 @@ options:
description:
- Rundeck User API Token.
required: true
'''
"""

View File

@@ -11,29 +11,29 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Standard documentation fragment
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
api_token:
description:
- Scaleway OAuth token.
type: str
required: true
aliases: [ oauth_token ]
aliases: [oauth_token]
api_url:
description:
- Scaleway API URL.
type: str
default: https://api.scaleway.com
aliases: [ base_url ]
aliases: [base_url]
api_timeout:
description:
- HTTP timeout to Scaleway API in seconds.
type: int
default: 30
aliases: [ timeout ]
aliases: [timeout]
query_parameters:
description:
- List of parameters passed to the query string.
- List of parameters passed to the query string.
type: dict
default: {}
validate_certs:
@@ -43,9 +43,7 @@ options:
default: true
notes:
- Also see the API documentation on U(https://developer.scaleway.com/).
- If O(api_token) is not set within the module, the following
environment variables can be used in decreasing order of precedence
- If O(api_token) is not set within the module, the following environment variables can be used in decreasing order of precedence
E(SCW_TOKEN), E(SCW_API_KEY), E(SCW_OAUTH_TOKEN) or E(SCW_API_TOKEN).
- If one wants to use a different O(api_url) one can also set the E(SCW_API_URL)
environment variable.
'''
- If one wants to use a different O(api_url) one can also set the E(SCW_API_URL) environment variable.
"""

View File

@@ -11,23 +11,23 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Standard documentation fragment
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
wait:
description:
- Wait for the resource to reach its desired state before returning.
- Wait for the resource to reach its desired state before returning.
type: bool
default: true
wait_timeout:
type: int
description:
- Time to wait for the resource to reach the expected state.
- Time to wait for the resource to reach the expected state.
required: false
default: 300
wait_sleep_time:
type: int
description:
- Time to wait before every attempt to check the state of the resource.
- Time to wait before every attempt to check the state of the resource.
required: false
default: 3
'''
"""

View File

@@ -9,49 +9,48 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
headers:
description:
- A dictionary of additional headers to be sent to POST and PUT requests.
- Is needed for some modules.
type: dict
required: false
default: {}
utm_host:
description:
- The REST Endpoint of the Sophos UTM.
type: str
required: true
utm_port:
description:
- The port of the REST interface.
type: int
default: 4444
utm_token:
description:
- "The token used to identify at the REST-API. See
U(https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en),
Chapter 2.4.2."
type: str
required: true
utm_protocol:
description:
- The protocol of the REST Endpoint.
choices: [ http, https ]
type: str
default: https
validate_certs:
description:
- Whether the REST interface's ssl certificate should be verified or not.
type: bool
default: true
state:
description:
- The desired state of the object.
- V(present) will create or update an object.
- V(absent) will delete an object if it was present.
type: str
choices: [ absent, present ]
default: present
'''
headers:
description:
- A dictionary of additional headers to be sent to POST and PUT requests.
- Is needed for some modules.
type: dict
required: false
default: {}
utm_host:
description:
- The REST Endpoint of the Sophos UTM.
type: str
required: true
utm_port:
description:
- The port of the REST interface.
type: int
default: 4444
utm_token:
description:
- The token used to identify at the REST-API.
- See U(https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en), Chapter 2.4.2.
type: str
required: true
utm_protocol:
description:
- The protocol of the REST Endpoint.
choices: [http, https]
type: str
default: https
validate_certs:
description:
- Whether the REST interface's SSL certificate should be verified or not.
type: bool
default: true
state:
description:
- The desired state of the object.
- V(present) will create or update an object.
- V(absent) will delete an object if it was present.
type: str
choices: [absent, present]
default: present
"""

View File

@@ -10,14 +10,14 @@ __metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = r'''
options:
- See respective platform section for more details
DOCUMENTATION = r"""
options: {}
# See respective platform section for more details
requirements:
- See respective platform section for more details
- See respective platform section for more details
notes:
- Ansible modules are available for Vexata VX100 arrays.
'''
- Ansible modules are available for Vexata VX100 arrays.
"""
# Documentation fragment for Vexata VX100 series
VX100 = r'''

View File

@@ -10,32 +10,33 @@ __metaclass__ = type
class ModuleDocFragment(object):
# Common parameters for XenServer modules
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
hostname:
description:
- The hostname or IP address of the XenServer host or XenServer pool master.
- If the value is not specified in the task, the value of environment variable E(XENSERVER_HOST) will be used instead.
- The hostname or IP address of the XenServer host or XenServer pool master.
- If the value is not specified in the task, the value of environment variable E(XENSERVER_HOST) will be used instead.
type: str
default: localhost
aliases: [ host, pool ]
aliases: [host, pool]
username:
description:
- The username to use for connecting to XenServer.
- If the value is not specified in the task, the value of environment variable E(XENSERVER_USER) will be used instead.
- The username to use for connecting to XenServer.
- If the value is not specified in the task, the value of environment variable E(XENSERVER_USER) will be used instead.
type: str
default: root
aliases: [ admin, user ]
aliases: [admin, user]
password:
description:
- The password to use for connecting to XenServer.
- If the value is not specified in the task, the value of environment variable E(XENSERVER_PASSWORD) will be used instead.
- The password to use for connecting to XenServer.
- If the value is not specified in the task, the value of environment variable E(XENSERVER_PASSWORD) will be used instead.
type: str
aliases: [ pass, pwd ]
aliases: [pass, pwd]
validate_certs:
description:
- Allows connection when SSL certificates are not valid. Set to V(false) when certificates are not trusted.
- If the value is not specified in the task, the value of environment variable E(XENSERVER_VALIDATE_CERTS) will be used instead.
- Allows connection when SSL certificates are not valid. Set to V(false) when certificates are not trusted.
- If the value is not specified in the task, the value of environment variable E(XENSERVER_VALIDATE_CERTS) will be used
instead.
type: bool
default: true
'''
"""

View File

@@ -57,8 +57,8 @@ EXAMPLES = '''
RETURN = '''
_value:
description: The dictionary having the provided key-value pairs.
type: boolean
description: A dictionary with the provided key-value pairs.
type: dictionary
'''

View File

@@ -13,6 +13,8 @@ DOCUMENTATION = '''
author: Felix Fontein (@felixfontein)
description:
- Transform a sequence of dictionaries to a dictionary where the dictionaries are indexed by an attribute.
- This filter is similar to the Jinja2 C(groupby) filter. Use the Jinja2 C(groupby) filter if you have multiple entries with the same value,
or when you need a dictionary with list values, or when you need to use deeply nested attributes.
positional: attribute
options:
_input:

View File

@@ -10,12 +10,16 @@ __metaclass__ = type
from ansible.errors import (
AnsibleError,
AnsibleFilterError,
AnsibleFilterTypeError,
)
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.common.collections import is_sequence
try:
from ansible.errors import AnsibleTypeError
except ImportError:
from ansible.errors import AnsibleFilterTypeError as AnsibleTypeError
try:
from hashids import Hashids
HAS_HASHIDS = True
@@ -64,7 +68,7 @@ def hashids_encode(nums, salt=None, alphabet=None, min_length=None):
try:
hashid = hashids.encode(*nums)
except TypeError as e:
raise AnsibleFilterTypeError(
raise AnsibleTypeError(
"Data to encode must by a tuple or list of ints: %s" % to_native(e)
)

View File

@@ -23,93 +23,107 @@ DOCUMENTATION = '''
type: dictionary
'''
EXAMPLES = '''
# Substitution converts str to AnsibleUnicode
# -------------------------------------------
EXAMPLES = r"""
# Substitution converts str to AnsibleUnicode or _AnsibleTaggedStr
# ----------------------------------------------------------------
# String. AnsibleUnicode.
data: "abc"
result: '{{ data | community.general.reveal_ansible_type }}'
# result => AnsibleUnicode
# String. AnsibleUnicode or _AnsibleTaggedStr.
- data: "abc"
result: '{{ data | community.general.reveal_ansible_type }}'
# result => AnsibleUnicode (or _AnsibleTaggedStr)
# String. AnsibleUnicode alias str.
alias: {"AnsibleUnicode": "str"}
data: "abc"
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# String. AnsibleUnicode/_AnsibleTaggedStr alias str.
- alias: {"AnsibleUnicode": "str", "_AnsibleTaggedStr": "str"}
data: "abc"
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => str
# List. All items are AnsibleUnicode.
data: ["a", "b", "c"]
result: '{{ data | community.general.reveal_ansible_type }}'
# result => list[AnsibleUnicode]
# List. All items are AnsibleUnicode/_AnsibleTaggedStr.
- data: ["a", "b", "c"]
result: '{{ data | community.general.reveal_ansible_type }}'
# result => list[AnsibleUnicode] or list[_AnsibleTaggedStr]
# Dictionary. All keys are AnsibleUnicode. All values are AnsibleUnicode.
data: {"a": "foo", "b": "bar", "c": "baz"}
result: '{{ data | community.general.reveal_ansible_type }}'
# result => dict[AnsibleUnicode, AnsibleUnicode]
# Dictionary. All keys and values are AnsibleUnicode/_AnsibleTaggedStr.
- data: {"a": "foo", "b": "bar", "c": "baz"}
result: '{{ data | community.general.reveal_ansible_type }}'
# result => dict[AnsibleUnicode, AnsibleUnicode] or dict[_AnsibleTaggedStr, _AnsibleTaggedStr]
# No substitution and no alias. Type of strings is str
# ----------------------------------------------------
# String
result: '{{ "abc" | community.general.reveal_ansible_type }}'
- result: '{{ "abc" | community.general.reveal_ansible_type }}'
# result => str
# Integer
result: '{{ 123 | community.general.reveal_ansible_type }}'
- result: '{{ 123 | community.general.reveal_ansible_type }}'
# result => int
# Float
result: '{{ 123.45 | community.general.reveal_ansible_type }}'
- result: '{{ 123.45 | community.general.reveal_ansible_type }}'
# result => float
# Boolean
result: '{{ true | community.general.reveal_ansible_type }}'
- result: '{{ true | community.general.reveal_ansible_type }}'
# result => bool
# List. All items are strings.
result: '{{ ["a", "b", "c"] | community.general.reveal_ansible_type }}'
- result: '{{ ["a", "b", "c"] | community.general.reveal_ansible_type }}'
# result => list[str]
# List of dictionaries.
result: '{{ [{"a": 1}, {"b": 2}] | community.general.reveal_ansible_type }}'
- result: '{{ [{"a": 1}, {"b": 2}] | community.general.reveal_ansible_type }}'
# result => list[dict]
# Dictionary. All keys are strings. All values are integers.
result: '{{ {"a": 1} | community.general.reveal_ansible_type }}'
- result: '{{ {"a": 1} | community.general.reveal_ansible_type }}'
# result => dict[str, int]
# Dictionary. All keys are strings. All values are integers.
result: '{{ {"a": 1, "b": 2} | community.general.reveal_ansible_type }}'
- result: '{{ {"a": 1, "b": 2} | community.general.reveal_ansible_type }}'
# result => dict[str, int]
# Type of strings is AnsibleUnicode or str
# ----------------------------------------
# Type of strings is AnsibleUnicode, _AnsibleTaggedStr, or str
# ------------------------------------------------------------
# Dictionary. The keys are integers or strings. All values are strings.
alias: {"AnsibleUnicode": "str"}
data: {1: 'a', 'b': 'b'}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
- alias:
AnsibleUnicode: str
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
data: {1: 'a', 'b': 'b'}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => dict[int|str, str]
# Dictionary. All keys are integers. All values are keys.
alias: {"AnsibleUnicode": "str"}
data: {1: 'a', 2: 'b'}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
- alias:
AnsibleUnicode: str
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
data: {1: 'a', 2: 'b'}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => dict[int, str]
# Dictionary. All keys are strings. Multiple types values.
alias: {"AnsibleUnicode": "str"}
data: {'a': 1, 'b': 1.1, 'c': 'abc', 'd': True, 'e': ['x', 'y', 'z'], 'f': {'x': 1, 'y': 2}}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
- alias:
AnsibleUnicode: str
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
_AnsibleTaggedFloat: float
data: {'a': 1, 'b': 1.1, 'c': 'abc', 'd': true, 'e': ['x', 'y', 'z'], 'f': {'x': 1, 'y': 2}}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => dict[str, bool|dict|float|int|list|str]
# List. Multiple types items.
alias: {"AnsibleUnicode": "str"}
data: [1, 2, 1.1, 'abc', True, ['x', 'y', 'z'], {'x': 1, 'y': 2}]
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
- alias:
AnsibleUnicode: str
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
_AnsibleTaggedFloat: float
data: [1, 2, 1.1, 'abc', true, ['x', 'y', 'z'], {'x': 1, 'y': 2}]
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => list[bool|dict|float|int|list|str]
'''
"""
RETURN = '''
_value:
@@ -123,6 +137,7 @@ from ansible_collections.community.general.plugins.plugin_utils.ansible_type imp
def reveal_ansible_type(data, alias=None):
"""Returns data type"""
# TODO: expose use_native_type parameter
return _ansible_type(data, alias)

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_days
short_description: Converte a duration string to days
short_description: Converts a duration string to days
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to days.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_hours
short_description: Converte a duration string to hours
short_description: Converts a duration string to hours
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to hours.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_milliseconds
short_description: Converte a duration string to milliseconds
short_description: Converts a duration string to milliseconds
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to milliseconds.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_minutes
short_description: Converte a duration string to minutes
short_description: Converts a duration string to minutes
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to minutes.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_months
short_description: Converte a duration string to months
short_description: Convert a duration string to months
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to months.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_seconds
short_description: Converte a duration string to seconds
short_description: Converts a duration string to seconds
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to seconds.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_time_unit
short_description: Converte a duration string to the given time unit
short_description: Converts a duration string to the given time unit
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to the given time unit.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_weeks
short_description: Converte a duration string to weeks
short_description: Converts a duration string to weeks
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to weeks.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_years
short_description: Converte a duration string to years
short_description: Converts a duration string to years
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to years.

View File

@@ -49,9 +49,14 @@ RETURN = '''
from unicodedata import normalize
from ansible.errors import AnsibleFilterError, AnsibleFilterTypeError
from ansible.errors import AnsibleFilterError
from ansible.module_utils.six import text_type
try:
from ansible.errors import AnsibleTypeError
except ImportError:
from ansible.errors import AnsibleFilterTypeError as AnsibleTypeError
def unicode_normalize(data, form='NFC'):
"""Applies normalization to 'unicode' strings.
@@ -66,7 +71,7 @@ def unicode_normalize(data, form='NFC'):
"""
if not isinstance(data, text_type):
raise AnsibleFilterTypeError("%s is not a valid input type" % type(data))
raise AnsibleTypeError("%s is not a valid input type" % type(data))
if form not in ('NFC', 'NFD', 'NFKC', 'NFKD'):
raise AnsibleFilterError("%s is not a valid form" % form)

View File

@@ -276,16 +276,18 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
def _get_auth(self):
validate_certs = self.get_option('validate_certs')
if validate_certs is False:
from requests.packages.urllib3 import disable_warnings
disable_warnings()
if self.proxmox_password:
credentials = urlencode({'username': self.proxmox_user, 'password': self.proxmox_password})
a = self._get_session()
if a.verify is False:
from requests.packages.urllib3 import disable_warnings
disable_warnings()
ret = a.post('%s/api2/json/access/ticket' % self.proxmox_url, data=credentials)
json = ret.json()
@@ -302,12 +304,17 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
def _get_json(self, url, ignore_errors=None):
if not self.use_cache or url not in self._cache.get(self.cache_key, {}):
data = []
has_data = False
if self.cache_key not in self._cache:
self._cache[self.cache_key] = {'url': ''}
if self.use_cache:
try:
data = self._cache[self.cache_key][url]
has_data = True
except KeyError:
self.update_cache = True
data = []
if not has_data:
s = self._get_session()
while True:
ret = s.get(url, headers=self.headers)
@@ -333,9 +340,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
data = data + json['data']
break
self._cache[self.cache_key][url] = data
return make_unsafe(self._cache[self.cache_key][url])
self._results[url] = data
return make_unsafe(data)
def _get_nodes(self):
return self._get_json("%s/api2/json/nodes" % self.proxmox_url)
@@ -356,11 +362,26 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
def _get_node_ip(self, node):
ret = self._get_json("%s/api2/json/nodes/%s/network" % (self.proxmox_url, node))
# sort interface by iface name to make selection as stable as possible
ret.sort(key=lambda x: x['iface'])
for iface in ret:
try:
# only process interfaces adhering to these rules
if 'active' not in iface:
self.display.vvv(f"Interface {iface['iface']} on node {node} does not have an active state")
continue
if 'address' not in iface:
self.display.vvv(f"Interface {iface['iface']} on node {node} does not have an address")
continue
if 'gateway' not in iface:
self.display.vvv(f"Interface {iface['iface']} on node {node} does not have a gateway")
continue
self.display.vv(f"Using interface {iface['iface']} on node {node} with address {iface['address']} as node ip for ansible_host")
return iface['address']
except Exception:
return None
continue
return None
def _get_lxc_interfaces(self, properties, node, vmid):
status_key = self._fact('status')
@@ -676,10 +697,14 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
self.exclude_nodes = self.get_option('exclude_nodes')
self.cache_key = self.get_cache_key(path)
self.use_cache = cache and self.get_option('cache')
self.update_cache = not cache and self.get_option('cache')
self.host_filters = self.get_option('filters')
self.group_prefix = self.get_option('group_prefix')
self.facts_prefix = self.get_option('facts_prefix')
self.strict = self.get_option('strict')
# actually populate inventory
self._results = {}
self._populate()
if self.update_cache:
self._cache[self.cache_key] = self._results

View File

@@ -77,6 +77,8 @@ from ansible.module_utils.common.text.converters import to_text
from ansible.parsing.ajson import AnsibleJSONDecoder
from ansible.plugins.lookup import LookupBase
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
class BitwardenSecretsManagerException(AnsibleLookupError):
pass
@@ -114,6 +116,15 @@ class BitwardenSecretsManager(object):
rc = p.wait()
return to_text(out, errors='surrogate_or_strict'), to_text(err, errors='surrogate_or_strict'), rc
def get_bws_version(self):
"""Get the version of the Bitwarden Secrets Manager CLI.
"""
out, err, rc = self._run(['--version'])
if rc != 0:
raise BitwardenSecretsManagerException(to_text(err))
# strip the prefix and grab the last segment, the version number
return out.split()[-1]
def get_secret(self, secret_id, bws_access_token):
"""Get and return the secret with the given secret_id.
"""
@@ -122,10 +133,18 @@ class BitwardenSecretsManager(object):
# Color output was not always disabled correctly with the default 'auto' setting so explicitly disable it.
params = [
'--color', 'no',
'--access-token', bws_access_token,
'get', 'secret', secret_id
'--access-token', bws_access_token
]
# bws version 0.3.0 introduced a breaking change in the command line syntax:
# pre-0.3.0: verb noun
# 0.3.0 and later: noun verb
bws_version = self.get_bws_version()
if LooseVersion(bws_version) < LooseVersion('0.3.0'):
params.extend(['get', 'secret', secret_id])
else:
params.extend(['secret', 'get', secret_id])
out, err, rc = self._run_with_retry(params)
if rc != 0:
raise BitwardenSecretsManagerException(to_text(err))

View File

@@ -63,11 +63,11 @@ RETURN = """
import json
import os
import re
from importlib import import_module
import yaml
from ansible.errors import AnsibleLookupError
from ansible.module_utils.compat.importlib import import_module
from ansible.plugins.lookup import LookupBase

View File

@@ -130,12 +130,24 @@ from ansible.template import Templar
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
try:
from ansible.template import trust_as_template as _trust_as_template
HAS_DATATAGGING = True
except ImportError:
HAS_DATATAGGING = False
# Whether Templar has a cache, which can be controlled by Templar.template()'s cache option.
# The cache was removed for ansible-core 2.14 (https://github.com/ansible/ansible/pull/78419)
_TEMPLAR_HAS_TEMPLATE_CACHE = LooseVersion(ansible_version) < LooseVersion('2.14.0')
def _make_safe(value):
if HAS_DATATAGGING and isinstance(value, str):
return _trust_as_template(value)
return value
class LookupModule(LookupBase):
def __evaluate(self, expression, templar, variables):
"""Evaluate expression with templar.
@@ -144,10 +156,13 @@ class LookupModule(LookupBase):
``variables`` are the variables to use.
"""
templar.available_variables = variables or {}
expression = "{0}{1}{2}".format("{{", expression, "}}")
quoted_expression = "{0}{1}{2}".format("{{", expression, "}}")
if _TEMPLAR_HAS_TEMPLATE_CACHE:
return templar.template(expression, cache=False)
return templar.template(expression)
return templar.template(quoted_expression, cache=False)
if hasattr(templar, 'evaluate_expression'):
# This is available since the Data Tagging PR has been merged
return templar.evaluate_expression(_make_safe(expression))
return templar.template(quoted_expression)
def __process(self, result, terms, index, current, templar, variables):
"""Fills ``result`` list with evaluated items.

View File

@@ -453,12 +453,7 @@ class LookupModule(LookupBase):
raise AnsibleError("Lookup failed: %s" % str(err))
if not real_empty:
ret.append('NXDOMAIN')
except dns.resolver.NoAnswer as err:
if fail_on_error:
raise AnsibleError("Lookup failed: %s" % str(err))
if not real_empty:
ret.append("")
except dns.resolver.Timeout as err:
except (dns.resolver.NoAnswer, dns.resolver.Timeout, dns.resolver.NoNameservers) as err:
if fail_on_error:
raise AnsibleError("Lookup failed: %s" % str(err))
if not real_empty:

Some files were not shown because too many files have changed in this diff Show More