mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 02:16:50 +00:00
Compare commits
103 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9b7938cf6 | ||
|
|
053d0aec28 | ||
|
|
f9baa999a8 | ||
|
|
ab10b6ba36 | ||
|
|
e8a6fabf4c | ||
|
|
5fca1f641b | ||
|
|
88f0a4c770 | ||
|
|
9a565f356c | ||
|
|
3c0a9d7826 | ||
|
|
12cf3dc19a | ||
|
|
6e98e3d3eb | ||
|
|
716a1b924e | ||
|
|
fa4bf56fed | ||
|
|
2c385cfab5 | ||
|
|
e44011ff94 | ||
|
|
25ffe69b51 | ||
|
|
144945894f | ||
|
|
4c85efd807 | ||
|
|
cdadfa979e | ||
|
|
e3a8d238a8 | ||
|
|
93a1aa4e38 | ||
|
|
cf1b02c6b9 | ||
|
|
dda872c3e6 | ||
|
|
d90eb6444a | ||
|
|
93782ffb35 | ||
|
|
dac26d12bd | ||
|
|
22946365fc | ||
|
|
ddc546596e | ||
|
|
a618aa6b0a | ||
|
|
49598ac93a | ||
|
|
de7afabe17 | ||
|
|
fafe6ef87b | ||
|
|
148c133248 | ||
|
|
3bf688be39 | ||
|
|
bc8721c37c | ||
|
|
579bd879c1 | ||
|
|
d83a835a3c | ||
|
|
89e6e6c626 | ||
|
|
510a9228c0 | ||
|
|
8a43df548c | ||
|
|
491ba1b1a3 | ||
|
|
4d6f4c82e2 | ||
|
|
f5ad2cee8d | ||
|
|
5e6a7cab92 | ||
|
|
48c50fa335 | ||
|
|
a1e2ada993 | ||
|
|
d7eb5432f3 | ||
|
|
26f19db2f8 | ||
|
|
8bc0c103ad | ||
|
|
0e495aae75 | ||
|
|
840b1b82ac | ||
|
|
2b08a308bc | ||
|
|
04305e8d9d | ||
|
|
15109a26fd | ||
|
|
d1730adce0 | ||
|
|
69d7cce55c | ||
|
|
d80aca951c | ||
|
|
6f5462fb27 | ||
|
|
1c5c622ae8 | ||
|
|
0b9abdf3de | ||
|
|
f077c1e104 | ||
|
|
ba789d71ec | ||
|
|
897729b507 | ||
|
|
cf8107b628 | ||
|
|
fe922a26f0 | ||
|
|
485a3cc11e | ||
|
|
bdfa91b3df | ||
|
|
0123222ba8 | ||
|
|
3406288644 | ||
|
|
c44fc97d6c | ||
|
|
7901287dd3 | ||
|
|
f2d1099b83 | ||
|
|
438ed7ea0e | ||
|
|
a119ae2833 | ||
|
|
bcf984ec1c | ||
|
|
f28375eeb0 | ||
|
|
682469b9b8 | ||
|
|
3fa1c3ac2c | ||
|
|
0d96b65b4b | ||
|
|
6daf178146 | ||
|
|
f8d0e5448d | ||
|
|
2aa9fc7528 | ||
|
|
0317d506b8 | ||
|
|
274ab506ca | ||
|
|
4bef90fc7e | ||
|
|
438d38ddfe | ||
|
|
8b277cbe61 | ||
|
|
f1e0e590ab | ||
|
|
d65b6edfaf | ||
|
|
e0a86f172f | ||
|
|
81f66feea4 | ||
|
|
124f465819 | ||
|
|
85af92810c | ||
|
|
b8fdfdc644 | ||
|
|
3d6227d1e2 | ||
|
|
423509769d | ||
|
|
cdaf6d9493 | ||
|
|
e1017afe4a | ||
|
|
86dfc731ad | ||
|
|
58037799e4 | ||
|
|
1e5c0d5f42 | ||
|
|
d6a0c914d1 | ||
|
|
f190897687 |
@@ -339,10 +339,12 @@ stages:
|
||||
parameters:
|
||||
testFormat: devel/linux-community/{0}
|
||||
targets:
|
||||
- name: Debian Bullseye
|
||||
- name: Debian 11 Bullseye
|
||||
test: debian-bullseye/3.9
|
||||
- name: Debian Bookworm
|
||||
- name: Debian 12 Bookworm
|
||||
test: debian-bookworm/3.11
|
||||
- name: Debian 13 Trixie
|
||||
test: debian-13-trixie/3.13
|
||||
- name: ArchLinux
|
||||
test: archlinux/3.13
|
||||
groups:
|
||||
|
||||
20
.github/BOTMETA.yml
vendored
20
.github/BOTMETA.yml
vendored
@@ -209,6 +209,8 @@ files:
|
||||
maintainers: resmo
|
||||
$filters/to_months.yml:
|
||||
maintainers: resmo
|
||||
$filters/to_nice_yaml.yml:
|
||||
maintainers: felixfontein
|
||||
$filters/to_prettytable.py:
|
||||
maintainers: tgadiev
|
||||
$filters/to_seconds.yml:
|
||||
@@ -217,6 +219,10 @@ files:
|
||||
maintainers: resmo
|
||||
$filters/to_weeks.yml:
|
||||
maintainers: resmo
|
||||
$filters/to_yaml.py:
|
||||
maintainers: felixfontein
|
||||
$filters/to_yaml.yml:
|
||||
maintainers: felixfontein
|
||||
$filters/to_years.yml:
|
||||
maintainers: resmo
|
||||
$filters/unicode_normalize.py:
|
||||
@@ -254,6 +260,8 @@ files:
|
||||
maintainers: ddelnano shinuza
|
||||
$lookups/:
|
||||
labels: lookups
|
||||
$lookups/binary_file.py:
|
||||
maintainers: felixfontein
|
||||
$lookups/bitwarden_secrets_manager.py:
|
||||
maintainers: jantari
|
||||
$lookups/bitwarden.py:
|
||||
@@ -285,7 +293,7 @@ files:
|
||||
maintainers: dagwieers
|
||||
$lookups/flattened.py: {}
|
||||
$lookups/github_app_access_token.py:
|
||||
maintainers: weisheng-p
|
||||
maintainers: weisheng-p blavoie
|
||||
$lookups/hiera.py:
|
||||
maintainers: jparrill
|
||||
$lookups/keyring.py: {}
|
||||
@@ -548,6 +556,10 @@ files:
|
||||
maintainers: russoz
|
||||
$modules/django_createcachetable.py:
|
||||
maintainers: russoz
|
||||
$modules/django_dumpdata.py:
|
||||
maintainers: russoz
|
||||
$modules/django_loaddata.py:
|
||||
maintainers: russoz
|
||||
$modules/django_manage.py:
|
||||
ignore: scottanderson42 tastychutney
|
||||
labels: django_manage
|
||||
@@ -903,6 +915,8 @@ files:
|
||||
maintainers: abulimov
|
||||
$modules/lvm_pv.py:
|
||||
maintainers: klention
|
||||
$modules/lvm_pv_move_data.py:
|
||||
maintainers: klention
|
||||
$modules/lvg_rename.py:
|
||||
maintainers: lszomor
|
||||
$modules/lvol.py:
|
||||
@@ -1058,8 +1072,12 @@ files:
|
||||
maintainers: fraff
|
||||
$modules/pacemaker_cluster.py:
|
||||
maintainers: matbu munchtoast
|
||||
$modules/pacemaker_info.py:
|
||||
maintainers: munchtoast
|
||||
$modules/pacemaker_resource.py:
|
||||
maintainers: munchtoast
|
||||
$modules/pacemaker_stonith.py:
|
||||
maintainers: munchtoast
|
||||
$modules/packet_:
|
||||
maintainers: nurfet-becirevic t0mk
|
||||
$modules/packet_device.py:
|
||||
|
||||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
|
||||
2
.github/workflows/nox.yml
vendored
2
.github/workflows/nox.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
name: "Run extra sanity tests"
|
||||
steps:
|
||||
- name: Check out collection
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Run nox
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -530,3 +530,4 @@ tests/integration/cloud-config-*.ini
|
||||
|
||||
# VSCode specific extensions
|
||||
.vscode/settings.json
|
||||
.ansible
|
||||
|
||||
281
CHANGELOG.md
281
CHANGELOG.md
@@ -2,50 +2,241 @@
|
||||
|
||||
**Topics**
|
||||
|
||||
- <a href="#v11-1-2">v11\.1\.2</a>
|
||||
- <a href="#v11-3-0">v11\.3\.0</a>
|
||||
- <a href="#release-summary">Release Summary</a>
|
||||
- <a href="#minor-changes">Minor Changes</a>
|
||||
- <a href="#bugfixes">Bugfixes</a>
|
||||
- <a href="#v11-1-1">v11\.1\.1</a>
|
||||
- <a href="#release-summary-1">Release Summary</a>
|
||||
- <a href="#minor-changes-1">Minor Changes</a>
|
||||
- <a href="#bugfixes-1">Bugfixes</a>
|
||||
- <a href="#v11-1-0">v11\.1\.0</a>
|
||||
- <a href="#release-summary-2">Release Summary</a>
|
||||
- <a href="#minor-changes-2">Minor Changes</a>
|
||||
- <a href="#deprecated-features">Deprecated Features</a>
|
||||
- <a href="#bugfixes-2">Bugfixes</a>
|
||||
- <a href="#bugfixes">Bugfixes</a>
|
||||
- <a href="#new-plugins">New Plugins</a>
|
||||
- <a href="#callback">Callback</a>
|
||||
- <a href="#new-modules">New Modules</a>
|
||||
- <a href="#v11-0-0">v11\.0\.0</a>
|
||||
- <a href="#release-summary-3">Release Summary</a>
|
||||
- <a href="#minor-changes-3">Minor Changes</a>
|
||||
- <a href="#deprecated-features-1">Deprecated Features</a>
|
||||
- <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a>
|
||||
- <a href="#security-fixes">Security Fixes</a>
|
||||
- <a href="#bugfixes-3">Bugfixes</a>
|
||||
- <a href="#known-issues">Known Issues</a>
|
||||
- <a href="#new-plugins-1">New Plugins</a>
|
||||
- <a href="#callback-1">Callback</a>
|
||||
- <a href="#connection">Connection</a>
|
||||
- <a href="#filter">Filter</a>
|
||||
- <a href="#inventory">Inventory</a>
|
||||
- <a href="#new-modules">New Modules</a>
|
||||
- <a href="#v11-2-1">v11\.2\.1</a>
|
||||
- <a href="#release-summary-1">Release Summary</a>
|
||||
- <a href="#bugfixes-1">Bugfixes</a>
|
||||
- <a href="#v11-2-0">v11\.2\.0</a>
|
||||
- <a href="#release-summary-2">Release Summary</a>
|
||||
- <a href="#minor-changes-1">Minor Changes</a>
|
||||
- <a href="#deprecated-features-1">Deprecated Features</a>
|
||||
- <a href="#bugfixes-2">Bugfixes</a>
|
||||
- <a href="#new-plugins-1">New Plugins</a>
|
||||
- <a href="#lookup">Lookup</a>
|
||||
- <a href="#new-modules-1">New Modules</a>
|
||||
- <a href="#v11-1-2">v11\.1\.2</a>
|
||||
- <a href="#release-summary-3">Release Summary</a>
|
||||
- <a href="#minor-changes-2">Minor Changes</a>
|
||||
- <a href="#bugfixes-3">Bugfixes</a>
|
||||
- <a href="#v11-1-1">v11\.1\.1</a>
|
||||
- <a href="#release-summary-4">Release Summary</a>
|
||||
- <a href="#minor-changes-3">Minor Changes</a>
|
||||
- <a href="#bugfixes-4">Bugfixes</a>
|
||||
- <a href="#v11-1-0">v11\.1\.0</a>
|
||||
- <a href="#release-summary-5">Release Summary</a>
|
||||
- <a href="#minor-changes-4">Minor Changes</a>
|
||||
- <a href="#deprecated-features-2">Deprecated Features</a>
|
||||
- <a href="#bugfixes-5">Bugfixes</a>
|
||||
- <a href="#new-plugins-2">New Plugins</a>
|
||||
- <a href="#callback">Callback</a>
|
||||
- <a href="#new-modules-2">New Modules</a>
|
||||
- <a href="#v11-0-0">v11\.0\.0</a>
|
||||
- <a href="#release-summary-6">Release Summary</a>
|
||||
- <a href="#minor-changes-5">Minor Changes</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="#known-issues">Known Issues</a>
|
||||
- <a href="#new-plugins-3">New Plugins</a>
|
||||
- <a href="#callback-1">Callback</a>
|
||||
- <a href="#connection">Connection</a>
|
||||
- <a href="#filter-1">Filter</a>
|
||||
- <a href="#inventory">Inventory</a>
|
||||
- <a href="#lookup-1">Lookup</a>
|
||||
- <a href="#new-modules-3">New Modules</a>
|
||||
This changelog describes changes after version 10\.0\.0\.
|
||||
|
||||
<a id="v11-1-2"></a>
|
||||
## v11\.1\.2
|
||||
<a id="v11-3-0"></a>
|
||||
## v11\.3\.0
|
||||
|
||||
<a id="release-summary"></a>
|
||||
### Release Summary
|
||||
|
||||
Bugfix release\.
|
||||
Regular bugfix and feature release\.
|
||||
|
||||
<a id="minor-changes"></a>
|
||||
### Minor Changes
|
||||
|
||||
* android\_sdk \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10712](https\://github\.com/ansible\-collections/community\.general/pull/10712)\)\.
|
||||
* django module utils \- simplify/consolidate the common settings for the command line \([https\://github\.com/ansible\-collections/community\.general/pull/10684](https\://github\.com/ansible\-collections/community\.general/pull/10684)\)\.
|
||||
* django\_check \- rename parameter <code>database</code> to <code>databases</code>\, add alias for compatibility \([https\://github\.com/ansible\-collections/community\.general/pull/10700](https\://github\.com/ansible\-collections/community\.general/pull/10700)\)\.
|
||||
* django\_check \- simplify/consolidate the common settings for the command line \([https\://github\.com/ansible\-collections/community\.general/pull/10684](https\://github\.com/ansible\-collections/community\.general/pull/10684)\)\.
|
||||
* django\_createcachetable \- simplify/consolidate the common settings for the command line \([https\://github\.com/ansible\-collections/community\.general/pull/10684](https\://github\.com/ansible\-collections/community\.general/pull/10684)\)\.
|
||||
* elasticsearch\_plugin \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10712](https\://github\.com/ansible\-collections/community\.general/pull/10712)\)\.
|
||||
* filesize \- minor refactor to simplify string formatting \([https\://github\.com/ansible\-collections/community\.general/pull/10727](https\://github\.com/ansible\-collections/community\.general/pull/10727)\)\.
|
||||
* github\_app\_access\_token lookup plugin \- support both <code>jwt</code> and <code>pyjwt</code> to avoid conflict with other modules requirements \([https\://github\.com/ansible\-collections/community\.general/issues/10299](https\://github\.com/ansible\-collections/community\.general/issues/10299)\)\.
|
||||
* gitlab\_group\_access\_token \- add <code>planner</code> access level \([https\://github\.com/ansible\-collections/community\.general/pull/10679](https\://github\.com/ansible\-collections/community\.general/pull/10679)\)\.
|
||||
* gitlab\_group\_access\_token \- add missing scopes \([https\://github\.com/ansible\-collections/community\.general/pull/10785](https\://github\.com/ansible\-collections/community\.general/pull/10785)\)\.
|
||||
* gitlab\_group\_variable \- support masked\-and\-hidden variables \([https\://github\.com/ansible\-collections/community\.general/pull/10787](https\://github\.com/ansible\-collections/community\.general/pull/10787)\)\.
|
||||
* gitlab\_label \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10711](https\://github\.com/ansible\-collections/community\.general/pull/10711)\)\.
|
||||
* gitlab\_milestone \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10711](https\://github\.com/ansible\-collections/community\.general/pull/10711)\)\.
|
||||
* gitlab\_project\_access\_token \- add <code>planner</code> access level \([https\://github\.com/ansible\-collections/community\.general/pull/10679](https\://github\.com/ansible\-collections/community\.general/pull/10679)\)\.
|
||||
* gitlab\_project\_access\_token \- add missing scopes \([https\://github\.com/ansible\-collections/community\.general/pull/10785](https\://github\.com/ansible\-collections/community\.general/pull/10785)\)\.
|
||||
* gitlab\_project\_variable \- support masked\-and\-hidden variables \([https\://github\.com/ansible\-collections/community\.general/pull/10787](https\://github\.com/ansible\-collections/community\.general/pull/10787)\)\.
|
||||
* gitlab\_protected\_branch \- add <code>allow\_force\_push</code>\, <code>code\_owner\_approval\_required</code> \([https\://github\.com/ansible\-collections/community\.general/pull/10795](https\://github\.com/ansible\-collections/community\.general/pull/10795)\, [https\://github\.com/ansible\-collections/community\.general/issues/6432](https\://github\.com/ansible\-collections/community\.general/issues/6432)\, [https\://github\.com/ansible\-collections/community\.general/issues/10289](https\://github\.com/ansible\-collections/community\.general/issues/10289)\, [https\://github\.com/ansible\-collections/community\.general/issues/10765](https\://github\.com/ansible\-collections/community\.general/issues/10765)\)\.
|
||||
* gitlab\_protected\_branch \- update protected branches if possible instead of recreating them \([https\://github\.com/ansible\-collections/community\.general/pull/10795](https\://github\.com/ansible\-collections/community\.general/pull/10795)\)\.
|
||||
* iocage inventory plugin \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10712](https\://github\.com/ansible\-collections/community\.general/pull/10712)\)\.
|
||||
* ipa\_host \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10711](https\://github\.com/ansible\-collections/community\.general/pull/10711)\)\.
|
||||
* iptables\_state \- minor refactor to simplify string formatting \([https\://github\.com/ansible\-collections/community\.general/pull/10727](https\://github\.com/ansible\-collections/community\.general/pull/10727)\)\.
|
||||
* keycloak\_realm \- add support for WebAuthn policy configuration options\, including both regular and passwordless WebAuthn policies \([https\://github\.com/ansible\-collections/community\.general/pull/10791](https\://github\.com/ansible\-collections/community\.general/pull/10791)\)\.
|
||||
* lvg\_rename \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10711](https\://github\.com/ansible\-collections/community\.general/pull/10711)\)\.
|
||||
* manageiq \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10712](https\://github\.com/ansible\-collections/community\.general/pull/10712)\)\.
|
||||
* manageiq\_alert\_profiles \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10712](https\://github\.com/ansible\-collections/community\.general/pull/10712)\)\.
|
||||
* manageiq\_group \- minor refactor to simplify string formatting \([https\://github\.com/ansible\-collections/community\.general/pull/10727](https\://github\.com/ansible\-collections/community\.general/pull/10727)\)\.
|
||||
* manageiq\_tenant \- minor refactor to simplify string formatting \([https\://github\.com/ansible\-collections/community\.general/pull/10727](https\://github\.com/ansible\-collections/community\.general/pull/10727)\)\.
|
||||
* mssql\_db \- minor refactor to simplify string formatting \([https\://github\.com/ansible\-collections/community\.general/pull/10727](https\://github\.com/ansible\-collections/community\.general/pull/10727)\)\.
|
||||
* one\_vm \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10712](https\://github\.com/ansible\-collections/community\.general/pull/10712)\)\.
|
||||
* openbsd\_pkg \- add <code>autoremove</code> parameter to remove unused dependencies \([https\://github\.com/ansible\-collections/community\.general/pull/10705](https\://github\.com/ansible\-collections/community\.general/pull/10705)\)\.
|
||||
* openbsd\_pkg \- minor refactor to simplify string formatting \([https\://github\.com/ansible\-collections/community\.general/pull/10727](https\://github\.com/ansible\-collections/community\.general/pull/10727)\)\.
|
||||
* pacemaker\_resource \- add <code>state\=cleanup</code> for cleaning up pacemaker resources \([https\://github\.com/ansible\-collections/community\.general/pull/10413](https\://github\.com/ansible\-collections/community\.general/pull/10413)\)
|
||||
* pacemaker\_resource \- add <code>state\=cloned</code> for cloning pacemaker resources or groups \([https\://github\.com/ansible\-collections/community\.general/issues/10322](https\://github\.com/ansible\-collections/community\.general/issues/10322)\, [https\://github\.com/ansible\-collections/community\.general/pull/10665](https\://github\.com/ansible\-collections/community\.general/pull/10665)\)\.
|
||||
* pacemaker\_resource \- the parameter <code>name</code> is no longer a required parameter in community\.general 11\.3\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/10413](https\://github\.com/ansible\-collections/community\.general/pull/10413)\)
|
||||
* parted \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10642](https\://github\.com/ansible\-collections/community\.general/pull/10642)\)\.
|
||||
* random\_string lookup plugin \- allow to specify seed while generating random string \([https\://github\.com/ansible\-collections/community\.general/issues/5362](https\://github\.com/ansible\-collections/community\.general/issues/5362)\, [https\://github\.com/ansible\-collections/community\.general/pull/10710](https\://github\.com/ansible\-collections/community\.general/pull/10710)\)\.
|
||||
* scaleway modules \- add a <code>scaleway</code> group to use <code>module\_defaults</code> \([https\://github\.com/ansible\-collections/community\.general/pull/10647](https\://github\.com/ansible\-collections/community\.general/pull/10647)\)\.
|
||||
* scaleway\_container \- add a <code>cpu\_limit</code> argument \([https\://github\.com/ansible\-collections/community\.general/pull/10646](https\://github\.com/ansible\-collections/community\.general/pull/10646)\)\.
|
||||
* terraform \- minor refactor to improve readability \([https\://github\.com/ansible\-collections/community\.general/pull/10711](https\://github\.com/ansible\-collections/community\.general/pull/10711)\)\.
|
||||
* ufw \- minor refactor to simplify string formatting \([https\://github\.com/ansible\-collections/community\.general/pull/10727](https\://github\.com/ansible\-collections/community\.general/pull/10727)\)\.
|
||||
* xenserver module utils \- remove redundant constructs from argument specs \([https\://github\.com/ansible\-collections/community\.general/pull/10769](https\://github\.com/ansible\-collections/community\.general/pull/10769)\)\.
|
||||
* xenserver\_facts \- minor refactor to simplify string formatting \([https\://github\.com/ansible\-collections/community\.general/pull/10727](https\://github\.com/ansible\-collections/community\.general/pull/10727)\)\.
|
||||
* zfs\_facts \- minor refactor to simplify string formatting \([https\://github\.com/ansible\-collections/community\.general/pull/10727](https\://github\.com/ansible\-collections/community\.general/pull/10727)\)\.
|
||||
* zypper \- support the <code>\-\-gpg\-auto\-import\-keys</code> option in zypper \([https\://github\.com/ansible\-collections/community\.general/issues/10660](https\://github\.com/ansible\-collections/community\.general/issues/10660)\, [https\://github\.com/ansible\-collections/community\.general/pull/10661](https\://github\.com/ansible\-collections/community\.general/pull/10661)\)\.
|
||||
|
||||
<a id="deprecated-features"></a>
|
||||
### Deprecated Features
|
||||
|
||||
* hiera lookup plugin \- retrieving data with Hiera has been deprecated a long time ago\; because of that this plugin will be removed from community\.general 13\.0\.0\. If you disagree with this deprecation\, please create an issue in the community\.general repository \([https\://github\.com/ansible\-collections/community\.general/issues/4462](https\://github\.com/ansible\-collections/community\.general/issues/4462)\, [https\://github\.com/ansible\-collections/community\.general/pull/10779](https\://github\.com/ansible\-collections/community\.general/pull/10779)\)\.
|
||||
* oci\_utils module utils \- utils is deprecated and will be removed in community\.general 13\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/issues/10318](https\://github\.com/ansible\-collections/community\.general/issues/10318)\, [https\://github\.com/ansible\-collections/community\.general/pull/10652](https\://github\.com/ansible\-collections/community\.general/pull/10652)\)\.
|
||||
* oci\_vcn \- module is deprecated and will be removed in community\.general 13\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/issues/10318](https\://github\.com/ansible\-collections/community\.general/issues/10318)\, [https\://github\.com/ansible\-collections/community\.general/pull/10652](https\://github\.com/ansible\-collections/community\.general/pull/10652)\)\.
|
||||
* oracle\* doc fragments \- fragments are deprecated and will be removed in community\.general 13\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/issues/10318](https\://github\.com/ansible\-collections/community\.general/issues/10318)\, [https\://github\.com/ansible\-collections/community\.general/pull/10652](https\://github\.com/ansible\-collections/community\.general/pull/10652)\)\.
|
||||
|
||||
<a id="bugfixes"></a>
|
||||
### Bugfixes
|
||||
|
||||
* kdeconfig \- <code>kwriteconfig</code> executable could not be discovered automatically on systems with only <code>kwriteconfig6</code> installed\. <code>kwriteconfig6</code> can now be discovered by Ansible \([https\://github\.com/ansible\-collections/community\.general/issues/10746](https\://github\.com/ansible\-collections/community\.general/issues/10746)\, [https\://github\.com/ansible\-collections/community\.general/pull/10751](https\://github\.com/ansible\-collections/community\.general/pull/10751)\)\.
|
||||
* monit \- fix crash caused by an unknown status value returned from the monit service \([https\://github\.com/ansible\-collections/community\.general/issues/10742](https\://github\.com/ansible\-collections/community\.general/issues/10742)\, [https\://github\.com/ansible\-collections/community\.general/pull/10743](https\://github\.com/ansible\-collections/community\.general/pull/10743)\)\.
|
||||
* pacemaker \- use regex for matching <code>maintenance\-mode</code> output to determine cluster maintenance status \([https\://github\.com/ansible\-collections/community\.general/issues/10426](https\://github\.com/ansible\-collections/community\.general/issues/10426)\, [https\://github\.com/ansible\-collections/community\.general/pull/10707](https\://github\.com/ansible\-collections/community\.general/pull/10707)\)\.
|
||||
* selective callback plugin \- specify <code>ansible\_loop\_var</code> instead of the explicit value <code>item</code> when printing task result \([https\://github\.com/ansible\-collections/community\.general/pull/10752](https\://github\.com/ansible\-collections/community\.general/pull/10752)\)\.
|
||||
|
||||
<a id="new-plugins"></a>
|
||||
### New Plugins
|
||||
|
||||
<a id="filter"></a>
|
||||
#### Filter
|
||||
|
||||
* community\.general\.to\_nice\_yaml \- Convert variable to YAML string\.
|
||||
* community\.general\.to\_yaml \- Convert variable to YAML string\.
|
||||
|
||||
<a id="new-modules"></a>
|
||||
### New Modules
|
||||
|
||||
* community\.general\.django\_dumpdata \- Wrapper for C\(django\-admin dumpdata\)\.
|
||||
* community\.general\.django\_loaddata \- Wrapper for C\(django\-admin loaddata\)\.
|
||||
* community\.general\.pacemaker\_stonith \- Manage Pacemaker STONITH\.
|
||||
|
||||
<a id="v11-2-1"></a>
|
||||
## v11\.2\.1
|
||||
|
||||
<a id="release-summary-1"></a>
|
||||
### Release Summary
|
||||
|
||||
Bugfix release\.
|
||||
|
||||
<a id="bugfixes-1"></a>
|
||||
### Bugfixes
|
||||
|
||||
* Avoid deprecated functionality in ansible\-core 2\.20 \([https\://github\.com/ansible\-collections/community\.general/pull/10687](https\://github\.com/ansible\-collections/community\.general/pull/10687)\)\.
|
||||
* apache2\_module \- check the <code>cgi</code> module restrictions only during activation \([https\://github\.com/ansible\-collections/community\.general/pull/10423](https\://github\.com/ansible\-collections/community\.general/pull/10423)\)\.
|
||||
* composer \- fix broken command lines \([https\://github\.com/ansible\-collections/community\.general/issues/10662](https\://github\.com/ansible\-collections/community\.general/issues/10662)\, [https\://github\.com/ansible\-collections/community\.general/pull/10669](https\://github\.com/ansible\-collections/community\.general/pull/10669)\)\.
|
||||
* pacemaker\_resource \- fix <code>resource\_type</code> parameter formatting \([https\://github\.com/ansible\-collections/community\.general/issues/10426](https\://github\.com/ansible\-collections/community\.general/issues/10426)\, [https\://github\.com/ansible\-collections/community\.general/pull/10663](https\://github\.com/ansible\-collections/community\.general/pull/10663)\)\.
|
||||
* pids \- prevent error when an empty string is provided for <code>name</code> \([https\://github\.com/ansible\-collections/community\.general/issues/10672](https\://github\.com/ansible\-collections/community\.general/issues/10672)\, [https\://github\.com/ansible\-collections/community\.general/pull/10688](https\://github\.com/ansible\-collections/community\.general/pull/10688)\)\.
|
||||
|
||||
<a id="v11-2-0"></a>
|
||||
## v11\.2\.0
|
||||
|
||||
<a id="release-summary-2"></a>
|
||||
### Release Summary
|
||||
|
||||
Regular bugfix and features release\.
|
||||
|
||||
<a id="minor-changes-1"></a>
|
||||
### Minor Changes
|
||||
|
||||
* apk \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/issues/10479](https\://github\.com/ansible\-collections/community\.general/issues/10479)\, [https\://github\.com/ansible\-collections/community\.general/pull/10520](https\://github\.com/ansible\-collections/community\.general/pull/10520)\)\.
|
||||
* bzr \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10523](https\://github\.com/ansible\-collections/community\.general/pull/10523)\)\.
|
||||
* capabilities \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10524](https\://github\.com/ansible\-collections/community\.general/pull/10524)\)\.
|
||||
* composer \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10525](https\://github\.com/ansible\-collections/community\.general/pull/10525)\)\.
|
||||
* django module utils \- remove deprecated parameter <code>\_DjangoRunner</code> call \([https\://github\.com/ansible\-collections/community\.general/pull/10574](https\://github\.com/ansible\-collections/community\.general/pull/10574)\)\.
|
||||
* easy\_install \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10526](https\://github\.com/ansible\-collections/community\.general/pull/10526)\)\.
|
||||
* imgadm \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10536](https\://github\.com/ansible\-collections/community\.general/pull/10536)\)\.
|
||||
* jenkins\_plugin \- install dependencies for specific version \([https\://github\.com/ansible\-collections/community\.general/issue/4995](https\://github\.com/ansible\-collections/community\.general/issue/4995)\, [https\://github\.com/ansible\-collections/community\.general/pull/10346](https\://github\.com/ansible\-collections/community\.general/pull/10346)\)\.
|
||||
* keycloak\_identity\_provider – add support for <code>fromUrl</code> to automatically fetch OIDC endpoints from the well\-known discovery URL\, simplifying identity provider configuration \([https\://github\.com/ansible\-collections/community\.general/pull/10527](https\://github\.com/ansible\-collections/community\.general/pull/10527)\)\.
|
||||
* keycloak\_realm \- add support for <code>brute\_force\_strategy</code> and <code>max\_temporary\_lockouts</code> \([https\://github\.com/ansible\-collections/community\.general/issues/10412](https\://github\.com/ansible\-collections/community\.general/issues/10412)\, [https\://github\.com/ansible\-collections/community\.general/pull/10415](https\://github\.com/ansible\-collections/community\.general/pull/10415)\)\.
|
||||
* keycloak\_realm \- add support for client\-related options and Oauth2 device \([https\://github\.com/ansible\-collections/community\.general/pull/10538](https\://github\.com/ansible\-collections/community\.general/pull/10538)\)\.
|
||||
* logstash\_plugin \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/issues/10479](https\://github\.com/ansible\-collections/community\.general/issues/10479)\, [https\://github\.com/ansible\-collections/community\.general/pull/10520](https\://github\.com/ansible\-collections/community\.general/pull/10520)\)\.
|
||||
* nagios \- make parameter <code>services</code> a <code>list</code> instead of a <code>str</code> \([https\://github\.com/ansible\-collections/community\.general/pull/10493](https\://github\.com/ansible\-collections/community\.general/pull/10493)\)\.
|
||||
* open\_iscsi \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10599](https\://github\.com/ansible\-collections/community\.general/pull/10599)\)\.
|
||||
* pear \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10601](https\://github\.com/ansible\-collections/community\.general/pull/10601)\)\.
|
||||
* portage \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10602](https\://github\.com/ansible\-collections/community\.general/pull/10602)\)\.
|
||||
* riak \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10603](https\://github\.com/ansible\-collections/community\.general/pull/10603)\)\.
|
||||
* scaleway\_\* modules\, scaleway inventory plugin \- update available zones and API URLs \([https\://github\.com/ansible\-collections/community\.general/issues/10383](https\://github\.com/ansible\-collections/community\.general/issues/10383)\, [https\://github\.com/ansible\-collections/community\.general/pull/10424](https\://github\.com/ansible\-collections/community\.general/pull/10424)\)\.
|
||||
* sensu\_subscription \- normalize quotes in the module output \([https\://github\.com/ansible\-collections/community\.general/pull/10483](https\://github\.com/ansible\-collections/community\.general/pull/10483)\)\.
|
||||
* solaris\_zone \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10604](https\://github\.com/ansible\-collections/community\.general/pull/10604)\)\.
|
||||
* swupd \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10605](https\://github\.com/ansible\-collections/community\.general/pull/10605)\)\.
|
||||
* tasks\_only callback plugin \- add <code>result\_format</code> and <code>pretty\_results</code> options similarly to the default callback \([https\://github\.com/ansible\-collections/community\.general/pull/10422](https\://github\.com/ansible\-collections/community\.general/pull/10422)\)\.
|
||||
* timezone \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10612](https\://github\.com/ansible\-collections/community\.general/pull/10612)\)\.
|
||||
* urpmi \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10606](https\://github\.com/ansible\-collections/community\.general/pull/10606)\)\.
|
||||
* xbps \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10608](https\://github\.com/ansible\-collections/community\.general/pull/10608)\)\.
|
||||
* xfs\_quota \- using safer mechanism to run external command \([https\://github\.com/ansible\-collections/community\.general/pull/10609](https\://github\.com/ansible\-collections/community\.general/pull/10609)\)\.
|
||||
|
||||
<a id="deprecated-features-1"></a>
|
||||
### Deprecated Features
|
||||
|
||||
* bearychat \- module is deprecated and will be removed in community\.general 12\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/issues/10514](https\://github\.com/ansible\-collections/community\.general/issues/10514)\)\.
|
||||
* cpanm \- deprecate <code>mode\=compatibility</code>\, <code>mode\=new</code> should be used instead \([https\://github\.com/ansible\-collections/community\.general/pull/10434](https\://github\.com/ansible\-collections/community\.general/pull/10434)\)\.
|
||||
* github\_repo \- deprecate <code>force\_defaults\=true</code> \([https\://github\.com/ansible\-collections/community\.general/pull/10435](https\://github\.com/ansible\-collections/community\.general/pull/10435)\)\.
|
||||
* rocketchat \- the default value for <code>is\_pre740</code>\, currently <code>true</code>\, is deprecated and will change to <code>false</code> in community\.general 13\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/10490](https\://github\.com/ansible\-collections/community\.general/pull/10490)\)\.
|
||||
|
||||
<a id="bugfixes-2"></a>
|
||||
### Bugfixes
|
||||
|
||||
* jenkins\_plugin \- install latest compatible version instead of latest \([https\://github\.com/ansible\-collections/community\.general/issues/854](https\://github\.com/ansible\-collections/community\.general/issues/854)\, [https\://github\.com/ansible\-collections/community\.general/pull/10346](https\://github\.com/ansible\-collections/community\.general/pull/10346)\)\.
|
||||
* jenkins\_plugin \- separate Jenkins and external URL credentials \([https\://github\.com/ansible\-collections/community\.general/issues/4419](https\://github\.com/ansible\-collections/community\.general/issues/4419)\, [https\://github\.com/ansible\-collections/community\.general/pull/10346](https\://github\.com/ansible\-collections/community\.general/pull/10346)\)\.
|
||||
* lvm\_pv \- properly detect SCSI or NVMe devices to rescan \([https\://github\.com/ansible\-collections/community\.general/issues/10444](https\://github\.com/ansible\-collections/community\.general/issues/10444)\, [https\://github\.com/ansible\-collections/community\.general/pull/10596](https\://github\.com/ansible\-collections/community\.general/pull/10596)\)\.
|
||||
|
||||
<a id="new-plugins-1"></a>
|
||||
### New Plugins
|
||||
|
||||
<a id="lookup"></a>
|
||||
#### Lookup
|
||||
|
||||
* community\.general\.binary\_file \- Read binary file and return it Base64 encoded\.
|
||||
|
||||
<a id="new-modules-1"></a>
|
||||
### New Modules
|
||||
|
||||
* community\.general\.lvm\_pv\_move\_data \- Move data between LVM Physical Volumes \(PVs\)\.
|
||||
* community\.general\.pacemaker\_info \- Gather information about Pacemaker cluster\.
|
||||
|
||||
<a id="v11-1-2"></a>
|
||||
## v11\.1\.2
|
||||
|
||||
<a id="release-summary-3"></a>
|
||||
### Release Summary
|
||||
|
||||
Bugfix release\.
|
||||
|
||||
<a id="minor-changes-2"></a>
|
||||
### Minor Changes
|
||||
|
||||
* gem \- remove redundant constructs from argument specs \([https\://github\.com/ansible\-collections/community\.general/pull/10505](https\://github\.com/ansible\-collections/community\.general/pull/10505)\)\.
|
||||
* git\_config\_info \- remove redundant constructs from argument specs \([https\://github\.com/ansible\-collections/community\.general/pull/10505](https\://github\.com/ansible\-collections/community\.general/pull/10505)\)\.
|
||||
* github\_deploy\_key \- remove redundant constructs from argument specs \([https\://github\.com/ansible\-collections/community\.general/pull/10505](https\://github\.com/ansible\-collections/community\.general/pull/10505)\)\.
|
||||
@@ -177,7 +368,7 @@ Bugfix release\.
|
||||
* zypper \- remove redundant constructs from argument specs \([https\://github\.com/ansible\-collections/community\.general/pull/10513](https\://github\.com/ansible\-collections/community\.general/pull/10513)\)\.
|
||||
* zypper\_repository \- remove redundant constructs from argument specs \([https\://github\.com/ansible\-collections/community\.general/pull/10513](https\://github\.com/ansible\-collections/community\.general/pull/10513)\)\.
|
||||
|
||||
<a id="bugfixes"></a>
|
||||
<a id="bugfixes-3"></a>
|
||||
### Bugfixes
|
||||
|
||||
* apk \- fix check for empty/whitespace\-only package names \([https\://github\.com/ansible\-collections/community\.general/pull/10532](https\://github\.com/ansible\-collections/community\.general/pull/10532)\)\.
|
||||
@@ -191,12 +382,12 @@ Bugfix release\.
|
||||
<a id="v11-1-1"></a>
|
||||
## v11\.1\.1
|
||||
|
||||
<a id="release-summary-1"></a>
|
||||
<a id="release-summary-4"></a>
|
||||
### Release Summary
|
||||
|
||||
Bugfix release for the next Ansible 12 pre\-release\.
|
||||
|
||||
<a id="minor-changes-1"></a>
|
||||
<a id="minor-changes-3"></a>
|
||||
### Minor Changes
|
||||
|
||||
* aerospike\_migrations \- remove redundant constructs from argument specs \([https\://github\.com/ansible\-collections/community\.general/pull/10494](https\://github\.com/ansible\-collections/community\.general/pull/10494)\)\.
|
||||
@@ -227,7 +418,7 @@ Bugfix release for the next Ansible 12 pre\-release\.
|
||||
* filesystem \- remove redundant constructs from argument specs \([https\://github\.com/ansible\-collections/community\.general/pull/10494](https\://github\.com/ansible\-collections/community\.general/pull/10494)\)\.
|
||||
* sysrc \- adjustments to the code \([https\://github\.com/ansible\-collections/community\.general/pull/10417](https\://github\.com/ansible\-collections/community\.general/pull/10417)\)\.
|
||||
|
||||
<a id="bugfixes-1"></a>
|
||||
<a id="bugfixes-4"></a>
|
||||
### Bugfixes
|
||||
|
||||
* apache2\_module \- avoid ansible\-core 2\.19 deprecation \([https\://github\.com/ansible\-collections/community\.general/pull/10459](https\://github\.com/ansible\-collections/community\.general/pull/10459)\)\.
|
||||
@@ -245,12 +436,12 @@ Bugfix release for the next Ansible 12 pre\-release\.
|
||||
<a id="v11-1-0"></a>
|
||||
## v11\.1\.0
|
||||
|
||||
<a id="release-summary-2"></a>
|
||||
<a id="release-summary-5"></a>
|
||||
### Release Summary
|
||||
|
||||
Regular bugfix and feature release\.
|
||||
|
||||
<a id="minor-changes-2"></a>
|
||||
<a id="minor-changes-4"></a>
|
||||
### Minor Changes
|
||||
|
||||
* cloudflare\_dns \- adds support for PTR records \([https\://github\.com/ansible\-collections/community\.general/pull/10267](https\://github\.com/ansible\-collections/community\.general/pull/10267)\)\.
|
||||
@@ -299,13 +490,13 @@ Regular bugfix and feature release\.
|
||||
* xfconf \- minor adjustments the the code \([https\://github\.com/ansible\-collections/community\.general/pull/10311](https\://github\.com/ansible\-collections/community\.general/pull/10311)\)\.
|
||||
* xml \- remove redundant brackets in conditionals\, no functional changes \([https\://github\.com/ansible\-collections/community\.general/pull/10328](https\://github\.com/ansible\-collections/community\.general/pull/10328)\)\.
|
||||
|
||||
<a id="deprecated-features"></a>
|
||||
<a id="deprecated-features-2"></a>
|
||||
### Deprecated Features
|
||||
|
||||
* catapult \- module is deprecated and will be removed in community\.general 13\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/issues/10318](https\://github\.com/ansible\-collections/community\.general/issues/10318)\, [https\://github\.com/ansible\-collections/community\.general/pull/10329](https\://github\.com/ansible\-collections/community\.general/pull/10329)\)\.
|
||||
* pacemaker\_cluster \- the parameter <code>state</code> will become a required parameter in community\.general 12\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/10227](https\://github\.com/ansible\-collections/community\.general/pull/10227)\)\.
|
||||
|
||||
<a id="bugfixes-2"></a>
|
||||
<a id="bugfixes-5"></a>
|
||||
### Bugfixes
|
||||
|
||||
* dependent lookup plugin \- avoid deprecated ansible\-core 2\.19 functionality \([https\://github\.com/ansible\-collections/community\.general/pull/10359](https\://github\.com/ansible\-collections/community\.general/pull/10359)\)\.
|
||||
@@ -315,7 +506,7 @@ Regular bugfix and feature release\.
|
||||
* linode inventory plugin \- avoid using deprecated option when templating options \([https\://github\.com/ansible\-collections/community\.general/pull/10271](https\://github\.com/ansible\-collections/community\.general/pull/10271)\)\.
|
||||
* logstash callback plugin \- remove reference to Python 2 library \([https\://github\.com/ansible\-collections/community\.general/pull/10345](https\://github\.com/ansible\-collections/community\.general/pull/10345)\)\.
|
||||
|
||||
<a id="new-plugins"></a>
|
||||
<a id="new-plugins-2"></a>
|
||||
### New Plugins
|
||||
|
||||
<a id="callback"></a>
|
||||
@@ -323,7 +514,7 @@ Regular bugfix and feature release\.
|
||||
|
||||
* community\.general\.tasks\_only \- Only show tasks\.
|
||||
|
||||
<a id="new-modules"></a>
|
||||
<a id="new-modules-2"></a>
|
||||
### New Modules
|
||||
|
||||
* community\.general\.jenkins\_credential \- Manage Jenkins credentials and domains via API\.
|
||||
@@ -331,12 +522,12 @@ Regular bugfix and feature release\.
|
||||
<a id="v11-0-0"></a>
|
||||
## v11\.0\.0
|
||||
|
||||
<a id="release-summary-3"></a>
|
||||
<a id="release-summary-6"></a>
|
||||
### Release Summary
|
||||
|
||||
This is release 11\.0\.0 of <code>community\.general</code>\, released on 2025\-06\-16\.
|
||||
|
||||
<a id="minor-changes-3"></a>
|
||||
<a id="minor-changes-5"></a>
|
||||
### Minor Changes
|
||||
|
||||
* CmdRunner module utils \- the convenience method <code>cmd\_runner\_fmt\.as\_fixed\(\)</code> now accepts multiple arguments as a list \([https\://github\.com/ansible\-collections/community\.general/pull/9893](https\://github\.com/ansible\-collections/community\.general/pull/9893)\)\.
|
||||
@@ -670,7 +861,7 @@ This is release 11\.0\.0 of <code>community\.general</code>\, released on 2025\-
|
||||
* zypper \- add <code>simple\_errors</code> option \([https\://github\.com/ansible\-collections/community\.general/pull/9270](https\://github\.com/ansible\-collections/community\.general/pull/9270)\)\.
|
||||
* zypper \- adds <code>skip\_post\_errors</code> that allows to skip RPM post\-install errors \(Zypper return code 107\) \([https\://github\.com/ansible\-collections/community\.general/issues/9972](https\://github\.com/ansible\-collections/community\.general/issues/9972)\)\.
|
||||
|
||||
<a id="deprecated-features-1"></a>
|
||||
<a id="deprecated-features-3"></a>
|
||||
### Deprecated Features
|
||||
|
||||
* MH module utils \- attribute <code>debug</code> definition in subclasses of MH is now deprecated\, as that name will become a delegation to <code>AnsibleModule</code> in community\.general 12\.0\.0\, and any such attribute will be overridden by that delegation in that version \([https\://github\.com/ansible\-collections/community\.general/pull/9577](https\://github\.com/ansible\-collections/community\.general/pull/9577)\)\.
|
||||
@@ -730,7 +921,7 @@ This is release 11\.0\.0 of <code>community\.general</code>\, released on 2025\-
|
||||
* 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)\)\.
|
||||
* 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>
|
||||
<a id="bugfixes-6"></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)\)\.
|
||||
@@ -813,7 +1004,7 @@ This is release 11\.0\.0 of <code>community\.general</code>\, released on 2025\-
|
||||
|
||||
* 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="new-plugins-1"></a>
|
||||
<a id="new-plugins-3"></a>
|
||||
### New Plugins
|
||||
|
||||
<a id="callback-1"></a>
|
||||
@@ -826,7 +1017,7 @@ This is release 11\.0\.0 of <code>community\.general</code>\, released on 2025\-
|
||||
|
||||
* community\.general\.wsl \- Run tasks in WSL distribution using wsl\.exe CLI via SSH\.
|
||||
|
||||
<a id="filter"></a>
|
||||
<a id="filter-1"></a>
|
||||
#### Filter
|
||||
|
||||
* community\.general\.accumulate \- Produce a list of accumulated sums of the input list contents\.
|
||||
@@ -840,12 +1031,12 @@ This is release 11\.0\.0 of <code>community\.general</code>\, released on 2025\-
|
||||
|
||||
* community\.general\.iocage \- iocage inventory source\.
|
||||
|
||||
<a id="lookup"></a>
|
||||
<a id="lookup-1"></a>
|
||||
#### Lookup
|
||||
|
||||
* community\.general\.onepassword\_ssh\_key \- Fetch SSH keys stored in 1Password\.
|
||||
|
||||
<a id="new-modules-1"></a>
|
||||
<a id="new-modules-3"></a>
|
||||
### New Modules
|
||||
|
||||
* community\.general\.android\_sdk \- Manages Android SDK packages\.
|
||||
|
||||
172
CHANGELOG.rst
172
CHANGELOG.rst
@@ -6,6 +6,178 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 10.0.0.
|
||||
|
||||
v11.3.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix and feature release.
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- android_sdk - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- django module utils - simplify/consolidate the common settings for the command line (https://github.com/ansible-collections/community.general/pull/10684).
|
||||
- django_check - rename parameter ``database`` to ``databases``, add alias for compatibility (https://github.com/ansible-collections/community.general/pull/10700).
|
||||
- django_check - simplify/consolidate the common settings for the command line (https://github.com/ansible-collections/community.general/pull/10684).
|
||||
- django_createcachetable - simplify/consolidate the common settings for the command line (https://github.com/ansible-collections/community.general/pull/10684).
|
||||
- elasticsearch_plugin - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- filesize - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- github_app_access_token lookup plugin - support both ``jwt`` and ``pyjwt`` to avoid conflict with other modules requirements (https://github.com/ansible-collections/community.general/issues/10299).
|
||||
- gitlab_group_access_token - add ``planner`` access level (https://github.com/ansible-collections/community.general/pull/10679).
|
||||
- gitlab_group_access_token - add missing scopes (https://github.com/ansible-collections/community.general/pull/10785).
|
||||
- gitlab_group_variable - support masked-and-hidden variables (https://github.com/ansible-collections/community.general/pull/10787).
|
||||
- gitlab_label - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- gitlab_milestone - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- gitlab_project_access_token - add ``planner`` access level (https://github.com/ansible-collections/community.general/pull/10679).
|
||||
- gitlab_project_access_token - add missing scopes (https://github.com/ansible-collections/community.general/pull/10785).
|
||||
- gitlab_project_variable - support masked-and-hidden variables (https://github.com/ansible-collections/community.general/pull/10787).
|
||||
- gitlab_protected_branch - add ``allow_force_push``, ``code_owner_approval_required`` (https://github.com/ansible-collections/community.general/pull/10795, https://github.com/ansible-collections/community.general/issues/6432, https://github.com/ansible-collections/community.general/issues/10289, https://github.com/ansible-collections/community.general/issues/10765).
|
||||
- gitlab_protected_branch - update protected branches if possible instead of recreating them (https://github.com/ansible-collections/community.general/pull/10795).
|
||||
- iocage inventory plugin - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- ipa_host - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- iptables_state - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- keycloak_realm - add support for WebAuthn policy configuration options, including both regular and passwordless WebAuthn policies (https://github.com/ansible-collections/community.general/pull/10791).
|
||||
- lvg_rename - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- manageiq - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- manageiq_alert_profiles - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- manageiq_group - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- manageiq_tenant - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- mssql_db - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- one_vm - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- openbsd_pkg - add ``autoremove`` parameter to remove unused dependencies (https://github.com/ansible-collections/community.general/pull/10705).
|
||||
- openbsd_pkg - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- pacemaker_resource - add ``state=cleanup`` for cleaning up pacemaker resources (https://github.com/ansible-collections/community.general/pull/10413)
|
||||
- pacemaker_resource - add ``state=cloned`` for cloning pacemaker resources or groups (https://github.com/ansible-collections/community.general/issues/10322, https://github.com/ansible-collections/community.general/pull/10665).
|
||||
- pacemaker_resource - the parameter ``name`` is no longer a required parameter in community.general 11.3.0 (https://github.com/ansible-collections/community.general/pull/10413)
|
||||
- parted - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10642).
|
||||
- random_string lookup plugin - allow to specify seed while generating random string (https://github.com/ansible-collections/community.general/issues/5362, https://github.com/ansible-collections/community.general/pull/10710).
|
||||
- scaleway modules - add a ``scaleway`` group to use ``module_defaults`` (https://github.com/ansible-collections/community.general/pull/10647).
|
||||
- scaleway_container - add a ``cpu_limit`` argument (https://github.com/ansible-collections/community.general/pull/10646).
|
||||
- terraform - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- ufw - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- xenserver module utils - remove redundant constructs from argument specs (https://github.com/ansible-collections/community.general/pull/10769).
|
||||
- xenserver_facts - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- zfs_facts - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- zypper - support the ``--gpg-auto-import-keys`` option in zypper (https://github.com/ansible-collections/community.general/issues/10660, https://github.com/ansible-collections/community.general/pull/10661).
|
||||
|
||||
Deprecated Features
|
||||
-------------------
|
||||
|
||||
- hiera lookup plugin - retrieving data with Hiera has been deprecated a long time ago; because of that this plugin will be removed from community.general 13.0.0. If you disagree with this deprecation, please create an issue in the community.general repository (https://github.com/ansible-collections/community.general/issues/4462, https://github.com/ansible-collections/community.general/pull/10779).
|
||||
- oci_utils module utils - utils is deprecated and will be removed in community.general 13.0.0 (https://github.com/ansible-collections/community.general/issues/10318, https://github.com/ansible-collections/community.general/pull/10652).
|
||||
- oci_vcn - module is deprecated and will be removed in community.general 13.0.0 (https://github.com/ansible-collections/community.general/issues/10318, https://github.com/ansible-collections/community.general/pull/10652).
|
||||
- oracle* doc fragments - fragments are deprecated and will be removed in community.general 13.0.0 (https://github.com/ansible-collections/community.general/issues/10318, https://github.com/ansible-collections/community.general/pull/10652).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- kdeconfig - ``kwriteconfig`` executable could not be discovered automatically on systems with only ``kwriteconfig6`` installed. ``kwriteconfig6`` can now be discovered by Ansible (https://github.com/ansible-collections/community.general/issues/10746, https://github.com/ansible-collections/community.general/pull/10751).
|
||||
- monit - fix crash caused by an unknown status value returned from the monit service (https://github.com/ansible-collections/community.general/issues/10742, https://github.com/ansible-collections/community.general/pull/10743).
|
||||
- pacemaker - use regex for matching ``maintenance-mode`` output to determine cluster maintenance status (https://github.com/ansible-collections/community.general/issues/10426, https://github.com/ansible-collections/community.general/pull/10707).
|
||||
- selective callback plugin - specify ``ansible_loop_var`` instead of the explicit value ``item`` when printing task result (https://github.com/ansible-collections/community.general/pull/10752).
|
||||
|
||||
New Plugins
|
||||
-----------
|
||||
|
||||
Filter
|
||||
~~~~~~
|
||||
|
||||
- community.general.to_nice_yaml - Convert variable to YAML string.
|
||||
- community.general.to_yaml - Convert variable to YAML string.
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
- community.general.django_dumpdata - Wrapper for C(django-admin dumpdata).
|
||||
- community.general.django_loaddata - Wrapper for C(django-admin loaddata).
|
||||
- community.general.pacemaker_stonith - Manage Pacemaker STONITH.
|
||||
|
||||
v11.2.1
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfix release.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Avoid deprecated functionality in ansible-core 2.20 (https://github.com/ansible-collections/community.general/pull/10687).
|
||||
- apache2_module - check the ``cgi`` module restrictions only during activation (https://github.com/ansible-collections/community.general/pull/10423).
|
||||
- composer - fix broken command lines (https://github.com/ansible-collections/community.general/issues/10662, https://github.com/ansible-collections/community.general/pull/10669).
|
||||
- pacemaker_resource - fix ``resource_type`` parameter formatting (https://github.com/ansible-collections/community.general/issues/10426, https://github.com/ansible-collections/community.general/pull/10663).
|
||||
- pids - prevent error when an empty string is provided for ``name`` (https://github.com/ansible-collections/community.general/issues/10672, https://github.com/ansible-collections/community.general/pull/10688).
|
||||
|
||||
v11.2.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix and features release.
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- apk - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/issues/10479, https://github.com/ansible-collections/community.general/pull/10520).
|
||||
- bzr - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10523).
|
||||
- capabilities - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10524).
|
||||
- composer - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10525).
|
||||
- django module utils - remove deprecated parameter ``_DjangoRunner`` call (https://github.com/ansible-collections/community.general/pull/10574).
|
||||
- easy_install - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10526).
|
||||
- imgadm - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10536).
|
||||
- jenkins_plugin - install dependencies for specific version (https://github.com/ansible-collections/community.general/issue/4995, https://github.com/ansible-collections/community.general/pull/10346).
|
||||
- keycloak_identity_provider – add support for ``fromUrl`` to automatically fetch OIDC endpoints from the well-known discovery URL, simplifying identity provider configuration (https://github.com/ansible-collections/community.general/pull/10527).
|
||||
- keycloak_realm - add support for ``brute_force_strategy`` and ``max_temporary_lockouts`` (https://github.com/ansible-collections/community.general/issues/10412, https://github.com/ansible-collections/community.general/pull/10415).
|
||||
- keycloak_realm - add support for client-related options and Oauth2 device (https://github.com/ansible-collections/community.general/pull/10538).
|
||||
- logstash_plugin - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/issues/10479, https://github.com/ansible-collections/community.general/pull/10520).
|
||||
- nagios - make parameter ``services`` a ``list`` instead of a ``str`` (https://github.com/ansible-collections/community.general/pull/10493).
|
||||
- open_iscsi - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10599).
|
||||
- pear - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10601).
|
||||
- portage - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10602).
|
||||
- riak - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10603).
|
||||
- scaleway_* modules, scaleway inventory plugin - update available zones and API URLs (https://github.com/ansible-collections/community.general/issues/10383, https://github.com/ansible-collections/community.general/pull/10424).
|
||||
- sensu_subscription - normalize quotes in the module output (https://github.com/ansible-collections/community.general/pull/10483).
|
||||
- solaris_zone - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10604).
|
||||
- swupd - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10605).
|
||||
- tasks_only callback plugin - add ``result_format`` and ``pretty_results`` options similarly to the default callback (https://github.com/ansible-collections/community.general/pull/10422).
|
||||
- timezone - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10612).
|
||||
- urpmi - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10606).
|
||||
- xbps - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10608).
|
||||
- xfs_quota - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10609).
|
||||
|
||||
Deprecated Features
|
||||
-------------------
|
||||
|
||||
- bearychat - module is deprecated and will be removed in community.general 12.0.0 (https://github.com/ansible-collections/community.general/issues/10514).
|
||||
- cpanm - deprecate ``mode=compatibility``, ``mode=new`` should be used instead (https://github.com/ansible-collections/community.general/pull/10434).
|
||||
- github_repo - deprecate ``force_defaults=true`` (https://github.com/ansible-collections/community.general/pull/10435).
|
||||
- rocketchat - the default value for ``is_pre740``, currently ``true``, is deprecated and will change to ``false`` in community.general 13.0.0 (https://github.com/ansible-collections/community.general/pull/10490).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- jenkins_plugin - install latest compatible version instead of latest (https://github.com/ansible-collections/community.general/issues/854, https://github.com/ansible-collections/community.general/pull/10346).
|
||||
- jenkins_plugin - separate Jenkins and external URL credentials (https://github.com/ansible-collections/community.general/issues/4419, https://github.com/ansible-collections/community.general/pull/10346).
|
||||
- lvm_pv - properly detect SCSI or NVMe devices to rescan (https://github.com/ansible-collections/community.general/issues/10444, https://github.com/ansible-collections/community.general/pull/10596).
|
||||
|
||||
New Plugins
|
||||
-----------
|
||||
|
||||
Lookup
|
||||
~~~~~~
|
||||
|
||||
- community.general.binary_file - Read binary file and return it Base64 encoded.
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
- community.general.lvm_pv_move_data - Move data between LVM Physical Volumes (PVs).
|
||||
- community.general.pacemaker_info - Gather information about Pacemaker cluster.
|
||||
|
||||
v11.1.2
|
||||
=======
|
||||
|
||||
|
||||
@@ -79,6 +79,11 @@ exclusions = [
|
||||
]
|
||||
doc_fragment = "community.general.keycloak.actiongroup_keycloak"
|
||||
|
||||
[[sessions.extra_checks.action_groups_config]]
|
||||
name = "scaleway"
|
||||
pattern = "^scaleway_.*$"
|
||||
doc_fragment = "community.general.scaleway.actiongroup_scaleway"
|
||||
|
||||
[sessions.build_import_check]
|
||||
run_galaxy_importer = true
|
||||
|
||||
|
||||
@@ -1474,3 +1474,268 @@ releases:
|
||||
- 11.1.2.yml
|
||||
- become-pipelining.yml
|
||||
release_date: '2025-08-04'
|
||||
11.2.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- jenkins_plugin - install latest compatible version instead of latest (https://github.com/ansible-collections/community.general/issues/854,
|
||||
https://github.com/ansible-collections/community.general/pull/10346).
|
||||
- jenkins_plugin - separate Jenkins and external URL credentials (https://github.com/ansible-collections/community.general/issues/4419,
|
||||
https://github.com/ansible-collections/community.general/pull/10346).
|
||||
- lvm_pv - properly detect SCSI or NVMe devices to rescan (https://github.com/ansible-collections/community.general/issues/10444,
|
||||
https://github.com/ansible-collections/community.general/pull/10596).
|
||||
deprecated_features:
|
||||
- bearychat - module is deprecated and will be removed in community.general
|
||||
12.0.0 (https://github.com/ansible-collections/community.general/issues/10514).
|
||||
- cpanm - deprecate ``mode=compatibility``, ``mode=new`` should be used instead
|
||||
(https://github.com/ansible-collections/community.general/pull/10434).
|
||||
- github_repo - deprecate ``force_defaults=true`` (https://github.com/ansible-collections/community.general/pull/10435).
|
||||
- rocketchat - the default value for ``is_pre740``, currently ``true``, is
|
||||
deprecated and will change to ``false`` in community.general 13.0.0 (https://github.com/ansible-collections/community.general/pull/10490).
|
||||
minor_changes:
|
||||
- apk - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/issues/10479,
|
||||
https://github.com/ansible-collections/community.general/pull/10520).
|
||||
- bzr - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10523).
|
||||
- capabilities - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10524).
|
||||
- composer - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10525).
|
||||
- django module utils - remove deprecated parameter ``_DjangoRunner`` call
|
||||
(https://github.com/ansible-collections/community.general/pull/10574).
|
||||
- easy_install - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10526).
|
||||
- imgadm - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10536).
|
||||
- jenkins_plugin - install dependencies for specific version (https://github.com/ansible-collections/community.general/issue/4995,
|
||||
https://github.com/ansible-collections/community.general/pull/10346).
|
||||
- "keycloak_identity_provider \u2013 add support for ``fromUrl`` to automatically\
|
||||
\ fetch OIDC endpoints from the well-known discovery URL, simplifying identity\
|
||||
\ provider configuration (https://github.com/ansible-collections/community.general/pull/10527)."
|
||||
- keycloak_realm - add support for ``brute_force_strategy`` and ``max_temporary_lockouts``
|
||||
(https://github.com/ansible-collections/community.general/issues/10412,
|
||||
https://github.com/ansible-collections/community.general/pull/10415).
|
||||
- keycloak_realm - add support for client-related options and Oauth2 device
|
||||
(https://github.com/ansible-collections/community.general/pull/10538).
|
||||
- logstash_plugin - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/issues/10479,
|
||||
https://github.com/ansible-collections/community.general/pull/10520).
|
||||
- nagios - make parameter ``services`` a ``list`` instead of a ``str`` (https://github.com/ansible-collections/community.general/pull/10493).
|
||||
- open_iscsi - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10599).
|
||||
- pear - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10601).
|
||||
- portage - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10602).
|
||||
- riak - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10603).
|
||||
- scaleway_* modules, scaleway inventory plugin - update available zones and
|
||||
API URLs (https://github.com/ansible-collections/community.general/issues/10383,
|
||||
https://github.com/ansible-collections/community.general/pull/10424).
|
||||
- sensu_subscription - normalize quotes in the module output (https://github.com/ansible-collections/community.general/pull/10483).
|
||||
- solaris_zone - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10604).
|
||||
- swupd - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10605).
|
||||
- tasks_only callback plugin - add ``result_format`` and ``pretty_results``
|
||||
options similarly to the default callback (https://github.com/ansible-collections/community.general/pull/10422).
|
||||
- timezone - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10612).
|
||||
- urpmi - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10606).
|
||||
- xbps - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10608).
|
||||
- xfs_quota - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10609).
|
||||
release_summary: Regular bugfix and features release.
|
||||
fragments:
|
||||
- 10346-jenkins-plugins-fixes.yml
|
||||
- 10415-keycloak-realm-brute-force-attributes.yml
|
||||
- 10422-tasks_only-result_format.yml
|
||||
- 10424-scaleway-update-zones.yml
|
||||
- 10434-cpanm-deprecate-compat-mode.yml
|
||||
- 10435-github-repo-deprecate-force-defaults.yml
|
||||
- 10483-sensu-subscription-quotes.yml
|
||||
- 10490-rocketchat.yml
|
||||
- 10493-nagios-services.yml
|
||||
- 10514-deprecate-bearychat.yml
|
||||
- 10520-arg-runcommand-list.yml
|
||||
- 10523-bzr-cmd-list.yml
|
||||
- 10524-capabilities-cmd-list.yml
|
||||
- 10525-composer-cmd-list.yml
|
||||
- 10526-easy-install-cmd-list.yml
|
||||
- 10527-keycloak-idp-well-known-url-support.yml
|
||||
- 10536-imgadm-cmd-list.yml
|
||||
- 10538-keycloak-realm-add-support-client-options.yml
|
||||
- 10573-logstash-plugin-cmd-list.yml
|
||||
- 10574-django-runner.yml
|
||||
- 10599-open-iscsi-cmd-list.yml
|
||||
- 10601-pear-cmd-list.yml
|
||||
- 10602-portage-cmd-list.yml
|
||||
- 10603-riak-cmd-list.yml
|
||||
- 10604-solaris-zone-cmd-list.yml
|
||||
- 10605-swupd-cmd-list.yml
|
||||
- 10606-urpmi-cmd-list.yml
|
||||
- 10608-xbps-cmd-list.yml
|
||||
- 10609-xfs-quota-cmd-list.yml
|
||||
- 10612-timezone-cmd-list.yml
|
||||
- 11.2.0.yml
|
||||
- lvm_pv.yml
|
||||
modules:
|
||||
- description: Move data between LVM Physical Volumes (PVs).
|
||||
name: lvm_pv_move_data
|
||||
namespace: ''
|
||||
- description: Gather information about Pacemaker cluster.
|
||||
name: pacemaker_info
|
||||
namespace: ''
|
||||
plugins:
|
||||
lookup:
|
||||
- description: Read binary file and return it Base64 encoded.
|
||||
name: binary_file
|
||||
namespace: null
|
||||
release_date: '2025-08-11'
|
||||
11.2.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Avoid deprecated functionality in ansible-core 2.20 (https://github.com/ansible-collections/community.general/pull/10687).
|
||||
- apache2_module - check the ``cgi`` module restrictions only during activation
|
||||
(https://github.com/ansible-collections/community.general/pull/10423).
|
||||
- composer - fix broken command lines (https://github.com/ansible-collections/community.general/issues/10662,
|
||||
https://github.com/ansible-collections/community.general/pull/10669).
|
||||
- pacemaker_resource - fix ``resource_type`` parameter formatting (https://github.com/ansible-collections/community.general/issues/10426,
|
||||
https://github.com/ansible-collections/community.general/pull/10663).
|
||||
- pids - prevent error when an empty string is provided for ``name`` (https://github.com/ansible-collections/community.general/issues/10672,
|
||||
https://github.com/ansible-collections/community.general/pull/10688).
|
||||
release_summary: Bugfix release.
|
||||
fragments:
|
||||
- 10423-apache_module-condition.yml
|
||||
- 10663-pacemaker-resource-fix-resource-type.yml
|
||||
- 10680-composer.yml
|
||||
- 10687-deprecations.yml
|
||||
- 10688-pids.yml
|
||||
- 11.2.1.yml
|
||||
release_date: '2025-08-18'
|
||||
11.3.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- kdeconfig - ``kwriteconfig`` executable could not be discovered automatically
|
||||
on systems with only ``kwriteconfig6`` installed. ``kwriteconfig6`` can
|
||||
now be discovered by Ansible (https://github.com/ansible-collections/community.general/issues/10746,
|
||||
https://github.com/ansible-collections/community.general/pull/10751).
|
||||
- monit - fix crash caused by an unknown status value returned from the monit
|
||||
service (https://github.com/ansible-collections/community.general/issues/10742,
|
||||
https://github.com/ansible-collections/community.general/pull/10743).
|
||||
- pacemaker - use regex for matching ``maintenance-mode`` output to determine
|
||||
cluster maintenance status (https://github.com/ansible-collections/community.general/issues/10426,
|
||||
https://github.com/ansible-collections/community.general/pull/10707).
|
||||
- selective callback plugin - specify ``ansible_loop_var`` instead of the
|
||||
explicit value ``item`` when printing task result (https://github.com/ansible-collections/community.general/pull/10752).
|
||||
deprecated_features:
|
||||
- hiera lookup plugin - retrieving data with Hiera has been deprecated a long
|
||||
time ago; because of that this plugin will be removed from community.general
|
||||
13.0.0. If you disagree with this deprecation, please create an issue in
|
||||
the community.general repository (https://github.com/ansible-collections/community.general/issues/4462,
|
||||
https://github.com/ansible-collections/community.general/pull/10779).
|
||||
- oci_utils module utils - utils is deprecated and will be removed in community.general
|
||||
13.0.0 (https://github.com/ansible-collections/community.general/issues/10318,
|
||||
https://github.com/ansible-collections/community.general/pull/10652).
|
||||
- oci_vcn - module is deprecated and will be removed in community.general
|
||||
13.0.0 (https://github.com/ansible-collections/community.general/issues/10318,
|
||||
https://github.com/ansible-collections/community.general/pull/10652).
|
||||
- oracle* doc fragments - fragments are deprecated and will be removed in
|
||||
community.general 13.0.0 (https://github.com/ansible-collections/community.general/issues/10318,
|
||||
https://github.com/ansible-collections/community.general/pull/10652).
|
||||
minor_changes:
|
||||
- android_sdk - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- django module utils - simplify/consolidate the common settings for the command
|
||||
line (https://github.com/ansible-collections/community.general/pull/10684).
|
||||
- django_check - rename parameter ``database`` to ``databases``, add alias
|
||||
for compatibility (https://github.com/ansible-collections/community.general/pull/10700).
|
||||
- django_check - simplify/consolidate the common settings for the command
|
||||
line (https://github.com/ansible-collections/community.general/pull/10684).
|
||||
- django_createcachetable - simplify/consolidate the common settings for the
|
||||
command line (https://github.com/ansible-collections/community.general/pull/10684).
|
||||
- elasticsearch_plugin - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- filesize - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- github_app_access_token lookup plugin - support both ``jwt`` and ``pyjwt``
|
||||
to avoid conflict with other modules requirements (https://github.com/ansible-collections/community.general/issues/10299).
|
||||
- gitlab_group_access_token - add ``planner`` access level (https://github.com/ansible-collections/community.general/pull/10679).
|
||||
- gitlab_group_access_token - add missing scopes (https://github.com/ansible-collections/community.general/pull/10785).
|
||||
- gitlab_group_variable - support masked-and-hidden variables (https://github.com/ansible-collections/community.general/pull/10787).
|
||||
- gitlab_label - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- gitlab_milestone - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- gitlab_project_access_token - add ``planner`` access level (https://github.com/ansible-collections/community.general/pull/10679).
|
||||
- gitlab_project_access_token - add missing scopes (https://github.com/ansible-collections/community.general/pull/10785).
|
||||
- gitlab_project_variable - support masked-and-hidden variables (https://github.com/ansible-collections/community.general/pull/10787).
|
||||
- gitlab_protected_branch - add ``allow_force_push``, ``code_owner_approval_required``
|
||||
(https://github.com/ansible-collections/community.general/pull/10795, https://github.com/ansible-collections/community.general/issues/6432,
|
||||
https://github.com/ansible-collections/community.general/issues/10289, https://github.com/ansible-collections/community.general/issues/10765).
|
||||
- gitlab_protected_branch - update protected branches if possible instead
|
||||
of recreating them (https://github.com/ansible-collections/community.general/pull/10795).
|
||||
- iocage inventory plugin - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- ipa_host - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- iptables_state - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- keycloak_realm - add support for WebAuthn policy configuration options,
|
||||
including both regular and passwordless WebAuthn policies (https://github.com/ansible-collections/community.general/pull/10791).
|
||||
- lvg_rename - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- manageiq - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- manageiq_alert_profiles - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- manageiq_group - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- manageiq_tenant - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- mssql_db - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- one_vm - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10712).
|
||||
- openbsd_pkg - add ``autoremove`` parameter to remove unused dependencies
|
||||
(https://github.com/ansible-collections/community.general/pull/10705).
|
||||
- openbsd_pkg - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- pacemaker_resource - add ``state=cleanup`` for cleaning up pacemaker resources
|
||||
(https://github.com/ansible-collections/community.general/pull/10413)
|
||||
- pacemaker_resource - add ``state=cloned`` for cloning pacemaker resources
|
||||
or groups (https://github.com/ansible-collections/community.general/issues/10322,
|
||||
https://github.com/ansible-collections/community.general/pull/10665).
|
||||
- pacemaker_resource - the parameter ``name`` is no longer a required parameter
|
||||
in community.general 11.3.0 (https://github.com/ansible-collections/community.general/pull/10413)
|
||||
- parted - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10642).
|
||||
- random_string lookup plugin - allow to specify seed while generating random
|
||||
string (https://github.com/ansible-collections/community.general/issues/5362,
|
||||
https://github.com/ansible-collections/community.general/pull/10710).
|
||||
- scaleway modules - add a ``scaleway`` group to use ``module_defaults`` (https://github.com/ansible-collections/community.general/pull/10647).
|
||||
- scaleway_container - add a ``cpu_limit`` argument (https://github.com/ansible-collections/community.general/pull/10646).
|
||||
- terraform - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||
- ufw - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- xenserver module utils - remove redundant constructs from argument specs
|
||||
(https://github.com/ansible-collections/community.general/pull/10769).
|
||||
- xenserver_facts - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- zfs_facts - minor refactor to simplify string formatting (https://github.com/ansible-collections/community.general/pull/10727).
|
||||
- zypper - support the ``--gpg-auto-import-keys`` option in zypper (https://github.com/ansible-collections/community.general/issues/10660,
|
||||
https://github.com/ansible-collections/community.general/pull/10661).
|
||||
release_summary: Regular bugfix and feature release.
|
||||
fragments:
|
||||
- 10299-github_app_access_token-lookup.yml
|
||||
- 10413-pacemaker-resource-cleanup.yml
|
||||
- 10642-parted-cmd-list.yml
|
||||
- 10646-scaleway_container_cpu_limit.yml
|
||||
- 10647-scaleway-module-defaults.yml
|
||||
- 10652-oracle-deprecation.yml
|
||||
- 10661-support-gpg-auto-impor-keys-in-zypper.yml
|
||||
- 10665-pacemaker-resource-clone.yml
|
||||
- 10679-gitlab-access-token-add-planner-role.yml
|
||||
- 10684-django-improvements.yml
|
||||
- 10700-django-check-databases.yml
|
||||
- 10705-openbsd-pkg-remove-unused.yml
|
||||
- 10707-pacemaker-maintenance-mode-regex.yml
|
||||
- 10711-pytohn-idioms-1.yml
|
||||
- 10712-python-idioms-2.yml
|
||||
- 10727-python-idioms-3.yml
|
||||
- 10743-monit-handle-unknown-status.yml
|
||||
- 10751-kdeconfig-support-kwriteconfig6.yml
|
||||
- 10752-selective-hardcoded-loop-var.yml
|
||||
- 10769-xenserver-rf.yml
|
||||
- 10785-gitlab-token-add-missing-scopes.yml
|
||||
- 10787-gitlab-variable-support-masked-and-hidden-variables.yml
|
||||
- 10795-gitlab_protected_branch-add-allow_force_push-code_owner_approval_required.yml
|
||||
- 11.3.0.yml
|
||||
- hiera.yml
|
||||
- keycloak-realm-webauthn-policies.yml
|
||||
- random_string_seed.yml
|
||||
modules:
|
||||
- description: Wrapper for C(django-admin dumpdata).
|
||||
name: django_dumpdata
|
||||
namespace: ''
|
||||
- description: Wrapper for C(django-admin loaddata).
|
||||
name: django_loaddata
|
||||
namespace: ''
|
||||
- description: Manage Pacemaker STONITH.
|
||||
name: pacemaker_stonith
|
||||
namespace: ''
|
||||
plugins:
|
||||
filter:
|
||||
- description: Convert variable to YAML string.
|
||||
name: to_nice_yaml
|
||||
namespace: null
|
||||
- description: Convert variable to YAML string.
|
||||
name: to_yaml
|
||||
namespace: null
|
||||
release_date: '2025-09-08'
|
||||
|
||||
@@ -1,61 +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
|
||||
-->
|
||||
|
||||
# Docs helper. Create RST file.
|
||||
|
||||
The playbook `playbook.yml` writes a RST file that can be used in
|
||||
docs/docsite/rst. The usage of this helper is recommended but not
|
||||
mandatory. You can stop reading here and update the RST file manually
|
||||
if you don't want to use this helper.
|
||||
|
||||
## Run the playbook
|
||||
|
||||
If you want to generate the RST file by this helper fit the variables
|
||||
in the playbook and the template to your needs. Then, run the play
|
||||
|
||||
```sh
|
||||
shell> ansible-playbook playbook.yml
|
||||
```
|
||||
|
||||
## Copy RST to docs/docsite/rst
|
||||
|
||||
Copy the RST file to `docs/docsite/rst` and remove it from this
|
||||
directory.
|
||||
|
||||
## Update the checksums
|
||||
|
||||
Substitute the variables and run the below commands
|
||||
|
||||
```sh
|
||||
shell> sha1sum {{ target_vars }} > {{ target_sha1 }}
|
||||
shell> sha1sum {{ file_rst }} > {{ file_sha1 }}
|
||||
```
|
||||
|
||||
## Playbook explained
|
||||
|
||||
The playbook includes the variable *tests* from the integration tests
|
||||
and creates the RST file from the template. The playbook will
|
||||
terminate if:
|
||||
|
||||
* The file with the variable *tests* was changed
|
||||
* The RST file was changed
|
||||
|
||||
This means that this helper is probably not up to date.
|
||||
|
||||
### The file with the variable *tests* was changed
|
||||
|
||||
This means that somebody updated the integration tests. Review the
|
||||
changes and update the template if needed. Update the checksum to pass
|
||||
the integrity test. The playbook message provides you with the
|
||||
command.
|
||||
|
||||
### The RST file was changed
|
||||
|
||||
This means that somebody updated the RST file manually. Review the
|
||||
changes and update the template. Update the checksum to pass the
|
||||
integrity test. The playbook message provides you with the
|
||||
command. Make sure that the updated template will create identical RST
|
||||
file. Only then apply your changes.
|
||||
@@ -1,80 +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
|
||||
|
||||
keep_keys
|
||||
"""""""""
|
||||
|
||||
Use the filter :ansplugin:`community.general.keep_keys#filter` if you have a list of dictionaries and want to keep certain keys only.
|
||||
|
||||
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See :ansplugin:`the documentation for the community.general.yaml callback plugin <community.general.yaml#callback>`.
|
||||
|
||||
|
||||
Let us use the below list in the following examples:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
input:
|
||||
{{ tests.0.input | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% for i in tests[0:1]|subelements('group') %}
|
||||
* {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1
|
||||
|
||||
target: {{ i.1.tt }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
{% endfor %}
|
||||
|
||||
gives
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ tests.0.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-5 are all the same:
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ tests.1.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% for i in tests[1:2]|subelements('group') %}
|
||||
{{ loop.index }}. {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: {{ i.1.mp }}
|
||||
target: {{ i.1.tt }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
{% endfor %}
|
||||
|
||||
* The results of the below examples 6-9 are all the same:
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ tests.2.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% for i in tests[2:3]|subelements('group') %}
|
||||
{{ loop.index + 5 }}. {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: {{ i.1.mp }}
|
||||
target: {{ i.1.tt }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
{% endfor %}
|
||||
@@ -1 +0,0 @@
|
||||
8690afce792abc95693c2f61f743ee27388b1592 ../../rst/filter_guide-abstract_informations-lists_of_dictionaries-keep_keys.rst
|
||||
@@ -1,79 +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
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create docs REST files
|
||||
# shell> ansible-playbook playbook.yml
|
||||
#
|
||||
# Proofread and copy created *.rst file into the directory
|
||||
# docs/docsite/rst. Do not add *.rst in this directory to the version
|
||||
# control.
|
||||
#
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# community.general/docs/docsite/helper/keep_keys/playbook.yml
|
||||
|
||||
- name: Create RST file for docs/docsite/rst
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
|
||||
vars:
|
||||
|
||||
plugin: keep_keys
|
||||
plugin_type: filter
|
||||
docs_path:
|
||||
- filter_guide
|
||||
- abstract_informations
|
||||
- lists_of_dictionaries
|
||||
|
||||
file_base: "{{ (docs_path + [plugin]) | join('-') }}"
|
||||
file_rst: ../../rst/{{ file_base }}.rst
|
||||
file_sha1: "{{ plugin }}.rst.sha1"
|
||||
|
||||
target: "../../../../tests/integration/targets/{{ plugin_type }}_{{ plugin }}"
|
||||
target_vars: "{{ target }}/vars/main/tests.yml"
|
||||
target_sha1: tests.yml.sha1
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Test integrity tests.yml
|
||||
when:
|
||||
- integrity | d(true) | bool
|
||||
- lookup('file', target_sha1) != lookup('pipe', 'sha1sum ' ~ target_vars)
|
||||
block:
|
||||
|
||||
- name: Changed tests.yml
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
Changed {{ target_vars }}
|
||||
Review the changes and update {{ target_sha1 }}
|
||||
shell> sha1sum {{ target_vars }} > {{ target_sha1 }}
|
||||
|
||||
- name: Changed tests.yml end host
|
||||
ansible.builtin.meta: end_play
|
||||
|
||||
- name: Test integrity RST file
|
||||
when:
|
||||
- integrity | d(true) | bool
|
||||
- lookup('file', file_sha1) != lookup('pipe', 'sha1sum ' ~ file_rst)
|
||||
block:
|
||||
|
||||
- name: Changed RST file
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
Changed {{ file_rst }}
|
||||
Review the changes and update {{ file_sha1 }}
|
||||
shell> sha1sum {{ file_rst }} > {{ file_sha1 }}
|
||||
|
||||
- name: Changed RST file end host
|
||||
ansible.builtin.meta: end_play
|
||||
|
||||
- name: Include target vars
|
||||
include_vars:
|
||||
file: "{{ target_vars }}"
|
||||
|
||||
- name: Create RST file
|
||||
ansible.builtin.template:
|
||||
src: "{{ file_base }}.rst.j2"
|
||||
dest: "{{ file_base }}.rst"
|
||||
@@ -1 +0,0 @@
|
||||
c6fc4ee2017d9222675bcd13cc4f88ba8d14f38d ../../../../tests/integration/targets/filter_keep_keys/vars/main/tests.yml
|
||||
@@ -1,21 +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
|
||||
list1:
|
||||
- name: myname01
|
||||
param01:
|
||||
x: default_value
|
||||
y: default_value
|
||||
list: [default_value]
|
||||
- name: myname02
|
||||
param01: [1, 1, 2, 3]
|
||||
|
||||
list2:
|
||||
- name: myname01
|
||||
param01:
|
||||
y: patch_value
|
||||
z: patch_value
|
||||
list: [patch_value]
|
||||
- name: myname02
|
||||
param01: [3, 4, 4]
|
||||
@@ -1,14 +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: 1. Merge two lists by common attribute 'name'
|
||||
include_vars:
|
||||
dir: example-001_vars
|
||||
- debug:
|
||||
var: list3
|
||||
when: debug | d(false) | bool
|
||||
- template:
|
||||
src: list3.out.j2
|
||||
dest: example-001.out
|
||||
@@ -1 +0,0 @@
|
||||
../default-common.yml
|
||||
@@ -1,14 +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: 2. Merge two lists by common attribute 'name'
|
||||
include_vars:
|
||||
dir: example-002_vars
|
||||
- debug:
|
||||
var: list3
|
||||
when: debug | d(false) | bool
|
||||
- template:
|
||||
src: list3.out.j2
|
||||
dest: example-002.out
|
||||
@@ -1 +0,0 @@
|
||||
../default-common.yml
|
||||
@@ -1,14 +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: 3. Merge recursive by 'name', replace lists (default)
|
||||
include_vars:
|
||||
dir: example-003_vars
|
||||
- debug:
|
||||
var: list3
|
||||
when: debug | d(false) | bool
|
||||
- template:
|
||||
src: list3.out.j2
|
||||
dest: example-003.out
|
||||
@@ -1 +0,0 @@
|
||||
../default-recursive-true.yml
|
||||
@@ -1,7 +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
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true) }}"
|
||||
@@ -1,14 +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: 4. Merge recursive by 'name', keep lists
|
||||
include_vars:
|
||||
dir: example-004_vars
|
||||
- debug:
|
||||
var: list3
|
||||
when: debug | d(false) | bool
|
||||
- template:
|
||||
src: list3.out.j2
|
||||
dest: example-004.out
|
||||
@@ -1 +0,0 @@
|
||||
../default-recursive-true.yml
|
||||
@@ -1,8 +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
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='keep') }}"
|
||||
@@ -1,14 +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: 5. Merge recursive by 'name', append lists
|
||||
include_vars:
|
||||
dir: example-005_vars
|
||||
- debug:
|
||||
var: list3
|
||||
when: debug | d(false) | bool
|
||||
- template:
|
||||
src: list3.out.j2
|
||||
dest: example-005.out
|
||||
@@ -1 +0,0 @@
|
||||
../default-recursive-true.yml
|
||||
@@ -1,8 +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
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='append') }}"
|
||||
@@ -1,14 +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: 6. Merge recursive by 'name', prepend lists
|
||||
include_vars:
|
||||
dir: example-006_vars
|
||||
- debug:
|
||||
var: list3
|
||||
when: debug | d(false) | bool
|
||||
- template:
|
||||
src: list3.out.j2
|
||||
dest: example-006.out
|
||||
@@ -1 +0,0 @@
|
||||
../default-recursive-true.yml
|
||||
@@ -1,8 +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
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='prepend') }}"
|
||||
@@ -1,14 +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: 7. Merge recursive by 'name', append lists 'remove present'
|
||||
include_vars:
|
||||
dir: example-007_vars
|
||||
- debug:
|
||||
var: list3
|
||||
when: debug|d(false) | bool
|
||||
- template:
|
||||
src: list3.out.j2
|
||||
dest: example-007.out
|
||||
@@ -1 +0,0 @@
|
||||
../default-recursive-true.yml
|
||||
@@ -1,8 +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
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='append_rp') }}"
|
||||
@@ -1,14 +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: 8. Merge recursive by 'name', prepend lists 'remove present'
|
||||
include_vars:
|
||||
dir: example-008_vars
|
||||
- debug:
|
||||
var: list3
|
||||
when: debug | d(false) | bool
|
||||
- template:
|
||||
src: list3.out.j2
|
||||
dest: example-008.out
|
||||
@@ -1 +0,0 @@
|
||||
../default-recursive-true.yml
|
||||
@@ -1,8 +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
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='prepend_rp') }}"
|
||||
@@ -1,14 +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: 9. Merge single list by common attribute 'name'
|
||||
include_vars:
|
||||
dir: example-009_vars
|
||||
- debug:
|
||||
var: list3
|
||||
when: debug | d(false) | bool
|
||||
- template:
|
||||
src: list3.out.j2
|
||||
dest: example-009.out
|
||||
@@ -1 +0,0 @@
|
||||
../default-common.yml
|
||||
@@ -1,78 +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
|
||||
|
||||
examples:
|
||||
- title: Two lists
|
||||
description: 'In the example below the lists are merged by the attribute ``name``:'
|
||||
file: example-001_vars/list3.yml
|
||||
lang: 'yaml+jinja'
|
||||
- title:
|
||||
description: 'This produces:'
|
||||
file: example-001.out
|
||||
lang: 'yaml'
|
||||
- title: List of two lists
|
||||
description: 'It is possible to use a list of lists as an input of the filter:'
|
||||
file: example-002_vars/list3.yml
|
||||
lang: 'yaml+jinja'
|
||||
- title:
|
||||
description: 'This produces the same result as in the previous example:'
|
||||
file: example-002.out
|
||||
lang: 'yaml'
|
||||
- title: Single list
|
||||
description: 'It is possible to merge single list:'
|
||||
file: example-009_vars/list3.yml
|
||||
lang: 'yaml+jinja'
|
||||
- title:
|
||||
description: 'This produces the same result as in the previous example:'
|
||||
file: example-009.out
|
||||
lang: 'yaml'
|
||||
- title: list_merge=replace (default)
|
||||
description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=replace` (default):'
|
||||
file: example-003_vars/list3.yml
|
||||
lang: 'yaml+jinja'
|
||||
- title:
|
||||
description: 'This produces:'
|
||||
file: example-003.out
|
||||
lang: 'yaml'
|
||||
- title: list_merge=keep
|
||||
description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=keep`:'
|
||||
file: example-004_vars/list3.yml
|
||||
lang: 'yaml+jinja'
|
||||
- title:
|
||||
description: 'This produces:'
|
||||
file: example-004.out
|
||||
lang: 'yaml'
|
||||
- title: list_merge=append
|
||||
description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append`:'
|
||||
file: example-005_vars/list3.yml
|
||||
lang: 'yaml+jinja'
|
||||
- title:
|
||||
description: 'This produces:'
|
||||
file: example-005.out
|
||||
lang: 'yaml'
|
||||
- title: list_merge=prepend
|
||||
description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend`:'
|
||||
file: example-006_vars/list3.yml
|
||||
lang: 'yaml+jinja'
|
||||
- title:
|
||||
description: 'This produces:'
|
||||
file: example-006.out
|
||||
lang: 'yaml'
|
||||
- title: list_merge=append_rp
|
||||
description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append_rp`:'
|
||||
file: example-007_vars/list3.yml
|
||||
lang: 'yaml+jinja'
|
||||
- title:
|
||||
description: 'This produces:'
|
||||
file: example-007.out
|
||||
lang: 'yaml'
|
||||
- title: list_merge=prepend_rp
|
||||
description: 'Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend_rp`:'
|
||||
file: example-008_vars/list3.yml
|
||||
lang: 'yaml+jinja'
|
||||
- title:
|
||||
description: 'This produces:'
|
||||
file: example-008.out
|
||||
lang: 'yaml'
|
||||
@@ -1,13 +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
|
||||
|
||||
{% for i in examples %}
|
||||
{{ i.description }}
|
||||
|
||||
.. code-block:: {{ i.lang }}
|
||||
|
||||
{{ lookup('file', i.file) | split('\n') | reject('match', '^(#|---)') | join ('\n') | indent(2) }}
|
||||
|
||||
{% endfor %}
|
||||
@@ -1,74 +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
|
||||
|
||||
Merging lists of dictionaries
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If you have two or more lists of dictionaries and want to combine them into a list of merged dictionaries, where the dictionaries are merged by an attribute, you can use the :ansplugin:`community.general.lists_mergeby <community.general.lists_mergeby#filter>` filter.
|
||||
|
||||
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See the documentation for the :ansplugin:`community.general.yaml callback plugin <community.general.yaml#callback>`.
|
||||
|
||||
Let us use the lists below in the following examples:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
{{ lookup('file', 'default-common.yml') | split('\n') | reject('match', '^(#|---)') | join ('\n') | indent(2) }}
|
||||
|
||||
{% for i in examples[0:2] %}
|
||||
{% if i.title | d('', true) | length > 0 %}
|
||||
{{ i.title }}
|
||||
{{ "%s" % ('"' * i.title|length) }}
|
||||
{% endif %}
|
||||
{{ i.description }}
|
||||
|
||||
.. code-block:: {{ i.lang }}
|
||||
|
||||
{{ lookup('file', i.file) | split('\n') | reject('match', '^(#|---)') | join ('\n') | indent(2) }}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
.. versionadded:: 2.0.0
|
||||
|
||||
{% for i in examples[2:6] %}
|
||||
{% if i.title | d('', true) | length > 0 %}
|
||||
{{ i.title }}
|
||||
{{ "%s" % ('"' * i.title|length) }}
|
||||
{% endif %}
|
||||
{{ i.description }}
|
||||
|
||||
.. code-block:: {{ i.lang }}
|
||||
|
||||
{{ lookup('file', i.file) | split('\n') | reject('match', '^(#|---)') | join ('\n') | indent(2) }}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
The filter also accepts two optional parameters: :ansopt:`community.general.lists_mergeby#filter:recursive` and :ansopt:`community.general.lists_mergeby#filter:list_merge`. This is available since community.general 4.4.0.
|
||||
|
||||
**recursive**
|
||||
Is a boolean, default to ``false``. Should the :ansplugin:`community.general.lists_mergeby#filter` filter recursively merge nested hashes. Note: It does not depend on the value of the ``hash_behaviour`` setting in ``ansible.cfg``.
|
||||
|
||||
**list_merge**
|
||||
Is a string, its possible values are :ansval:`replace` (default), :ansval:`keep`, :ansval:`append`, :ansval:`prepend`, :ansval:`append_rp` or :ansval:`prepend_rp`. It modifies the behaviour of :ansplugin:`community.general.lists_mergeby#filter` when the hashes to merge contain arrays/lists.
|
||||
|
||||
The examples below set :ansopt:`community.general.lists_mergeby#filter:recursive=true` and display the differences among all six options of :ansopt:`community.general.lists_mergeby#filter:list_merge`. Functionality of the parameters is exactly the same as in the filter :ansplugin:`ansible.builtin.combine#filter`. See :ref:`Combining hashes/dictionaries <combine_filter>` to learn details about these options.
|
||||
|
||||
Let us use the lists below in the following examples
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
{{ lookup('file', 'default-recursive-true.yml') | split('\n') | reject('match', '^(#|---)') | join ('\n') |indent(2) }}
|
||||
|
||||
{% for i in examples[6:] %}
|
||||
{% if i.title | d('', true) | length > 0 %}
|
||||
{{ i.title }}
|
||||
{{ "%s" % ('"' * i.title|length) }}
|
||||
{% endif %}
|
||||
{{ i.description }}
|
||||
|
||||
.. code-block:: {{ i.lang }}
|
||||
|
||||
{{ lookup('file', i.file) | split('\n') | reject('match', '^(#|---)') | join ('\n') |indent(2) }}
|
||||
|
||||
{% endfor %}
|
||||
@@ -1,7 +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
|
||||
#}
|
||||
list3:
|
||||
{{ list3 | to_yaml(indent=2, sort_keys=false) | indent(2) }}
|
||||
@@ -1,64 +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
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# 1) Run all examples and create example-XXX.out
|
||||
# shell> ansible-playbook playbook.yml -e examples_one=true
|
||||
#
|
||||
# 2) Optionally, for testing, create examples_all.rst
|
||||
# shell> ansible-playbook playbook.yml -e examples_all=true
|
||||
#
|
||||
# 3) Create docs REST files
|
||||
# shell> ansible-playbook playbook.yml -e merging_lists_of_dictionaries=true
|
||||
#
|
||||
# Notes:
|
||||
# * Use YAML callback, e.g. set ANSIBLE_STDOUT_CALLBACK=community.general.yaml
|
||||
# * Use sphinx-view to render and review the REST files
|
||||
# shell> sphinx-view <path_to_helper>/examples_all.rst
|
||||
# * Proofread and copy completed docs *.rst files into the directory rst.
|
||||
# * Then delete the *.rst and *.out files from this directory. Do not
|
||||
# add *.rst and *.out in this directory to the version control.
|
||||
#
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# community.general/docs/docsite/helper/lists_mergeby/playbook.yml
|
||||
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
|
||||
- block:
|
||||
- import_tasks: example-001.yml
|
||||
tags: t001
|
||||
- import_tasks: example-002.yml
|
||||
tags: t002
|
||||
- import_tasks: example-003.yml
|
||||
tags: t003
|
||||
- import_tasks: example-004.yml
|
||||
tags: t004
|
||||
- import_tasks: example-005.yml
|
||||
tags: t005
|
||||
- import_tasks: example-006.yml
|
||||
tags: t006
|
||||
- import_tasks: example-007.yml
|
||||
tags: t007
|
||||
- import_tasks: example-008.yml
|
||||
tags: t008
|
||||
- import_tasks: example-009.yml
|
||||
tags: t009
|
||||
when: examples_one | d(false) | bool
|
||||
|
||||
- block:
|
||||
- include_vars: examples.yml
|
||||
- template:
|
||||
src: examples_all.rst.j2
|
||||
dest: examples_all.rst
|
||||
when: examples_all | d(false) | bool
|
||||
|
||||
- block:
|
||||
- include_vars: examples.yml
|
||||
- template:
|
||||
src: filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2
|
||||
dest: filter_guide_abstract_informations_merging_lists_of_dictionaries.rst
|
||||
when: merging_lists_of_dictionaries | d(false) | bool
|
||||
@@ -1,61 +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
|
||||
-->
|
||||
|
||||
# Docs helper. Create RST file.
|
||||
|
||||
The playbook `playbook.yml` writes a RST file that can be used in
|
||||
docs/docsite/rst. The usage of this helper is recommended but not
|
||||
mandatory. You can stop reading here and update the RST file manually
|
||||
if you don't want to use this helper.
|
||||
|
||||
## Run the playbook
|
||||
|
||||
If you want to generate the RST file by this helper fit the variables
|
||||
in the playbook and the template to your needs. Then, run the play
|
||||
|
||||
```sh
|
||||
shell> ansible-playbook playbook.yml
|
||||
```
|
||||
|
||||
## Copy RST to docs/docsite/rst
|
||||
|
||||
Copy the RST file to `docs/docsite/rst` and remove it from this
|
||||
directory.
|
||||
|
||||
## Update the checksums
|
||||
|
||||
Substitute the variables and run the below commands
|
||||
|
||||
```sh
|
||||
shell> sha1sum {{ target_vars }} > {{ target_sha1 }}
|
||||
shell> sha1sum {{ file_rst }} > {{ file_sha1 }}
|
||||
```
|
||||
|
||||
## Playbook explained
|
||||
|
||||
The playbook includes the variable *tests* from the integration tests
|
||||
and creates the RST file from the template. The playbook will
|
||||
terminate if:
|
||||
|
||||
* The file with the variable *tests* was changed
|
||||
* The RST file was changed
|
||||
|
||||
This means that this helper is probably not up to date.
|
||||
|
||||
### The file with the variable *tests* was changed
|
||||
|
||||
This means that somebody updated the integration tests. Review the
|
||||
changes and update the template if needed. Update the checksum to pass
|
||||
the integrity test. The playbook message provides you with the
|
||||
command.
|
||||
|
||||
### The RST file was changed
|
||||
|
||||
This means that somebody updated the RST file manually. Review the
|
||||
changes and update the template. Update the checksum to pass the
|
||||
integrity test. The playbook message provides you with the
|
||||
command. Make sure that the updated template will create identical RST
|
||||
file. Only then apply your changes.
|
||||
@@ -1,80 +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
|
||||
|
||||
remove_keys
|
||||
"""""""""""
|
||||
|
||||
Use the filter :ansplugin:`community.general.remove_keys#filter` if you have a list of dictionaries and want to remove certain keys.
|
||||
|
||||
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See See :ansplugin:`the documentation for the community.general.yaml callback plugin <community.general.yaml#callback>`.
|
||||
|
||||
|
||||
Let us use the below list in the following examples:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
input:
|
||||
{{ tests.0.input | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% for i in tests[0:1]|subelements('group') %}
|
||||
* {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1
|
||||
|
||||
target: {{ i.1.tt }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
{% endfor %}
|
||||
|
||||
gives
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ tests.0.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-5 are all the same:
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ tests.1.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% for i in tests[1:2]|subelements('group') %}
|
||||
{{ loop.index }}. {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: {{ i.1.mp }}
|
||||
target: {{ i.1.tt }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
{% endfor %}
|
||||
|
||||
* The results of the below examples 6-9 are all the same:
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ tests.2.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% for i in tests[2:3]|subelements('group') %}
|
||||
{{ loop.index + 5 }}. {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: {{ i.1.mp }}
|
||||
target: {{ i.1.tt }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
{% endfor %}
|
||||
@@ -1,79 +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
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create docs REST files
|
||||
# shell> ansible-playbook playbook.yml
|
||||
#
|
||||
# Proofread and copy created *.rst file into the directory
|
||||
# docs/docsite/rst. Do not add *.rst in this directory to the version
|
||||
# control.
|
||||
#
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# community.general/docs/docsite/helper/remove_keys/playbook.yml
|
||||
|
||||
- name: Create RST file for docs/docsite/rst
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
|
||||
vars:
|
||||
|
||||
plugin: remove_keys
|
||||
plugin_type: filter
|
||||
docs_path:
|
||||
- filter_guide
|
||||
- abstract_informations
|
||||
- lists_of_dictionaries
|
||||
|
||||
file_base: "{{ (docs_path + [plugin]) | join('-') }}"
|
||||
file_rst: ../../rst/{{ file_base }}.rst
|
||||
file_sha1: "{{ plugin }}.rst.sha1"
|
||||
|
||||
target: "../../../../tests/integration/targets/{{ plugin_type }}_{{ plugin }}"
|
||||
target_vars: "{{ target }}/vars/main/tests.yml"
|
||||
target_sha1: tests.yml.sha1
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Test integrity tests.yml
|
||||
when:
|
||||
- integrity | d(true) | bool
|
||||
- lookup('file', target_sha1) != lookup('pipe', 'sha1sum ' ~ target_vars)
|
||||
block:
|
||||
|
||||
- name: Changed tests.yml
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
Changed {{ target_vars }}
|
||||
Review the changes and update {{ target_sha1 }}
|
||||
shell> sha1sum {{ target_vars }} > {{ target_sha1 }}
|
||||
|
||||
- name: Changed tests.yml end host
|
||||
ansible.builtin.meta: end_play
|
||||
|
||||
- name: Test integrity RST file
|
||||
when:
|
||||
- integrity | d(true) | bool
|
||||
- lookup('file', file_sha1) != lookup('pipe', 'sha1sum ' ~ file_rst)
|
||||
block:
|
||||
|
||||
- name: Changed RST file
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
Changed {{ file_rst }}
|
||||
Review the changes and update {{ file_sha1 }}
|
||||
shell> sha1sum {{ file_rst }} > {{ file_sha1 }}
|
||||
|
||||
- name: Changed RST file end host
|
||||
ansible.builtin.meta: end_play
|
||||
|
||||
- name: Include target vars
|
||||
include_vars:
|
||||
file: "{{ target_vars }}"
|
||||
|
||||
- name: Create RST file
|
||||
ansible.builtin.template:
|
||||
src: "{{ file_base }}.rst.j2"
|
||||
dest: "{{ file_base }}.rst"
|
||||
@@ -1 +0,0 @@
|
||||
3cc606b42e3d450cf6323f25930f7c5a591fa086 ../../rst/filter_guide-abstract_informations-lists_of_dictionaries-remove_keys.rst
|
||||
@@ -1,3 +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
|
||||
@@ -1 +0,0 @@
|
||||
0554335045f02d8c37b824355b0cf86864cee9a5 ../../../../tests/integration/targets/filter_remove_keys/vars/main/tests.yml
|
||||
@@ -1,3 +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
|
||||
@@ -1,61 +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
|
||||
-->
|
||||
|
||||
# Docs helper. Create RST file.
|
||||
|
||||
The playbook `playbook.yml` writes a RST file that can be used in
|
||||
docs/docsite/rst. The usage of this helper is recommended but not
|
||||
mandatory. You can stop reading here and update the RST file manually
|
||||
if you don't want to use this helper.
|
||||
|
||||
## Run the playbook
|
||||
|
||||
If you want to generate the RST file by this helper fit the variables
|
||||
in the playbook and the template to your needs. Then, run the play
|
||||
|
||||
```sh
|
||||
shell> ansible-playbook playbook.yml
|
||||
```
|
||||
|
||||
## Copy RST to docs/docsite/rst
|
||||
|
||||
Copy the RST file to `docs/docsite/rst` and remove it from this
|
||||
directory.
|
||||
|
||||
## Update the checksums
|
||||
|
||||
Substitute the variables and run the below commands
|
||||
|
||||
```sh
|
||||
shell> sha1sum {{ target_vars }} > {{ target_sha1 }}
|
||||
shell> sha1sum {{ file_rst }} > {{ file_sha1 }}
|
||||
```
|
||||
|
||||
## Playbook explained
|
||||
|
||||
The playbook includes the variable *tests* from the integration tests
|
||||
and creates the RST file from the template. The playbook will
|
||||
terminate if:
|
||||
|
||||
* The file with the variable *tests* was changed
|
||||
* The RST file was changed
|
||||
|
||||
This means that this helper is probably not up to date.
|
||||
|
||||
### The file with the variable *tests* was changed
|
||||
|
||||
This means that somebody updated the integration tests. Review the
|
||||
changes and update the template if needed. Update the checksum to pass
|
||||
the integrity test. The playbook message provides you with the
|
||||
command.
|
||||
|
||||
### The RST file was changed
|
||||
|
||||
This means that somebody updated the RST file manually. Review the
|
||||
changes and update the template. Update the checksum to pass the
|
||||
integrity test. The playbook message provides you with the
|
||||
command. Make sure that the updated template will create identical RST
|
||||
file. Only then apply your changes.
|
||||
@@ -1,110 +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
|
||||
|
||||
replace_keys
|
||||
""""""""""""
|
||||
|
||||
Use the filter :ansplugin:`community.general.replace_keys#filter` if you have a list of dictionaries and want to replace certain keys.
|
||||
|
||||
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See :ansplugin:`the documentation for the community.general.yaml callback plugin <community.general.yaml#callback>`.
|
||||
|
||||
|
||||
Let us use the below list in the following examples:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
input:
|
||||
{{ tests.0.input | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% for i in tests[0:1]|subelements('group') %}
|
||||
* {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-3
|
||||
|
||||
target:
|
||||
{{ i.1.tt | to_yaml(indent=2) | indent(5) }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
{% endfor %}
|
||||
|
||||
gives
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ tests.0.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-3 are all the same:
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ tests.1.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% for i in tests[1:2]|subelements('group') %}
|
||||
{{ loop.index }}. {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-4
|
||||
|
||||
mp: {{ i.1.mp }}
|
||||
target:
|
||||
{{ i.1.tt | to_yaml(indent=2) | indent(5) }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
{% endfor %}
|
||||
|
||||
* The results of the below examples 4-5 are the same:
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ tests.2.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% for i in tests[2:3]|subelements('group') %}
|
||||
{{ loop.index + 3 }}. {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-3
|
||||
|
||||
mp: {{ i.1.mp }}
|
||||
target:
|
||||
{{ i.1.tt | to_yaml(indent=2) | indent(5) }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% for i in tests[3:4]|subelements('group') %}
|
||||
{{ loop.index + 5 }}. {{ i.1.d }}
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
input:
|
||||
{{ i.0.input | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-4
|
||||
|
||||
mp: {{ i.1.mp }}
|
||||
target:
|
||||
{{ i.1.tt | to_yaml(indent=2) | indent(5) }}
|
||||
result: "{{ lookup('file', target ~ '/templates/' ~ i.0.template) }}"
|
||||
|
||||
gives
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
{{ i.0.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
{% endfor %}
|
||||
@@ -1,79 +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
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create docs REST files
|
||||
# shell> ansible-playbook playbook.yml
|
||||
#
|
||||
# Proofread and copy created *.rst file into the directory
|
||||
# docs/docsite/rst. Do not add *.rst in this directory to the version
|
||||
# control.
|
||||
#
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# community.general/docs/docsite/helper/replace_keys/playbook.yml
|
||||
|
||||
- name: Create RST file for docs/docsite/rst
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
|
||||
vars:
|
||||
|
||||
plugin: replace_keys
|
||||
plugin_type: filter
|
||||
docs_path:
|
||||
- filter_guide
|
||||
- abstract_informations
|
||||
- lists_of_dictionaries
|
||||
|
||||
file_base: "{{ (docs_path + [plugin]) | join('-') }}"
|
||||
file_rst: ../../rst/{{ file_base }}.rst
|
||||
file_sha1: "{{ plugin }}.rst.sha1"
|
||||
|
||||
target: "../../../../tests/integration/targets/{{ plugin_type }}_{{ plugin }}"
|
||||
target_vars: "{{ target }}/vars/main/tests.yml"
|
||||
target_sha1: tests.yml.sha1
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Test integrity tests.yml
|
||||
when:
|
||||
- integrity | d(true) | bool
|
||||
- lookup('file', target_sha1) != lookup('pipe', 'sha1sum ' ~ target_vars)
|
||||
block:
|
||||
|
||||
- name: Changed tests.yml
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
Changed {{ target_vars }}
|
||||
Review the changes and update {{ target_sha1 }}
|
||||
shell> sha1sum {{ target_vars }} > {{ target_sha1 }}
|
||||
|
||||
- name: Changed tests.yml end host
|
||||
ansible.builtin.meta: end_play
|
||||
|
||||
- name: Test integrity RST file
|
||||
when:
|
||||
- integrity | d(true) | bool
|
||||
- lookup('file', file_sha1) != lookup('pipe', 'sha1sum ' ~ file_rst)
|
||||
block:
|
||||
|
||||
- name: Changed RST file
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
Changed {{ file_rst }}
|
||||
Review the changes and update {{ file_sha1 }}
|
||||
shell> sha1sum {{ file_rst }} > {{ file_sha1 }}
|
||||
|
||||
- name: Changed RST file end host
|
||||
ansible.builtin.meta: end_play
|
||||
|
||||
- name: Include target vars
|
||||
include_vars:
|
||||
file: "{{ target_vars }}"
|
||||
|
||||
- name: Create RST file
|
||||
ansible.builtin.template:
|
||||
src: "{{ file_base }}.rst.j2"
|
||||
dest: "{{ file_base }}.rst"
|
||||
@@ -1 +0,0 @@
|
||||
403f23c02ac02b1c3b611cb14f9b3ba59dc3f587 ../../rst/filter_guide-abstract_informations-lists_of_dictionaries-replace_keys.rst
|
||||
@@ -1 +0,0 @@
|
||||
2e54f3528c95cca746d5748f1ed7ada56ad0890e ../../../../tests/integration/targets/filter_replace_keys/vars/main/tests.yml
|
||||
@@ -1,3 +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
|
||||
@@ -22,6 +22,7 @@ The same example from the Developer Guide would become:
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils import deps
|
||||
|
||||
|
||||
with deps.declare("foo"):
|
||||
import foo
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ section above, but there are more elements that will take part in it.
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper
|
||||
|
||||
|
||||
class MyTest(ModuleHelper):
|
||||
# behavior for module paramaters ONLY, see below for further information
|
||||
output_params = ()
|
||||
@@ -253,9 +254,9 @@ With that, MH will automatically generate the diff output for variables that hav
|
||||
class MyTest(ModuleHelper):
|
||||
diff_params = ('value', )
|
||||
|
||||
def __run__(self):
|
||||
# example from community.general.gio_mime
|
||||
self.vars.set_meta("handler", initial_value=gio_mime_get(self.runner, self.vars.mime_type), diff=True, change=True)
|
||||
def __run__(self):
|
||||
# example from community.general.gio_mime
|
||||
self.vars.set_meta("handler", initial_value=gio_mime_get(self.runner, self.vars.mime_type), diff=True, change=True)
|
||||
|
||||
.. important::
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace: community
|
||||
name: general
|
||||
version: 11.1.2
|
||||
version: 11.3.0
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -46,6 +46,36 @@ action_groups:
|
||||
- keycloak_user_federation
|
||||
- keycloak_user_rolemapping
|
||||
- keycloak_userprofile
|
||||
scaleway:
|
||||
- scaleway_compute
|
||||
- scaleway_compute_private_network
|
||||
- scaleway_container
|
||||
- scaleway_container_info
|
||||
- scaleway_container_namespace
|
||||
- scaleway_container_namespace_info
|
||||
- scaleway_container_registry
|
||||
- scaleway_container_registry_info
|
||||
- scaleway_database_backup
|
||||
- scaleway_function
|
||||
- scaleway_function_info
|
||||
- scaleway_function_namespace
|
||||
- scaleway_function_namespace_info
|
||||
- scaleway_image_info
|
||||
- scaleway_ip
|
||||
- scaleway_ip_info
|
||||
- scaleway_lb
|
||||
- scaleway_organization_info
|
||||
- scaleway_private_network
|
||||
- scaleway_security_group
|
||||
- scaleway_security_group_info
|
||||
- scaleway_security_group_rule
|
||||
- scaleway_server_info
|
||||
- scaleway_snapshot_info
|
||||
- scaleway_sshkey
|
||||
- scaleway_user_data
|
||||
- scaleway_volume
|
||||
- scaleway_volume_info
|
||||
|
||||
plugin_routing:
|
||||
callback:
|
||||
actionable:
|
||||
@@ -89,6 +119,12 @@ plugin_routing:
|
||||
redirect: community.google.gcp_storage_file
|
||||
hashi_vault:
|
||||
redirect: community.hashi_vault.hashi_vault
|
||||
hiera:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: >-
|
||||
Hiera has been deprecated a long time ago.
|
||||
If you disagree with this deprecation, please create an issue in the community.general repository.
|
||||
manifold:
|
||||
tombstone:
|
||||
removal_version: 11.0.0
|
||||
@@ -116,6 +152,10 @@ plugin_routing:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: Project Atomic was sunset by the end of 2019.
|
||||
bearychat:
|
||||
deprecation:
|
||||
removal_version: 12.0.0
|
||||
warning_text: Chat service is no longer available.
|
||||
catapult:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
@@ -443,6 +483,10 @@ plugin_routing:
|
||||
redirect: infoblox.nios_modules.nios_txt_record
|
||||
nios_zone:
|
||||
redirect: infoblox.nios_modules.nios_zone
|
||||
oci_vcn:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: Use oracle.oci.oci_network_vcn instead.
|
||||
ome_device_info:
|
||||
redirect: dellemc.openmanage.ome_device_info
|
||||
one_image_facts:
|
||||
@@ -1004,6 +1048,30 @@ plugin_routing:
|
||||
redirect: community.kubevirt.kubevirt_vm_options
|
||||
nios:
|
||||
redirect: infoblox.nios_modules.nios
|
||||
oracle:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: Code is unmaintained here and official Oracle collection is available for a number of years.
|
||||
oracle_creatable_resource:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: Code is unmaintained here and official Oracle collection is available for a number of years.
|
||||
oracle_display_name_option:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: Code is unmaintained here and official Oracle collection is available for a number of years.
|
||||
oracle_name_option:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: Code is unmaintained here and official Oracle collection is available for a number of years.
|
||||
oracle_tags:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: Code is unmaintained here and official Oracle collection is available for a number of years.
|
||||
oracle_wait_options:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: Code is unmaintained here and official Oracle collection is available for a number of years.
|
||||
postgresql:
|
||||
redirect: community.postgresql.postgresql
|
||||
proxmox:
|
||||
@@ -1037,6 +1105,10 @@ plugin_routing:
|
||||
redirect: community.kubevirt.kubevirt
|
||||
net_tools.nios.api:
|
||||
redirect: infoblox.nios_modules.api
|
||||
oci_utils:
|
||||
deprecation:
|
||||
removal_version: 13.0.0
|
||||
warning_text: Code is unmaintained here and official Oracle collection is available for a number of years.
|
||||
postgresql:
|
||||
redirect: community.postgresql.postgresql
|
||||
proxmox:
|
||||
|
||||
@@ -94,7 +94,7 @@ EXAMPLES = r"""
|
||||
from re import compile as re_compile
|
||||
|
||||
from ansible.plugins.become import BecomeBase
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
|
||||
|
||||
ansi_color_codes = re_compile(to_bytes(r'\x1B\[[0-9;]+m'))
|
||||
|
||||
@@ -80,7 +80,7 @@ EXAMPLES = r"""
|
||||
from re import compile as re_compile
|
||||
|
||||
from ansible.plugins.become import BecomeBase
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
|
||||
ansi_color_codes = re_compile(to_bytes(r"\x1B\[[0-9;]+m"))
|
||||
|
||||
|
||||
2
plugins/cache/memcached.py
vendored
2
plugins/cache/memcached.py
vendored
@@ -54,7 +54,7 @@ from multiprocessing import Lock
|
||||
from itertools import chain
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.common._collections_compat import MutableSet
|
||||
from collections.abc import MutableSet
|
||||
from ansible.plugins.cache import BaseCacheModule
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ except ImportError:
|
||||
pass
|
||||
|
||||
from ansible.module_utils.six import binary_type, text_type
|
||||
from ansible.module_utils.common._collections_compat import MutableMapping, MutableSequence
|
||||
from collections.abc import MutableMapping, MutableSequence
|
||||
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
|
||||
from ansible.utils.color import colorize, hostcolor
|
||||
from ansible.utils.display import Display
|
||||
|
||||
@@ -34,7 +34,7 @@ import json
|
||||
|
||||
from ansible.utils.path import makedirs_safe
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.module_utils.common._collections_compat import MutableMapping
|
||||
from collections.abc import MutableMapping
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ class CallbackModule(CallbackBase):
|
||||
stderr = [r.get('exception', None), r.get('module_stderr', None)]
|
||||
stderr = "\n".join([e for e in stderr if e]).strip()
|
||||
|
||||
self._print_host_or_item(r['item'],
|
||||
self._print_host_or_item(r[r['ansible_loop_var']],
|
||||
r.get('changed', False),
|
||||
to_text(r.get('msg', '')),
|
||||
r.get('diff', None),
|
||||
|
||||
@@ -17,7 +17,8 @@ description:
|
||||
- Can be used to generate output for documentation examples.
|
||||
For this, the O(number_of_columns) option should be set to an explicit value.
|
||||
extends_documentation_fragment:
|
||||
- default_callback
|
||||
- ansible.builtin.default_callback
|
||||
- ansible.builtin.result_format_callback
|
||||
options:
|
||||
number_of_columns:
|
||||
description:
|
||||
@@ -25,6 +26,12 @@ options:
|
||||
type: int
|
||||
env:
|
||||
- name: ANSIBLE_COLLECTIONS_TASKS_ONLY_NUMBER_OF_COLUMNS
|
||||
result_format:
|
||||
# Part of the ansible.builtin.result_format_callback doc fragment
|
||||
version_added: 11.2.0
|
||||
pretty_results:
|
||||
# Part of the ansible.builtin.result_format_callback doc fragment
|
||||
version_added: 11.2.0
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
||||
@@ -80,7 +80,7 @@ from subprocess import call, Popen, PIPE
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.connection import ConnectionBase
|
||||
|
||||
|
||||
|
||||
@@ -59,3 +59,24 @@ options:
|
||||
type: str
|
||||
default: default
|
||||
"""
|
||||
|
||||
DATA = r"""
|
||||
options:
|
||||
excludes:
|
||||
description:
|
||||
- Applications or models to be excluded.
|
||||
- Format must be either V(app_label) or V(app_label.ModelName).
|
||||
type: list
|
||||
elements: str
|
||||
format:
|
||||
description:
|
||||
- Serialization format of the output data.
|
||||
type: str
|
||||
default: json
|
||||
choices: [xml, json, jsonl, yaml]
|
||||
notes:
|
||||
- As it is now, the module is B(not idempotent). Ensuring idempotency for this case can be a bit tricky, because it would
|
||||
amount to ensuring beforehand that all the data in the fixture file is already in the database, which is not a trivial feat.
|
||||
Unfortunately, neither C(django loaddata) nor C(django dumpdata) have a C(--dry-run) option, so the only way to know whether
|
||||
there is a change or not is to actually load or dump the data.
|
||||
"""
|
||||
|
||||
@@ -74,3 +74,12 @@ options:
|
||||
type: int
|
||||
default: 10
|
||||
"""
|
||||
|
||||
CONNECTION_NOTES = r"""
|
||||
options: {}
|
||||
notes:
|
||||
- This module uses JSON-RPC over HTTP(S) to communicate with the FreeIPA server.
|
||||
If you need to enroll the managed node into FreeIPA realm, you might want to consider using the collection
|
||||
L(freeipa.ansible_freeipa, https://galaxy.ansible.com/ui/repo/published/freeipa/ansible_freeipa/), but shell access to one
|
||||
node from the realm is required to manage the deployment.
|
||||
"""
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# This fragment is deprecated and will be removed in community.general 13.0.0
|
||||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
DOCUMENTATION = r"""
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# This fragment is deprecated and will be removed in community.general 13.0.0
|
||||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
DOCUMENTATION = r"""
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# This fragment is deprecated and will be removed in community.general 13.0.0
|
||||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
DOCUMENTATION = r"""
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# This fragment is deprecated and will be removed in community.general 13.0.0
|
||||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
DOCUMENTATION = r"""
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# This fragment is deprecated and will be removed in community.general 13.0.0
|
||||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
DOCUMENTATION = r"""
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# This fragment is deprecated and will be removed in community.general 13.0.0
|
||||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
DOCUMENTATION = r"""
|
||||
|
||||
@@ -47,3 +47,13 @@ notes:
|
||||
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.
|
||||
"""
|
||||
|
||||
ACTIONGROUP_SCALEWAY = r"""
|
||||
options: {}
|
||||
attributes:
|
||||
action_group:
|
||||
description: Use C(group/community.general.scaleway) in C(module_defaults) to set defaults for this module.
|
||||
support: full
|
||||
membership:
|
||||
- community.general.scaleway
|
||||
"""
|
||||
|
||||
@@ -36,7 +36,7 @@ _value:
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from ansible.module_utils.common._collections_compat import Sequence
|
||||
from collections.abc import Sequence
|
||||
from collections import Counter
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ _value:
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from ansible.module_utils.common._collections_compat import Mapping, Sequence
|
||||
from collections.abc import Mapping, Sequence
|
||||
|
||||
|
||||
def groupby_as_dict(sequence, attribute):
|
||||
|
||||
@@ -79,7 +79,7 @@ from ansible.errors import AnsibleError, AnsibleFilterError
|
||||
import importlib
|
||||
|
||||
try:
|
||||
import jc # noqa: F401, pylint: disable=unused-import
|
||||
import jc
|
||||
HAS_LIB = True
|
||||
except ImportError:
|
||||
HAS_LIB = False
|
||||
|
||||
@@ -197,7 +197,7 @@ _value:
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.common._collections_compat import Mapping, Sequence
|
||||
from collections.abc import Mapping, Sequence
|
||||
from ansible.utils.vars import merge_hash
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
@@ -51,7 +51,7 @@ _value:
|
||||
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
from collections.abc import Mapping
|
||||
from ansible.module_utils.six.moves import StringIO
|
||||
from ansible.module_utils.six.moves.configparser import ConfigParser
|
||||
|
||||
|
||||
89
plugins/filter/to_nice_yaml.yml
Normal file
89
plugins/filter/to_nice_yaml.yml
Normal file
@@ -0,0 +1,89 @@
|
||||
# Copyright (c) Contributors to the Ansible project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
DOCUMENTATION:
|
||||
name: to_nice_yaml
|
||||
author:
|
||||
- Ansible Core Team
|
||||
- Felix Fontein (@felixfontein)
|
||||
version_added: 11.3.0
|
||||
short_description: Convert variable to YAML string
|
||||
description:
|
||||
- Converts an Ansible variable into a YAML string representation, without preserving vaulted strings as P(ansible.builtin.to_yaml#filter).
|
||||
- This filter functions as a wrapper to the L(Python PyYAML library, https://pypi.org/project/PyYAML/)'s C(yaml.dump) function.
|
||||
positional: _input
|
||||
options:
|
||||
_input:
|
||||
description:
|
||||
- A variable or expression that returns a data structure.
|
||||
type: raw
|
||||
required: true
|
||||
indent:
|
||||
description:
|
||||
- Number of spaces to indent Python structures, mainly used for display to humans.
|
||||
type: integer
|
||||
default: 2
|
||||
sort_keys:
|
||||
description:
|
||||
- Affects sorting of dictionary keys.
|
||||
default: true
|
||||
type: bool
|
||||
default_style:
|
||||
description:
|
||||
- Indicates the style of the scalar.
|
||||
choices:
|
||||
- ''
|
||||
- "'"
|
||||
- '"'
|
||||
- '|'
|
||||
- '>'
|
||||
type: string
|
||||
canonical:
|
||||
description:
|
||||
- If set to V(true), export tag type to the output.
|
||||
type: bool
|
||||
width:
|
||||
description:
|
||||
- Set the preferred line width.
|
||||
type: integer
|
||||
line_break:
|
||||
description:
|
||||
- Specify the line break.
|
||||
type: string
|
||||
encoding:
|
||||
description:
|
||||
- Specify the output encoding.
|
||||
type: string
|
||||
explicit_start:
|
||||
description:
|
||||
- If set to V(true), adds an explicit start using C(---).
|
||||
type: bool
|
||||
explicit_end:
|
||||
description:
|
||||
- If set to V(true), adds an explicit end using C(...).
|
||||
type: bool
|
||||
redact_sensitive_values:
|
||||
description:
|
||||
- If set to V(true), vaulted strings are replaced by V(<redacted>) instead of being decrypted.
|
||||
- With future ansible-core versions, this can extend to other strings tagged as sensitive.
|
||||
- B(Note) that with ansible-core 2.18 and before this might not yield the expected result
|
||||
since these versions of ansible-core strip the vault information away from strings that are
|
||||
part of more complex data structures specified in C(vars).
|
||||
type: bool
|
||||
default: false
|
||||
notes:
|
||||
- More options may be available, see L(PyYAML documentation, https://pyyaml.org/wiki/PyYAMLDocumentation) for details.
|
||||
- >-
|
||||
These parameters to C(yaml.dump) are not accepted, as they are overridden internally: O(ignore:allow_unicode).
|
||||
|
||||
EXAMPLES: |
|
||||
---
|
||||
# Dump variable in a template to create a YAML document
|
||||
value: "{{ github_workflow | community.general.to_nice_yaml }}"
|
||||
|
||||
RETURN:
|
||||
_value:
|
||||
description:
|
||||
- The YAML serialized string representing the variable structure inputted.
|
||||
type: string
|
||||
@@ -116,7 +116,7 @@ except ImportError:
|
||||
HAS_PRETTYTABLE = False
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.six import string_types
|
||||
|
||||
|
||||
|
||||
113
plugins/filter/to_yaml.py
Normal file
113
plugins/filter/to_yaml.py
Normal file
@@ -0,0 +1,113 @@
|
||||
# Copyright (c) Contributors to the Ansible project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import typing as t
|
||||
from collections.abc import Mapping, Set
|
||||
|
||||
from yaml import dump
|
||||
try:
|
||||
from yaml.cyaml import CSafeDumper as SafeDumper
|
||||
except ImportError:
|
||||
from yaml import SafeDumper
|
||||
|
||||
from ansible.module_utils.common.collections import is_sequence
|
||||
try:
|
||||
# This is ansible-core 2.19+
|
||||
from ansible.utils.vars import transform_to_native_types
|
||||
from ansible.parsing.vault import VaultHelper, VaultLib
|
||||
except ImportError:
|
||||
transform_to_native_types = None
|
||||
|
||||
from ansible.parsing.yaml.objects import AnsibleVaultEncryptedUnicode
|
||||
from ansible.utils.unsafe_proxy import AnsibleUnsafe
|
||||
|
||||
|
||||
def _to_native_types_compat(value: t.Any, *, redact_value: str | None) -> t.Any:
|
||||
"""Compatibility function for ansible-core 2.18 and before."""
|
||||
if value is None:
|
||||
return value
|
||||
if isinstance(value, AnsibleUnsafe):
|
||||
# This only works up to ansible-core 2.18:
|
||||
return _to_native_types_compat(value._strip_unsafe(), redact_value=redact_value)
|
||||
# But that's fine, since this code path isn't taken on ansible-core 2.19+ anyway.
|
||||
if isinstance(value, Mapping):
|
||||
return {
|
||||
_to_native_types_compat(key, redact_value=redact_value): _to_native_types_compat(val, redact_value=redact_value)
|
||||
for key, val in value.items()
|
||||
}
|
||||
if isinstance(value, Set):
|
||||
return {_to_native_types_compat(elt, redact_value=redact_value) for elt in value}
|
||||
if is_sequence(value):
|
||||
return [_to_native_types_compat(elt, redact_value=redact_value) for elt in value]
|
||||
if isinstance(value, AnsibleVaultEncryptedUnicode):
|
||||
if redact_value is not None:
|
||||
return redact_value
|
||||
# This only works up to ansible-core 2.18:
|
||||
return value.data
|
||||
# But that's fine, since this code path isn't taken on ansible-core 2.19+ anyway.
|
||||
if isinstance(value, bytes):
|
||||
return bytes(value)
|
||||
if isinstance(value, str):
|
||||
return str(value)
|
||||
|
||||
return value
|
||||
|
||||
|
||||
def _to_native_types(value: t.Any, *, redact: bool) -> t.Any:
|
||||
if isinstance(value, Mapping):
|
||||
return {_to_native_types(k, redact=redact): _to_native_types(v, redact=redact) for k, v in value.items()}
|
||||
if is_sequence(value):
|
||||
return [_to_native_types(e, redact=redact) for e in value]
|
||||
if redact:
|
||||
ciphertext = VaultHelper.get_ciphertext(value, with_tags=False)
|
||||
if ciphertext and VaultLib.is_encrypted(ciphertext):
|
||||
return "<redacted>"
|
||||
return transform_to_native_types(value, redact=redact)
|
||||
|
||||
|
||||
def remove_all_tags(value: t.Any, *, redact_sensitive_values: bool = False) -> t.Any:
|
||||
"""
|
||||
Remove all tags from all values in the input.
|
||||
|
||||
If ``redact_sensitive_values`` is ``True``, all sensitive values will be redacted.
|
||||
"""
|
||||
if transform_to_native_types is not None:
|
||||
return _to_native_types(value, redact=redact_sensitive_values)
|
||||
|
||||
return _to_native_types_compat(
|
||||
value,
|
||||
redact_value="<redacted>" if redact_sensitive_values else None, # same string as in ansible-core 2.19 by transform_to_native_types()
|
||||
)
|
||||
|
||||
|
||||
def to_yaml(value: t.Any, *, redact_sensitive_values: bool = False, default_flow_style: bool | None = None, **kwargs) -> str:
|
||||
"""Serialize input as terse flow-style YAML."""
|
||||
return dump(
|
||||
remove_all_tags(value, redact_sensitive_values=redact_sensitive_values),
|
||||
Dumper=SafeDumper,
|
||||
allow_unicode=True,
|
||||
default_flow_style=default_flow_style,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
def to_nice_yaml(value: t.Any, *, redact_sensitive_values: bool = False, indent: int = 2, default_flow_style: bool = False, **kwargs) -> str:
|
||||
"""Serialize input as verbose multi-line YAML."""
|
||||
return to_yaml(
|
||||
value,
|
||||
redact_sensitive_values=redact_sensitive_values,
|
||||
default_flow_style=default_flow_style,
|
||||
indent=indent,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
def filters(self):
|
||||
return {
|
||||
'to_yaml': to_yaml,
|
||||
'to_nice_yaml': to_nice_yaml,
|
||||
}
|
||||
92
plugins/filter/to_yaml.yml
Normal file
92
plugins/filter/to_yaml.yml
Normal file
@@ -0,0 +1,92 @@
|
||||
# Copyright (c) Contributors to the Ansible project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
DOCUMENTATION:
|
||||
name: to_yaml
|
||||
author:
|
||||
- Ansible Core Team
|
||||
- Felix Fontein (@felixfontein)
|
||||
version_added: 11.3.0
|
||||
short_description: Convert variable to YAML string
|
||||
description:
|
||||
- Converts an Ansible variable into a YAML string representation, without preserving vaulted strings as P(ansible.builtin.to_yaml#filter).
|
||||
- This filter functions as a wrapper to the L(Python PyYAML library, https://pypi.org/project/PyYAML/)'s C(yaml.dump) function.
|
||||
positional: _input
|
||||
options:
|
||||
_input:
|
||||
description:
|
||||
- A variable or expression that returns a data structure.
|
||||
type: raw
|
||||
required: true
|
||||
indent:
|
||||
description:
|
||||
- Number of spaces to indent Python structures, mainly used for display to humans.
|
||||
type: integer
|
||||
sort_keys:
|
||||
description:
|
||||
- Affects sorting of dictionary keys.
|
||||
default: true
|
||||
type: bool
|
||||
default_style:
|
||||
description:
|
||||
- Indicates the style of the scalar.
|
||||
choices:
|
||||
- ''
|
||||
- "'"
|
||||
- '"'
|
||||
- '|'
|
||||
- '>'
|
||||
type: string
|
||||
canonical:
|
||||
description:
|
||||
- If set to V(true), export tag type to the output.
|
||||
type: bool
|
||||
width:
|
||||
description:
|
||||
- Set the preferred line width.
|
||||
type: integer
|
||||
line_break:
|
||||
description:
|
||||
- Specify the line break.
|
||||
type: string
|
||||
encoding:
|
||||
description:
|
||||
- Specify the output encoding.
|
||||
type: string
|
||||
explicit_start:
|
||||
description:
|
||||
- If set to V(true), adds an explicit start using C(---).
|
||||
type: bool
|
||||
explicit_end:
|
||||
description:
|
||||
- If set to V(true), adds an explicit end using C(...).
|
||||
type: bool
|
||||
redact_sensitive_values:
|
||||
description:
|
||||
- If set to V(true), vaulted strings are replaced by V(<redacted>) instead of being decrypted.
|
||||
- With future ansible-core versions, this can extend to other strings tagged as sensitive.
|
||||
- B(Note) that with ansible-core 2.18 and before this might not yield the expected result
|
||||
since these versions of ansible-core strip the vault information away from strings that are
|
||||
part of more complex data structures specified in C(vars).
|
||||
type: bool
|
||||
default: false
|
||||
notes:
|
||||
- More options may be available, see L(PyYAML documentation, https://pyyaml.org/wiki/PyYAMLDocumentation) for details.
|
||||
- >-
|
||||
These parameters to C(yaml.dump) are not accepted, as they are overridden internally: O(ignore:allow_unicode).
|
||||
|
||||
EXAMPLES: |
|
||||
---
|
||||
# Dump variable in a template to create a YAML document
|
||||
value: "{{ github_workflow | community.general.to_yaml }}"
|
||||
|
||||
---
|
||||
# Same as above but 'prettier' (equivalent to community.general.to_nice_yaml filter)
|
||||
value: "{{ docker_config | community.general.to_yaml(indent=2) }}"
|
||||
|
||||
RETURN:
|
||||
_value:
|
||||
description:
|
||||
- The YAML serialized string representing the variable structure inputted.
|
||||
type: string
|
||||
@@ -404,7 +404,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
results['_meta']['hostvars'][iocage_name]['iocage_basejail'] = jail[9]
|
||||
|
||||
def get_properties(self, t_stdout, results, hostname):
|
||||
properties = dict([x.split(':', 1) for x in t_stdout.splitlines()])
|
||||
properties = dict(x.split(':', 1) for x in t_stdout.splitlines())
|
||||
results['_meta']['hostvars'][hostname]['iocage_properties'] = properties
|
||||
|
||||
def populate(self, results):
|
||||
|
||||
@@ -27,9 +27,14 @@ options:
|
||||
elements: string
|
||||
default:
|
||||
- ams1
|
||||
- ams2
|
||||
- ams3
|
||||
- par1
|
||||
- par2
|
||||
- par3
|
||||
- waw1
|
||||
- waw2
|
||||
- waw3
|
||||
tags:
|
||||
description: Filter results on a specific tag.
|
||||
type: list
|
||||
|
||||
@@ -78,7 +78,7 @@ from subprocess import Popen, PIPE
|
||||
|
||||
from ansible.errors import AnsibleParserError
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.module_utils.common._collections_compat import MutableMapping
|
||||
from collections.abc import MutableMapping
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
|
||||
|
||||
114
plugins/lookup/binary_file.py
Normal file
114
plugins/lookup/binary_file.py
Normal file
@@ -0,0 +1,114 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (c) 2025, Felix Fontein <felix@fontein.de>
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: binary_file
|
||||
author: Felix Fontein (@felixfontein)
|
||||
short_description: Read binary file and return it Base64 encoded
|
||||
version_added: 11.2.0
|
||||
description:
|
||||
- This lookup returns the contents from a file on the Ansible controller's file system.
|
||||
- The file is read as a binary file and its contents are returned Base64 encoded.
|
||||
This is similar to using P(ansible.builtin.file#lookup) combined with P(ansible.builtin.b64encode#filter),
|
||||
except that P(ansible.builtin.file#lookup) does not support binary files as it interprets the contents as UTF-8,
|
||||
which can cause the wrong content being Base64 encoded.
|
||||
options:
|
||||
_terms:
|
||||
description:
|
||||
- Paths of the files to read.
|
||||
- Relative paths will be searched for in different places. See R(Ansible task paths, playbook_task_paths) for more details.
|
||||
required: true
|
||||
type: list
|
||||
elements: str
|
||||
not_exist:
|
||||
description:
|
||||
- Determine how to react if the specified file cannot be found.
|
||||
type: str
|
||||
choices:
|
||||
error: Raise an error.
|
||||
empty: Return an empty string for the file.
|
||||
empty_str:
|
||||
- Return the string C(empty) for the file.
|
||||
- This cannot be confused with Base64 encoding due to the missing padding.
|
||||
default: error
|
||||
notes:
|
||||
- This lookup does not understand 'globbing' - use the P(ansible.builtin.fileglob#lookup) lookup instead.
|
||||
seealso:
|
||||
- plugin: ansible.builtin.b64decode
|
||||
plugin_type: filter
|
||||
description: >-
|
||||
The b64decode filter can be used to decode Base64 encoded data.
|
||||
Note that Ansible cannot handle binary data, the data will be interpreted as UTF-8 text!
|
||||
- plugin: ansible.builtin.file
|
||||
plugin_type: lookup
|
||||
description: You can use this lookup plugin to read text files from the Ansible controller.
|
||||
- module: ansible.builtin.slurp
|
||||
description: >-
|
||||
Also allows to read binary files Base64 encoded, but from remote targets.
|
||||
With C(delegate_to: localhost) can be redirected to run on the controller, but you have to know the path to the file to read.
|
||||
Both this plugin and P(ansible.builtin.file#lookup) use some search path logic to for example also find files in the C(files)
|
||||
directory of a role.
|
||||
- ref: playbook_task_paths
|
||||
description: Search paths used for relative files.
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
---
|
||||
- name: Output Base64 contents of binary files on screen
|
||||
ansible.builtin.debug:
|
||||
msg: "Content: {{ lookup('community.general.binary_file', item) }}"
|
||||
loop:
|
||||
- some-binary-file.bin
|
||||
"""
|
||||
|
||||
RETURN = r"""
|
||||
_raw:
|
||||
description:
|
||||
- Base64 encoded content of requested files, or an empty string resp. the string C(empty), depending on the O(not_exist) option.
|
||||
- This list contains one string per element of O(_terms) in the same order as O(_terms).
|
||||
type: list
|
||||
elements: str
|
||||
returned: success
|
||||
"""
|
||||
|
||||
import base64
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
||||
def run(self, terms, variables=None, **kwargs):
|
||||
self.set_options(var_options=variables, direct=kwargs)
|
||||
not_exist = self.get_option("not_exist")
|
||||
|
||||
result = []
|
||||
for term in terms:
|
||||
display.debug(f"Searching for binary file: {term!r}")
|
||||
path = self.find_file_in_search_path(variables, "files", term, ignore_missing=(not_exist != "error"))
|
||||
display.vvvv(f"community.general.binary_file lookup using {path} as file")
|
||||
|
||||
if not path:
|
||||
if not_exist == "empty":
|
||||
result.append("")
|
||||
continue
|
||||
if not_exist == "empty_str":
|
||||
result.append("empty")
|
||||
continue
|
||||
raise AnsibleLookupError(f"Could not locate file in community.general.binary_file lookup: {term}")
|
||||
|
||||
try:
|
||||
with open(path, "rb") as f:
|
||||
result.append(base64.b64encode(f.read()).decode("utf-8"))
|
||||
except Exception as exc:
|
||||
raise AnsibleLookupError(f"Error while reading {path}: {exc}")
|
||||
|
||||
return result
|
||||
@@ -121,7 +121,7 @@ _list:
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.module_utils.common._collections_compat import Mapping, Sequence
|
||||
from collections.abc import Mapping, Sequence
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.template import Templar
|
||||
|
||||
@@ -9,10 +9,12 @@ DOCUMENTATION = r"""
|
||||
name: github_app_access_token
|
||||
author:
|
||||
- Poh Wei Sheng (@weisheng-p)
|
||||
- Bruno Lavoie (@blavoie)
|
||||
short_description: Obtain short-lived Github App Access tokens
|
||||
version_added: '8.2.0'
|
||||
requirements:
|
||||
- jwt (https://github.com/GehirnInc/python-jwt)
|
||||
- jwt (https://github.com/GehirnInc/python-jwt) OR
|
||||
- PyJWT (https://pypi.org/project/PyJWT/) AND cryptography (https://pypi.org/project/cryptography/)
|
||||
description:
|
||||
- This generates a Github access token that can be used with a C(git) command, if you use a Github App.
|
||||
options:
|
||||
@@ -66,13 +68,24 @@ _raw:
|
||||
elements: str
|
||||
"""
|
||||
|
||||
|
||||
try:
|
||||
from jwt import JWT, jwk_from_pem
|
||||
import jwt
|
||||
HAS_JWT = True
|
||||
except ImportError:
|
||||
HAS_JWT = False
|
||||
|
||||
HAS_PYTHON_JWT = False # vs pyjwt
|
||||
if HAS_JWT and hasattr(jwt, 'JWT'):
|
||||
HAS_PYTHON_JWT = True
|
||||
from jwt import jwk_from_pem, jwt_instance
|
||||
|
||||
try:
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
HAS_CRYPTOGRAPHY = True
|
||||
except ImportError:
|
||||
HAS_CRYPTOGRAPHY = False
|
||||
|
||||
|
||||
import time
|
||||
import json
|
||||
from ansible.module_utils.urls import open_url
|
||||
@@ -81,26 +94,52 @@ from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
if HAS_JWT:
|
||||
jwt_instance = JWT()
|
||||
else:
|
||||
jwk_from_pem = None
|
||||
jwt_instance = None
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class PythonJWT:
|
||||
|
||||
@staticmethod
|
||||
def read_key(path, private_key=None):
|
||||
try:
|
||||
if private_key:
|
||||
return jwk_from_pem(private_key.encode('utf-8'))
|
||||
with open(path, 'rb') as pem_file:
|
||||
return jwk_from_pem(pem_file.read())
|
||||
except Exception as e:
|
||||
raise AnsibleError(f"Error while parsing key file: {e}")
|
||||
|
||||
@staticmethod
|
||||
def encode_jwt(app_id, jwk, exp=600):
|
||||
now = int(time.time())
|
||||
payload = {
|
||||
'iat': now,
|
||||
'exp': now + exp,
|
||||
'iss': app_id,
|
||||
}
|
||||
try:
|
||||
return jwt_instance.encode(payload, jwk, alg='RS256')
|
||||
except Exception as e:
|
||||
raise AnsibleError(f"Error while encoding jwt: {e}")
|
||||
|
||||
|
||||
def read_key(path, private_key=None):
|
||||
if HAS_PYTHON_JWT:
|
||||
return PythonJWT.read_key(path, private_key)
|
||||
try:
|
||||
if private_key:
|
||||
return jwk_from_pem(private_key.encode('utf-8'))
|
||||
with open(path, 'rb') as pem_file:
|
||||
return jwk_from_pem(pem_file.read())
|
||||
key_bytes = private_key.encode('utf-8')
|
||||
else:
|
||||
with open(path, 'rb') as pem_file:
|
||||
key_bytes = pem_file.read()
|
||||
return serialization.load_pem_private_key(key_bytes, password=None)
|
||||
except Exception as e:
|
||||
raise AnsibleError(f"Error while parsing key file: {e}")
|
||||
|
||||
|
||||
def encode_jwt(app_id, jwk, exp=600):
|
||||
def encode_jwt(app_id, private_key_obj, exp=600):
|
||||
if HAS_PYTHON_JWT:
|
||||
return PythonJWT.encode_jwt(app_id, private_key_obj)
|
||||
now = int(time.time())
|
||||
payload = {
|
||||
'iat': now,
|
||||
@@ -108,7 +147,7 @@ def encode_jwt(app_id, jwk, exp=600):
|
||||
'iss': app_id,
|
||||
}
|
||||
try:
|
||||
return jwt_instance.encode(payload, jwk, alg='RS256')
|
||||
return jwt.encode(payload, private_key_obj, algorithm='RS256')
|
||||
except Exception as e:
|
||||
raise AnsibleError(f"Error while encoding jwt: {e}")
|
||||
|
||||
@@ -150,7 +189,11 @@ class LookupModule(LookupBase):
|
||||
def run(self, terms, variables=None, **kwargs):
|
||||
if not HAS_JWT:
|
||||
raise AnsibleError('Python jwt library is required. '
|
||||
'Please install using "pip install jwt"')
|
||||
'Please install using "pip install pyjwt"')
|
||||
|
||||
if not HAS_PYTHON_JWT and not HAS_CRYPTOGRAPHY:
|
||||
raise AnsibleError('Python cryptography library is required. '
|
||||
'Please install using "pip install cryptography"')
|
||||
|
||||
self.set_options(var_options=variables, direct=kwargs)
|
||||
|
||||
|
||||
@@ -15,6 +15,12 @@ requirements:
|
||||
- hiera (command line utility)
|
||||
description:
|
||||
- Retrieves data from an Puppetmaster node using Hiera as ENC.
|
||||
deprecated:
|
||||
removed_in: 13.0.0
|
||||
why: >-
|
||||
Hiera has been deprecated a long time ago.
|
||||
If you disagree with this deprecation, please create an issue in the community.general repository.
|
||||
alternative: Unknown.
|
||||
options:
|
||||
_terms:
|
||||
description:
|
||||
|
||||
@@ -25,26 +25,30 @@ options:
|
||||
type: int
|
||||
upper:
|
||||
description:
|
||||
- Include uppercase letters in the string.
|
||||
- Possibly include uppercase letters in the string.
|
||||
- To ensure atleast one uppercase letter, set O(min_upper) to V(1).
|
||||
default: true
|
||||
type: bool
|
||||
lower:
|
||||
description:
|
||||
- Include lowercase letters in the string.
|
||||
- Possibly include lowercase letters in the string.
|
||||
- To ensure atleast one lowercase letter, set O(min_lower) to V(1).
|
||||
default: true
|
||||
type: bool
|
||||
numbers:
|
||||
description:
|
||||
- Include numbers in the string.
|
||||
- Possibly include numbers in the string.
|
||||
- To ensure atleast one numeric character, set O(min_numeric) to V(1).
|
||||
default: true
|
||||
type: bool
|
||||
special:
|
||||
description:
|
||||
- Include special characters in the string.
|
||||
- Possibly include special characters in the string.
|
||||
- Special characters are taken from Python standard library C(string). See L(the documentation of
|
||||
string.punctuation,https://docs.python.org/3/library/string.html#string.punctuation)
|
||||
for which characters are used.
|
||||
- The choice of special characters can be changed to setting O(override_special).
|
||||
- To ensure atleast one special character, set O(min_special) to V(1).
|
||||
default: true
|
||||
type: bool
|
||||
min_numeric:
|
||||
@@ -97,6 +101,14 @@ options:
|
||||
- Returns base64 encoded string.
|
||||
type: bool
|
||||
default: false
|
||||
seed:
|
||||
description:
|
||||
- Seed for random string generator.
|
||||
- B(Note) that this drastically reduces the security of this plugin. First, when O(seed) is provided, a non-cryptographic random number generator is used.
|
||||
Second, if the seed does not contain enough entropy, the generated string is weak.
|
||||
B(Do not use the generated string as a password or a secure token when using this option!)
|
||||
type: str
|
||||
version_added: 11.3.0
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
@@ -105,6 +117,14 @@ EXAMPLES = r"""
|
||||
var: lookup('community.general.random_string')
|
||||
# Example result: 'DeadBeeF'
|
||||
|
||||
- name: Generate random string with seed
|
||||
ansible.builtin.debug:
|
||||
var: lookup('community.general.random_string', seed=12345)
|
||||
# Example result: '6[~(2q5O'
|
||||
# NOTE: Do **not** use this string as a password or a secure token,
|
||||
# unless you know exactly what you are doing!
|
||||
# Specifying seed uses a non-secure random number generator.
|
||||
|
||||
- name: Generate random string with length 12
|
||||
ansible.builtin.debug:
|
||||
var: lookup('community.general.random_string', length=12)
|
||||
@@ -178,7 +198,6 @@ class LookupModule(LookupBase):
|
||||
lower_chars = string.ascii_lowercase
|
||||
upper_chars = string.ascii_uppercase
|
||||
special_chars = string.punctuation
|
||||
random_generator = random.SystemRandom()
|
||||
|
||||
self.set_options(var_options=variables, direct=kwargs)
|
||||
|
||||
@@ -187,6 +206,13 @@ class LookupModule(LookupBase):
|
||||
override_all = self.get_option("override_all")
|
||||
ignore_similar_chars = self.get_option("ignore_similar_chars")
|
||||
similar_chars = self.get_option("similar_chars")
|
||||
seed = self.get_option("seed")
|
||||
|
||||
if seed is None:
|
||||
random_generator = random.SystemRandom()
|
||||
else:
|
||||
random_generator = random.Random(seed)
|
||||
|
||||
values = ""
|
||||
available_chars_set = ""
|
||||
|
||||
@@ -232,10 +258,11 @@ class LookupModule(LookupBase):
|
||||
remaining_pass_len = length - len(values)
|
||||
values += self.get_random(random_generator, available_chars_set, remaining_pass_len)
|
||||
|
||||
# Get pseudo randomization
|
||||
shuffled_values = list(values)
|
||||
# Randomize the order
|
||||
random.shuffle(shuffled_values)
|
||||
if seed is None:
|
||||
# Get pseudo randomization
|
||||
# Randomize the order
|
||||
random.shuffle(shuffled_values)
|
||||
|
||||
if base64_flag:
|
||||
return [self.b64encode("".join(shuffled_values))]
|
||||
|
||||
@@ -8,7 +8,7 @@ __metaclass__ = type
|
||||
|
||||
|
||||
from ansible.module_utils.common.dict_transformations import dict_merge
|
||||
from ansible_collections.community.general.plugins.module_utils.cmd_runner import cmd_runner_fmt
|
||||
from ansible_collections.community.general.plugins.module_utils import cmd_runner_fmt
|
||||
from ansible_collections.community.general.plugins.module_utils.python_runner import PythonRunner
|
||||
from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper
|
||||
|
||||
@@ -23,28 +23,58 @@ django_std_args = dict(
|
||||
verbosity=dict(type="int", choices=[0, 1, 2, 3]),
|
||||
skip_checks=dict(type="bool"),
|
||||
)
|
||||
_database_dash = dict(
|
||||
database=dict(type="str", default="default"),
|
||||
)
|
||||
_data = dict(
|
||||
excludes=dict(type="list", elements="str"),
|
||||
format=dict(type="str", default="json", choices=["xml", "json", "jsonl", "yaml"]),
|
||||
)
|
||||
_pks = dict(
|
||||
primary_keys=dict(type="list", elements="str"),
|
||||
)
|
||||
|
||||
_django_std_arg_fmts = dict(
|
||||
all=cmd_runner_fmt.as_bool("--all"),
|
||||
app=cmd_runner_fmt.as_opt_val("--app"),
|
||||
apps=cmd_runner_fmt.as_list(),
|
||||
apps_models=cmd_runner_fmt.as_list(),
|
||||
check=cmd_runner_fmt.as_bool("--check"),
|
||||
command=cmd_runner_fmt.as_list(),
|
||||
settings=cmd_runner_fmt.as_opt_eq_val("--settings"),
|
||||
database_dash=cmd_runner_fmt.as_opt_eq_val("--database"),
|
||||
database_stacked_dash=cmd_runner_fmt.stack(cmd_runner_fmt.as_opt_val)("--database"),
|
||||
deploy=cmd_runner_fmt.as_bool("--deploy"),
|
||||
dry_run=cmd_runner_fmt.as_bool("--dry-run"),
|
||||
excludes=cmd_runner_fmt.stack(cmd_runner_fmt.as_opt_val)("--exclude"),
|
||||
fail_level=cmd_runner_fmt.as_opt_val("--fail-level"),
|
||||
fixture=cmd_runner_fmt.as_opt_val("--output"),
|
||||
fixtures=cmd_runner_fmt.as_list(),
|
||||
format=cmd_runner_fmt.as_opt_val("--format"),
|
||||
ignore_non_existent=cmd_runner_fmt.as_bool("--ignorenonexistent"),
|
||||
indent=cmd_runner_fmt.as_opt_val("--indent"),
|
||||
natural_foreign=cmd_runner_fmt.as_bool("--natural-foreign"),
|
||||
natural_primary=cmd_runner_fmt.as_bool("--natural-primary"),
|
||||
no_color=cmd_runner_fmt.as_fixed("--no-color"),
|
||||
noinput=cmd_runner_fmt.as_fixed("--noinput"),
|
||||
primary_keys=lambda v: ["--pks", ",".join(v)],
|
||||
pythonpath=cmd_runner_fmt.as_opt_eq_val("--pythonpath"),
|
||||
settings=cmd_runner_fmt.as_opt_eq_val("--settings"),
|
||||
skip_checks=cmd_runner_fmt.as_bool("--skip-checks"),
|
||||
tags=cmd_runner_fmt.stack(cmd_runner_fmt.as_opt_val)("--tag"),
|
||||
traceback=cmd_runner_fmt.as_bool("--traceback"),
|
||||
verbosity=cmd_runner_fmt.as_opt_val("--verbosity"),
|
||||
no_color=cmd_runner_fmt.as_fixed("--no-color"),
|
||||
skip_checks=cmd_runner_fmt.as_bool("--skip-checks"),
|
||||
version=cmd_runner_fmt.as_fixed("--version"),
|
||||
)
|
||||
|
||||
_django_database_args = dict(
|
||||
database=dict(type="str", default="default"),
|
||||
)
|
||||
|
||||
# keys can be used in _django_args
|
||||
_args_menu = dict(
|
||||
std=(django_std_args, _django_std_arg_fmts),
|
||||
database=(_django_database_args, {"database": cmd_runner_fmt.as_opt_eq_val("--database")}),
|
||||
noinput=({}, {"noinput": cmd_runner_fmt.as_fixed("--noinput")}),
|
||||
dry_run=({}, {"dry_run": cmd_runner_fmt.as_bool("--dry-run")}),
|
||||
check=({}, {"check": cmd_runner_fmt.as_bool("--check")}),
|
||||
database=(_database_dash, {"database": _django_std_arg_fmts["database_dash"]}), # deprecate, remove in 13.0.0
|
||||
noinput=({}, {"noinput": cmd_runner_fmt.as_fixed("--noinput")}), # deprecate, remove in 13.0.0
|
||||
dry_run=({}, {"dry_run": cmd_runner_fmt.as_bool("--dry-run")}), # deprecate, remove in 13.0.0
|
||||
check=({}, {"check": cmd_runner_fmt.as_bool("--check")}), # deprecate, remove in 13.0.0
|
||||
database_dash=(_database_dash, {}),
|
||||
data=(_data, {}),
|
||||
)
|
||||
|
||||
|
||||
@@ -55,11 +85,11 @@ class _DjangoRunner(PythonRunner):
|
||||
|
||||
super(_DjangoRunner, self).__init__(module, ["-m", "django"], arg_formats=arg_fmts, **kwargs)
|
||||
|
||||
def __call__(self, output_process=None, ignore_value_none=True, check_mode_skip=False, check_mode_return=None, **kwargs):
|
||||
def __call__(self, output_process=None, check_mode_skip=False, check_mode_return=None, **kwargs):
|
||||
args_order = (
|
||||
("command", "no_color", "settings", "pythonpath", "traceback", "verbosity", "skip_checks") + self._prepare_args_order(self.default_args_order)
|
||||
)
|
||||
return super(_DjangoRunner, self).__call__(args_order, output_process, ignore_value_none, check_mode_skip, check_mode_return, **kwargs)
|
||||
return super(_DjangoRunner, self).__call__(args_order, output_process, check_mode_skip=check_mode_skip, check_mode_return=check_mode_return, **kwargs)
|
||||
|
||||
def bare_context(self, *args, **kwargs):
|
||||
return super(_DjangoRunner, self).__call__(*args, **kwargs)
|
||||
|
||||
@@ -134,7 +134,7 @@ def gitlab_authentication(module, min_version=None):
|
||||
def filter_returned_variables(gitlab_variables):
|
||||
# pop properties we don't know
|
||||
existing_variables = [dict(x.attributes) for x in gitlab_variables]
|
||||
KNOWN = ['key', 'value', 'masked', 'protected', 'variable_type', 'environment_scope', 'raw']
|
||||
KNOWN = ['key', 'value', 'masked', 'hidden', 'protected', 'variable_type', 'environment_scope', 'raw']
|
||||
for item in existing_variables:
|
||||
for key in list(item.keys()):
|
||||
if key not in KNOWN:
|
||||
@@ -153,6 +153,7 @@ def vars_to_variables(vars, module):
|
||||
"value": str(value),
|
||||
"masked": False,
|
||||
"protected": False,
|
||||
"hidden": False,
|
||||
"raw": False,
|
||||
"variable_type": "env_var",
|
||||
}
|
||||
@@ -163,6 +164,7 @@ def vars_to_variables(vars, module):
|
||||
"name": item,
|
||||
"value": value.get('value'),
|
||||
"masked": value.get('masked'),
|
||||
"hidden": value.get('hidden'),
|
||||
"protected": value.get('protected'),
|
||||
"raw": value.get('raw'),
|
||||
"variable_type": value.get('variable_type'),
|
||||
|
||||
@@ -104,6 +104,7 @@ URL_IDENTITY_PROVIDERS = "{url}/admin/realms/{realm}/identity-provider/instances
|
||||
URL_IDENTITY_PROVIDER = "{url}/admin/realms/{realm}/identity-provider/instances/{alias}"
|
||||
URL_IDENTITY_PROVIDER_MAPPERS = "{url}/admin/realms/{realm}/identity-provider/instances/{alias}/mappers"
|
||||
URL_IDENTITY_PROVIDER_MAPPER = "{url}/admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id}"
|
||||
URL_IDENTITY_PROVIDER_IMPORT = "{url}/admin/realms/{realm}/identity-provider/import-config"
|
||||
|
||||
URL_COMPONENTS = "{url}/admin/realms/{realm}/components"
|
||||
URL_COMPONENT = "{url}/admin/realms/{realm}/components/{id}"
|
||||
@@ -2580,6 +2581,23 @@ class KeycloakAPI(object):
|
||||
self.fail_request(e, msg='Could not obtain list of identity provider mappers for idp %s in realm %s: %s'
|
||||
% (alias, realm, str(e)))
|
||||
|
||||
def fetch_idp_endpoints_import_config_url(self, fromUrl, providerId='oidc', realm='master'):
|
||||
""" Import an identity provider configuration through Keycloak server from a well-known URL.
|
||||
:param fromUrl: URL to import the identity provider configuration from.
|
||||
"param providerId: Provider ID of the identity provider to import, default 'oidc'.
|
||||
:param realm: Realm
|
||||
:return: IDP endpoins.
|
||||
"""
|
||||
try:
|
||||
payload = {
|
||||
"providerId": providerId,
|
||||
"fromUrl": fromUrl
|
||||
}
|
||||
idps_url = URL_IDENTITY_PROVIDER_IMPORT.format(url=self.baseurl, realm=realm)
|
||||
return self._request_and_deserialize(idps_url, method='POST', data=json.dumps(payload))
|
||||
except Exception as e:
|
||||
self.fail_request(e, msg='Could not import the IdP config in realm %s: %s' % (realm, str(e)))
|
||||
|
||||
def get_identity_provider_mapper(self, mid, alias, realm='master'):
|
||||
""" Fetch identity provider representation from a realm using the idp's alias.
|
||||
If the identity provider does not exist, None is returned.
|
||||
|
||||
@@ -297,7 +297,7 @@ class ManageIQPolicies(object):
|
||||
|
||||
# make a list of assigned full profile names strings
|
||||
# e.g. ['openscap profile', ...]
|
||||
assigned_profiles_set = set([profile['profile_name'] for profile in assigned_profiles])
|
||||
assigned_profiles_set = set(profile['profile_name'] for profile in assigned_profiles)
|
||||
|
||||
for profile in profiles:
|
||||
assigned = profile.get('name') in assigned_profiles_set
|
||||
@@ -424,7 +424,7 @@ class ManageIQTags(object):
|
||||
|
||||
# make a list of assigned full tag names strings
|
||||
# e.g. ['/managed/environment/prod', ...]
|
||||
assigned_tags_set = set([tag['full_name'] for tag in assigned_tags])
|
||||
assigned_tags_set = set(tag['full_name'] for tag in assigned_tags)
|
||||
|
||||
for tag in tags:
|
||||
assigned = self.full_tag_name(tag) in assigned_tags_set
|
||||
|
||||
@@ -31,7 +31,7 @@ except ImportError:
|
||||
from ansible.module_utils import six
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
from ansible.module_utils.six.moves.collections_abc import Mapping
|
||||
|
||||
|
||||
def transform_list_to_dict(list_):
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user