1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 05:09:12 +00:00
Commit graph

3215 commits

Author SHA1 Message Date
Mariam Ahhttouche
f57843c1e1
Merge 936854e9e3 into dae2157bb7 2026-03-19 22:48:54 +01:00
Christoph Fiehe
dae2157bb7
merge_variables: extended merge capabilities added (#11536)
* merge_variables: extended merge capabilities added

This extension gives you more control over the variable merging process of the lookup plugin `merge_variables`. It closes the gap between Puppet's Hiera merging capabilities and the limitations of Ansible's default variable plugin `host_group_vars` regarding fragment-based value definition. You can now decide which merge strategy should be applied to dicts, lists, and other types. Furthermore, you can specify a merge strategy that should be applied in case of type conflicts.

The default behavior of the plugin has been preserved so that it is fully backward-compatible with the already implemented state.

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Update changelogs/fragments/11536-merge-variables-extended-merging-capabilities.yml

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

* Update plugins/lookup/merge_variables.py

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

* Periods added at the end of each choice description

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Update plugins/lookup/merge_variables.py

Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>

* ref: follow project standard for choice descriptions

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* ref: more examples added and refactoring

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Update plugins/lookup/merge_variables.py

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

* ref: some more comments to examples added

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* fix: unused import removed

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* ref: re-add "merge" to strategy map

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Update comments

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Specification of transformations solely as string

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Comments updated

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* ref: `append_rp` and `prepend_rp` removed
feat: options dict for list transformations re-added
feat: allow setting `keep` for dedup transformation with possible values: `first` (default) and `last`

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* ref: improve options documentation

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* ref: documentation improved, avoiding words like newer or older in merge description

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Update plugins/lookup/merge_variables.py

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

* ref: "prio" replaced by "dict"

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* feat: two integration tests added

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

---------

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>
Co-authored-by: Fiehe Christoph <c.fiehe@eurodata.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
2026-03-19 22:45:44 +01:00
thomasbargetz
25b5655be7
keycloak_authentication_v2: verify providerIds (fix 11583) (#11585)
* 11583 verify providerIds in keycloak_authentication_v2

* 11583 code cleanup

---------

Co-authored-by: Thomas Bargetz <thomas.bargetz@rise-world.com>
2026-03-18 07:06:09 +01:00
Adam D
d8bb637cba
nictagadm: don't call is_valid_mac when etherstub is true (#11589)
* nictagadm: don't call is_valid_mac when etherstub is true

* Add changelog fragment

* update changelog fragment

* Shorten changelog fragement

* Update changelogs/fragments/nictagadm-etherstub-nonetype-bugfix.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-18 06:50:23 +01:00
thomasbargetz
e7a253b4c9
keycloak_authentication_v2: covers idp flow overrides in safe swap (fix 11582) (#11601)
* 11582 keycloak_authentication_v2 covers idp flow overrides in safe swap

* 11583 update documentation and comments
2026-03-18 06:49:24 +01:00
Thomas Sjögren
df9b30448a
github_secrets_info: new module (#11586)
* github_secrets_info: new module

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* clean tests

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* remove pynacl dep

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* fqcn

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* remove excess output

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* just return result as sample

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* only print secrets, adapt tests

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update plugins/modules/github_secrets_info.py

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

* Update plugins/modules/github_secrets_info.py

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

* Update plugins/modules/github_secrets_info.py

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

* t is for typing, and typing is what we did

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add info_module attributes

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-16 20:14:08 +01:00
Alexei Znamensky
cc24e57307
monit: deprecate support for monit <= 5.18 (#11254)
* monit: deprecate support for monit <= 5.18

* add additional runs for checking version

* add changelog frag

* bump deprecation for 14.0.0
2026-03-16 20:04:05 +01:00
Felix Fontein
c8fe1e571f
Fix typing imports (#11603)
Fix typing imports.
2026-03-15 19:47:25 +01:00
Felix Fontein
f642dac900
sssd_info: fix attributes (#11605)
Fix attributes.
2026-03-15 19:46:50 +01:00
Thomas Sjögren
46ffec6f0e
github_secrets: new module (#11514)
* add support for managing GitHub secrets

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* fix tab

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* update for sanity

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* more sanity fixes

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* update botmeta

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* formating

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* remove list function

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* remove docstring, format text strings and return codes

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* switch to deps

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* black and ruff doesnt get along

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* initial unit tests

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* update non-existing secret test

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* update description and details

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* handle when a secret cant be deleted

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* fail if not acceptable error codes

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add test for non-acceptable status codes

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* remove local ruff config

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* allow empty strings

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* set required_

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* extend tests

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* cleanup

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* cover all, got a git urlopen error

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* cover all, got a git urlopen error

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* ensure value cant be None

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* check_mode

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* bump to 12.5.0

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update plugins/modules/github_secrets.py

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

* extend check_mode and related tests

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* split constants and return dict when checking secret

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* switch to HTTPStatus

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* replace DELETE and UPDATE with NO_CONTENT

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update plugins/modules/github_secrets.py

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

* Update plugins/modules/github_secrets.py

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

* update tests

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update plugins/modules/github_secrets.py

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

* Update plugins/modules/github_secrets.py

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

* Update plugins/modules/github_secrets.py

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

* Update plugins/modules/github_secrets.py

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

* Update plugins/modules/github_secrets.py

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

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-15 16:29:33 +01:00
Alexei Znamensky
ce5d5622b9
replace list(map(...)) with comprehension (#11590)
* replace `list(map(...))` with comprehension

* add changelog frag
2026-03-14 08:43:23 +01:00
Dor Breger
3194ed9d36
ipa_dnsrecord fix error when using dnsttl and nothing to change (#11559)
* ipa_dnsrecord fix error when using dnsttl and nothing to change

* Add changelog and bump version

* ipa_dnsrecord list comp in dnsrecord_find

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

* 11559 changelog fragment fix capitalization

* ipa_dnsrecord dnsrecord_find ttl transform to integer always

* ipa_dnsrecord dnsrecord_find method refactor

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-13 21:01:50 +01:00
Aleksandr Gabidullin
f0e3edc892
New module: logrotate (#11424)
* add module logrotate

* add values for start

* fix docs

* version 12.5.0 and fix test

---------

Co-authored-by: Александр Габидуллин <agabidullin@astralinux.ru>
2026-03-13 07:44:21 +01:00
thomasbargetz
a69f7e60b4
add module keycloak_authentication_v2 (#11557)
* add module keycloak_authentication_v2

* skip sanity checks, because the run into a recursion

* 11556 fix documentation

* 11556 limit the depth of nested flows to 4

* 11556 code cleanup

* 11556 code cleanup - add type hints

* 11556 add keycloak_authentication_v2 to meta/runtime.yml

* 11556 code cleanup - remove custom type hints

* 11556 code cleanup - none checks

* Update plugins/modules/keycloak_authentication_v2.py

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

* Update plugins/modules/keycloak_authentication_v2.py

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

* 11556 code cleanup - remove document starts

* 11556 cleanup

* 11556 cleanup

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Thomas Bargetz <thomas.bargetz@rise-world.com>
2026-03-12 22:04:08 +01:00
Emmanuel Benoît
0e4783dcc3
Binary attribute support for ldap_attrs and ldap_entry (#11558)
* Binary attribute support for `ldap_attrs` and `ldap_entry`

This commit implements binary attribute support for the `ldap_attrs` and
`ldap_entry` plugins. This used to be "supported" before, because it was
possible to simply load arbitrary binary data into the attributes, but
no longer functions on recent Ansible versions.

In order to support binary attributes, this commit introduces two new
options to both plugins:

  * `binary_attributes`, a list of attribute names which will be
    considered as being binary,
  * `honor_binary_option`, a flag which is true by default and will
    handle all attributes that include the binary option (see RFC 4522)
    as binary automatically.

When an attribute is determined to be binary through either of these
means, the plugin will assume that the attribute's value is in fact
base64-encoded. It will proceed to decode it and handle it accordingly.

While changes to `ldap_entry` are pretty straightforward, more work was
required on `ldap_attrs`.

  * First, because both `present` and `absent` state require checking
    the attribute's current values and normally do that using LDAP search
    queries for each value, a specific path for binary attributes was
    added that loads and caches all values for the attribute and compares
    the values in the Python code.
  * In addition, generating both the modlist and the diff output require
    re-encoding binary attributes' values into base64 so it can be
    transmitted back to Ansible.

* Various fixes on `ldap_attrs`/`ldap_entry` from PR 11558 discussion

* Rename `honor_binary_option` to `honor_binary`

* Add some general documentation about binary attributes

* Fix changelog fragment after renaming one of the new options

* Add examples of `honor_binary` and `binary_attributes`

* Add note that indicates that binary values are supported from 12.5.0+

* Fix punctuation

* Add links to RFC 4522 to `ldap_attrs` and `ldap_entry`

* Catch base64 decoding errors

* Rephrase changelog fragment

* Use f-string to format the encoding error message
2026-03-12 21:31:37 +01:00
Felix Fontein
55dae7c2a6
doas: allow to explicitly enable pipelining (#11481)
* Allow to explicitly enable pipelining.

* Add markup.
2026-03-12 21:13:02 +01:00
Alexei Znamensky
f9e583dae2
fix: remove HTTPStatus constructs introduced in Python 3.11 (#11573)
* fix: remove HTTPStatus constructs introduced in Python 3.11

* add changelog frag
2026-03-12 20:46:55 +01:00
Mariam Ahhttouche
0a2eb0a6f8 Fix uv_python module documentation 2026-03-11 14:36:21 +00:00
Mariam Ahhttouche
e774e5f0b3
Add future annotations
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-11 14:22:59 +00:00
Mariam Ahhttouche
b0555c9679
Fix uv python documentation
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-11 14:18:39 +00:00
Mariam Ahhttouche
532c92d760 Add typing in plugins/modules/uv_python.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-11 14:16:53 +00:00
Mariam Ahhttouche
281b072aed Add typing in plugins/modules/uv_python.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-11 14:16:53 +00:00
Mariam Ahhttouche
ae57b2b809 Add typing to plugins/modules/uv_python.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-11 13:58:30 +00:00
Mariam Ahhttouche
ba49bc71c1
Clean docstrings in Update plugins/modules/uv_python.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-11 13:53:12 +00:00
Felix Fontein
9b72d95452
Add missing __future__ imports (#11567)
Add missing __future__ imports.
2026-03-11 06:42:08 +01:00
Alexei Znamensky
7436c0c9ba
replace literal HTTP codes with http.HTTPStatus (#11561)
* replace literal HTTP codes with http.HTTPStatus

* add changelog frag
2026-03-10 22:03:55 +01:00
Martin Wilck
1554f23bfb
nmcli: fix idempotency issue with macvlan (#11551)
* nmcli: fix idempotency issue with macvlan

The nmcli module is not idempotent for macvlan interfaces.

Ansible running in diff mode for a case where the interface in question
already exists:

```
TASK [nm_macvlan : Check macvlan connection] *********************************************************************************
--- before
+++ after
@@ -11,5 +11,5 @@
     "ipv6.method": "disabled",
     "macvlan.mode": "2",
     "macvlan.parent": "eth0",
-    "macvlan.tap": "no"
+    "macvlan.tap": "False"
 }
```
The problem is that `macvlan.tap` isn't treated as boolean option. Fix it.

* Update changelogs/fragments/11551-fix-nmcli-idempotency-for-macvlan.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-10 21:42:37 +01:00
Mariam Ahhttouche
4cb5b0e143 Refactor uv_python code 2026-03-10 18:18:31 +00:00
Mariam Ahhttouche
f7c0bd4120 Update uv_python to log unparsed versions in debug mode 2026-03-10 17:29:39 +00:00
Mariam Ahhttouche
51153a615c
Update plugins/modules/uv_python.py documentation
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-10 15:07:00 +00:00
Mariam Ahhttouche
5341d23621
Update plugins/modules/uv_python.py documentation
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-10 15:06:17 +00:00
Mariam Ahhttouche
1e686895cf
Update plugins/modules/uv_python.py documentation
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-10 15:05:24 +00:00
Mariam Ahhttouche
cd3dc6a76f
Use ansible markup in plugins/modules/uv_python.py documentation
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-10 15:02:35 +00:00
Mariam Ahhttouche
a02743fd76
Make code in plugins/modules/uv_python.py more pythonic
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-10 15:01:47 +00:00
Mariam Ahhttouche
025cf018dc
Update plugins/modules/uv_python.py documentation
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-10 15:00:03 +00:00
Ivan Kokalovic
2f33ff1041
keycloak_authentication: fix TypeError when flow has no authenticationExecutions (#11548)
* TIAAS-12174: fix(keycloak_authentication): handle None authenticationExecutions

When a flow is defined without authenticationExecutions, module.params.get()
returns None but the key still exists in the config dict. The 'in' check
passes but iterating over None raises TypeError.

Guard the iteration with an explicit None check.

* keycloak_authentication: add changelog fragment for NoneType fix

* keycloak_authentication: update changelog fragment with PR link

* Update plugins/modules/keycloak_authentication.py

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

* Changelog polishing

---------

Co-authored-by: Ivan Kokalovic <ivan.kokalovic@example.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-10 06:48:06 +01:00
Mariam Ahhttouche
dbfd881d7b
Add typing in Update plugins/modules/uv_python.py
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-07 21:45:35 +00:00
Mariam Ahhttouche
55557c37a0 Add Python version requirement in uv_python documentation 2026-03-07 16:17:44 +00:00
Mariam Ahhttouche
6521f08c09 Update dummy variable names in uv_python module 2026-03-07 16:10:03 +00:00
Mariam Ahhttouche
fec8c1d215 Remove uneeded escape characters uv_python documentation 2026-03-07 16:10:03 +00:00
Mariam Ahhttouche
38200235ab Remove escape character from documentation in Update plugins/modules/uv_python.py
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-07 16:10:03 +00:00
Mariam Ahhttouche
1ad2630b30 Apply linguistic guidelines for plugins/modules/uv_python.py
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-07 16:10:03 +00:00
Mariam Ahhttouche
e42f9448a4 Format code with ruff 2026-03-07 16:10:03 +00:00
Mariam Ahhttouche
a21646d398 Handle case when version given is an empty string in uv_python module 2026-03-07 16:10:03 +00:00
Mariam Ahhttouche
722c9441c5 Clean uv_python documentation 2026-03-07 16:10:03 +00:00
Mariam Ahhttouche
ca02b76899 Use documentation fragment for uv_python attributes 2026-03-07 16:09:34 +00:00
Mariam Ahhttouche
2475c57cbf Format uv_python documentation using andebox 2026-03-07 16:09:34 +00:00
Roland Sommer
71f8c15d2e
Allow setting of independent custom domain for incus inventory (#11555)
Allowing the domain suffix to be appended independent of the `host_fqdn`
setting enables the inventory plugin to construct proper FQDNs if a
network has the `dns.domain` property set. Otherwise you would always
end up with something like `host01.project.local.example.net` despite
`host01.example.net` being the expected result.
2026-03-07 14:15:07 +01:00
Mariam Ahhttouche
4a4ec34145 Fix typing.Tuple is deprecated linting error 2026-03-06 12:46:50 +00:00
Mariam Ahhttouche
0f5a46c98b Update example to use quotes for major.minor example and update documentation 2026-03-05 22:05:10 +01:00