Commit Graph

1362 Commits (5735c5a045e71731ec7af4368c230afbb08b21d8)

Author SHA1 Message Date
patchback[bot] 5735c5a045
[PR #9764/8425464c backport][stable-10] Add new systemd_info module (#9800)
Add new systemd_info module (#9764)

* add systemd_info module

* fix object results

* apply review changes

* apply module change and add doc_fragments

* removed use_unsafe_shell and doc_fragments/systemd

* fix unitname description doc

* fixed doc, replaced systemctl show syntax, added base prop result doc

* fix documentation

* fix RV values in description

* fix RV() description values

* add get_bin_path try/fail and remove list()

* fix doc, removed try block

* add Archlinux in integration test

(cherry picked from commit 8425464c0a)

Co-authored-by: Nocchia <133043574+NomakCooper@users.noreply.github.com>
2025-02-23 17:52:07 +01:00
patchback[bot] ceb051851e
[PR #9796/217a1883 backport][stable-10] locale_gen: enable tests for Arch Linux, make sure they don't even try to run on RHEL and Fedora VMs (#9798)
locale_gen: enable tests for Arch Linux, make sure they don't even try to run on RHEL and Fedora VMs (#9796)

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

(cherry picked from commit 217a18839d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-23 15:27:08 +01:00
patchback[bot] d03fdc8093
[PR #9684/961c9b7f backport][stable-10] Ssh config other options (#9794)
Ssh config other options (#9684)

* Add other_options support to ssh_config module

* Changelog fragment

* Fix missing and modified stuff

* Minor changes

* Update fragment with PR URL

* Fix PEP8 issue

* Fix idempotency issue

* Update changelogs/fragments/ssh_config_add_other_options.yml

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

* Update plugins/modules/ssh_config.py

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

* Update plugins/modules/ssh_config.py

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

* Incorporate suggestions

* Missed removing str conversion

* PEP8

* Update plugins/modules/ssh_config.py

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

* Add fail condition, fix codestyle

* Force lower case key values only

---------

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

Co-authored-by: Stephen Bradshaw <stephen.mark.bradshaw@gmail.com>
2025-02-22 09:20:31 +01:00
patchback[bot] d3650f27b0
[PR #9762/a3fd357d backport][stable-10] Make apache2_mod_proxy work with Python 3, half-way modern Apache 2 versions, and add basic tests (#9771)
Make apache2_mod_proxy work with Python 3, half-way modern Apache 2 versions, and add basic tests (#9762)

* Move Apache 2 installation to setup role.

* Make module work with Python 3.

* Add basic tests.

* Add changelog fragment.

* Simplify change.

* Pass referer.

(cherry picked from commit a3fd357d81)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-18 20:30:09 +01:00
patchback[bot] ebb150c3f9
[PR #9728/410999df backport][stable-10] bitwarden lookup: add options to filter by collection_name and validate number of results (#9757)
bitwarden lookup: add options to filter by collection_name and validate number of results (#9728)

* feat(lookups/bitwarden): add collection_name filter

* feat(lookups/bitwarden): add result_count check

* docs(lookups/bitwarden): add changelog fragment

* Update changelogs/fragments/9728-bitwarden-collection-name-filter.yml

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* fix(lookups/bitwarden): fix result_count check for multiple terms

* fix(lookups/bitwarden): Enforce mutual exclusion of 'collection_name' and 'collection_id'

* formatting(lookups/bitwarden): remove trailing whitespace

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* formatting(lookups/bitwarden): remove trailing whitespace

---------

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

Co-authored-by: Jonas <jonas.switala@frequentis.com>
2025-02-16 12:24:57 +01:00
patchback[bot] fa846e9677
[PR #9727/910c57aa backport][stable-10] keycloak: repair integration tests by removing jinja2 templating from conditionals (#9726) (#9748)
keycloak: repair integration tests by removing jinja2 templating from conditionals (#9726) (#9727)

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

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

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

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

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

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

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

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

* docs: add changelog fragment (#9726)

* docs: repair changelog fragment yaml (#9726)

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

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

(cherry picked from commit 910c57aaa0)

Co-authored-by: Mark Armstrong <markparmstrong@gmail.com>
2025-02-15 12:31:44 +01:00
patchback[bot] e3dae0b646
[PR #9736/8e324881 backport][stable-10] rename test helper (#9745)
rename test helper (#9736)

* rename test helper

* update ignore lines

(cherry picked from commit 8e324881a6)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-15 08:25:27 +01:00
patchback[bot] da3ba1e7be
[PR #9698/1beee879 backport][stable-10] lvg: Add parameter to disable removal of extra physical volumes (#9717)
lvg: Add parameter to disable removal of extra physical volumes (#9698)

* Add parameter to disable removal of extra physical volumes

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>

* Set PR number in changelog fragment

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>

* Fix tests

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>

* Apply suggestions from code review

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

* Add comment in pvs

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>

---------

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1beee87961)

Co-authored-by: Marcel Freundl <Massl123@users.noreply.github.com>
2025-02-10 22:04:51 +01:00
patchback[bot] a784e66a2c
[PR #9658/a842a268 backport][stable-10] Update nmcli.py to support VRF commands (#9715)
Update nmcli.py to support VRF commands (#9658)

Adding VRF support and documentation to the nmcli module

Signed-off-by: Andreas Karis <ak.karis@gmail.com>
(cherry picked from commit a842a26849)

Co-authored-by: Andreas Karis <akaris@redhat.com>
2025-02-10 22:04:32 +01:00
patchback[bot] 33e980039b
[PR #9665/75ffae43 backport][stable-10] More resilient brew formulae name handling (#9714)
More resilient brew formulae name handling (#9665)

* Remove update_homebrew=False (it's the default)

* Fix handling of irregular cases (brew does lowercase normalization)

* Fix handling of tap with no public fallback

* Add changelog fragment

* Add missing cleanup step

* Fix typo

* Check re-install and re-uninstall too

(cherry picked from commit 75ffae43e6)

Co-authored-by: Thibaut Decombe <68703331+UnknownPlatypus@users.noreply.github.com>
2025-02-10 19:18:00 +01:00
patchback[bot] c2590cfcd8
[PR #9705/efe0c464 backport][stable-10] Disable failing copr tests (#9709)
Disable failing copr tests (#9705)

Disable failing copr tests.

(cherry picked from commit efe0c464ff)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-09 12:44:53 +01:00
patchback[bot] 07e4e4a782
[PR #9699/10c15d31 backport][stable-10] filesystem tests: reiserfsprogs is no longer available on Arch Linux (#9702)
filesystem tests: reiserfsprogs is no longer available on Arch Linux (#9699)

reiserfsprogs is no longer available on Arch Linux.

(cherry picked from commit 10c15d31f7)

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

Also disable snap_alias tests for RHEL 8.8.

(cherry picked from commit 0b4337c13d)

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

Disable snap tests on RHEL 8.8.

(cherry picked from commit 54eec2cb09)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-03 10:56:51 +01:00
patchback[bot] 6e48528b22
[PR #9675/4a31c753 backport][stable-10] test helper: remove magically finding the testcasemock in the test module (#9677)
test helper: remove magically finding the testcasemock in the test module (#9675)

(cherry picked from commit 4a31c753e7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-03 07:03:39 +01:00
patchback[bot] f545c300d9
[PR #9672/7a6125b9 backport][stable-10] test helper: improvements (#9673)
test helper: improvements (#9672)

(cherry picked from commit 7a6125b99a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-02 10:50:11 +01:00
patchback[bot] df496e37c0
[PR #9644/250dc113 backport][stable-10] Fb keycloak client improvement (#9671)
Fb keycloak client improvement (#9644)

* Fix for failed test

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

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

* Normalize values in config

* add changelog

* Apply suggestions from code review

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

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

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

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

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

---------

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

Co-authored-by: amPrimeSign <146177975+amPrimeSign@users.noreply.github.com>
2025-02-01 22:46:14 +01:00
patchback[bot] c35f13084d
[PR #9666/c0f57b5c backport][stable-10] test helper: add support for check and diff modes (#9669)
test helper: add support for check and diff modes (#9666)

(cherry picked from commit c0f57b5c62)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-01 18:49:35 +01:00
patchback[bot] 4d4e626f95
[PR #9664/439da9e6 backport][stable-10] test helper unit tests: reformat YAML files (#9667)
test helper unit tests: reformat YAML files (#9664)

(cherry picked from commit 439da9e6da)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-01 17:01:24 +01:00
patchback[bot] faa913d566
[PR #9176/47637cde backport][stable-10] locale_gen: add testcase for de_CH.utf8 (#9668)
locale_gen: add testcase for de_CH.utf8 (#9176)

(cherry picked from commit 47637cdec7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-01 17:00:26 +01:00
patchback[bot] 7e4a39964e
[PR #9662/4d384bd7 backport][stable-10] test helper: fix parameter passing in creation static method (#9663)
test helper: fix parameter passing in creation static method (#9662)

(cherry picked from commit 4d384bd74a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-01 15:01:57 +01:00
patchback[bot] b4e7b7cb50
[PR #9623/03dfed4c backport][stable-10] pipx: use global in state=latest (#9638)
pipx: use global in state=latest (#9623)

* pipx: use global in state=latest

* add changelog frag

(cherry picked from commit 03dfed4c35)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-01-27 05:50:41 +01:00
patchback[bot] 666db05eda
[PR #9170/bf6ae7bf backport][stable-10] pipx: add testcase for upgrade --global (#9637)
pipx: add testcase for upgrade --global (#9170)

(cherry picked from commit bf6ae7bf59)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-01-27 05:39:21 +01:00
patchback[bot] e255e5ed0c
[PR #9437/96f465dd backport][stable-10] Add module proxmox_backup_info (#9635)
Add module proxmox_backup_info  (#9437)

* Create proxmox_backup_info.py

The `proxmox_backup_info` module displays information such as backup times, VM name, VM ID, mode, backup type, and backup schedule using the Proxmox Server API.

* Create test_proxmox_backup_info.py

create test for proxmox_backup_info.py module

* Update plugins/modules/proxmox_backup_info.py

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

* check tests proxmox_backup_info.py

* check tests test_proxmox_backup_info.py

* Update check tests test_proxmox_backup_info.py

* Update check tests proxmox_backup_info.py

* Update authors proxmox_backup_info.py

* Update active maintainers for proxmox_backup_info module

* Update add proxmox_backup_info module in proxmox group

* edit timestamp to UTC test_proxmox_backup_info.py

* Update vm name or vmid to VM name or VM id proxmox_backup_info.py

* update  documentation in proxmox_backup_info.py

* Update backup_section decription in proxmox_backup_info.py

* Update plugins/modules/proxmox_backup_info.py

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

* change backup_section to backup_jobs

* change backup_section to backup_jobs

* remove whitespace in line 35 and 36

* improve descriptions

* check again proxmox_backup_info.py module

* change vmid type and some descriptions proxmox_backup_info.py

* delete comment #if ...

* solve trailing whitespace error

* Update the name of the functions

* Update proxmox_backup_info.py

* Update proxmox_backup_info.py

* Update tests/unit/plugins/modules/test_proxmox_backup_info.py

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

* Update test_proxmox_backup_info.py

* Update runtime.yml

* add proxmox_backup_schedule module in runtime.yml

* add proxmox_backup_schedule.py module in BOTMETA.yml

* remove proxmox_backup_schedule module runtime.yml

* remove proxmox_backup_schedule.py module in BOTMETA.yml

* change some id to ID proxmox_backup_info.py

* Update proxmox_backup_info.py

* remove required: falsefrom documentations

* change vimd values to str format

* add samples to output documentations

* the exact output of vimd in endpoint of proxmox resoures is like int

---------

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

Co-authored-by: raoufnezhad <72685312+raoufnezhad@users.noreply.github.com>
2025-01-26 21:39:05 +01:00
patchback[bot] da040cb412
[PR #9494/af011827 backport][stable-10] Keycloak modules retry request on authentication error, support refresh token parameter (#9631)
Keycloak modules retry request on authentication error, support refresh token parameter (#9494)

* feat: begin refactor to support refresh token in keycloak modules

* chore: add start of tests for shared token usage

* feat: progress towards supporting refresh token; token introspection not yet working [8857]

* chore: reset to main branch previous state; a different approach is needed [8857]

* feat: add request methods to keycloak class, which will be expanded with retry logic [8857]

* feat: all requests to keycloak use request methods instead of open_url [8857]

* fix: data argument is optional in keycloak request methods [8857]

* feat: add integration test for keycloak module authentication methods [8857]

* chore: refactor get token logic to separate logic using username/pass credentials [8857]

* chore: refactor token request logic further to isolate request logic [8857]

* chore: fix minor lint issues [8857]

* test: add (currently failing) test for request with invalid auth token, valid refresh token [8857]

* chore: allow realm to be provided to role module with refresh_token, without username/pass [8857]

* feat: add retry logic to requests in keycloak module utils [8857]

* chore: rename keycloak module fail_open_url method to fail_request [8857]

* chore: update all keycloak modules to support refresh token param [8857]

* chore: add refresh_token param to keycloak doc_fragments [8857]

* chore: restore dependency between auth_realm and auth_username,auth_password params [8857]

* chore: rearrange module param checks to reduce future pr size [8857]

* chore: remove extra comma [8857]

* chore: update version added for refresh token param [8857]

* chore: add changelog fragment [8857]

* chore: re-add fail_open_url to keycloak module utils for backward compatability [8857]

* fix: do not make a new request to keycloak without reauth when refresh token not provided (#8857)

* fix: only make final auth attempt if username/pass provided, and return exception on failure (#8857)

* fix: make re-auth and retry code more consistent, ensure final exceptions are thrown (#8857)

* test: fix arguments for invalid token, valid refresh token test (#8857)

* feat: catch invalid refresh token errors during re-auth attempt (#8857)

Add test to verify this behaviour works.

* test: improve test coverage, including some unhappy path tests for authentication failures (#8857)

* chore: store auth errors from token request in backwards compatible way (#8857)

* fix: ensure method is still specified for all requests (#8857)

* chore: simplify token request logic (#8857)

* chore: rename functions to request tokens using refresh token or username/password (#8857)

To emphasize their difference from the `get_token` function,
which either gets the token from the module params
*or* makes a request for it.

* doc: add docstrings for new or significantly modified functions (#8857)

* test: repair unit test following change to exception message upon key error during auth request (#8857)

(cherry picked from commit af0118278b)

Co-authored-by: Mark Armstrong <markparmstrong@gmail.com>
2025-01-26 15:43:41 +01:00
patchback[bot] 04b68c296b
[PR #9580/25a262bd backport][stable-10] Create `onepassword_ssh_key` plugin (#9632)
Create `onepassword_ssh_key` plugin (#9580)

* add 1password_ssh_key lookup

* refactor

* Delete onepassword_ssh_key.py

* Revert "Delete onepassword_ssh_key.py"

This reverts commit e17ff7e232.

* Delete onepassword_ssh_key.py

* add tests

* add test license

* cleanup

* refactor

* Apply suggestions from code review

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

* fix indentation

* fix RETURN indentation

* use get_option to get ssh_format

* linting

* update project year in copyright

* add plugin to BOTMETA.yml

* use OnePassCLIv2's get_raw and use OnePass's token

---------

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

Co-authored-by: Mohammed Babelly <mohammed@nevercode.io>
2025-01-26 15:43:32 +01:00
patchback[bot] 45f7661249
[PR #9598/f27d5e7a backport][stable-10] snap: add RV version (#9606)
snap: add RV version (#9598)

* snap: add RV version

* add chglog frag

* fix typo

* fix docs

* add missing import

* fix sanity

* more fixes

* Update plugins/modules/snap.py

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

* Update plugins/modules/snap_alias.py

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

---------

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-01-22 20:51:27 +01:00
patchback[bot] c72d8d4b56
[PR #9565/f5c1b9c7 backport][stable-10] add json_patch, json_patch_recipe and json_diff filters (#9597)
add json_patch, json_patch_recipe and json_diff filters (#9565)

* add json_patch, json_patch_recipe and json_diff filters

* fix copyright notices

* fix documentation

* fix docs, add maintainer

* fix review remarks

* add integration test

* fix docs (positional)

* add input validation

* formatting fixes

* more typing tweaks

* documentation fix

* fix review comments

* simplicfy input checking

* accept bytes and bytearray input

* add the fail_test argument

* fix docs format

* fix typing hints

* remove unneeded __future__ imports

(cherry picked from commit f5c1b9c70f)

Co-authored-by: Stanislav Meduna <stano@meduna.org>
2025-01-21 21:04:41 +01:00
patchback[bot] e9b58cfc09
[PR #9579/0de39a6f backport][stable-10] use open() as context manager (#9596)
use open() as context manager (#9579)

* use open() as context manager

* add changelog frag

(cherry picked from commit 0de39a6f47)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-01-21 21:04:28 +01:00
patchback[bot] 7a000108af
[PR #9571/d6863eae backport][stable-10] feat(nmcli): support the fail_over_mac parameter (#9594)
feat(nmcli): support the fail_over_mac parameter (#9571)

* feat(nmcli): support the fail_over_mac parameter

* add fail_over_mac to +bond.options

* update unit tests

* Update changelogs/fragments/9570-feat-nmcli-add-fail-over-mac-parameter.yml

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

* Update plugins/modules/nmcli.py

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

* change to type str and add choices according to documentation

* Update plugins/modules/nmcli.py

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

---------

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

Co-authored-by: cnfrancis <37379852+cnfrancis@users.noreply.github.com>
2025-01-21 21:04:10 +01:00
patchback[bot] add595e121
[PR #9578/bcc92e8a backport][stable-10] redhat_subscription: stop manual unsubscribing on unregistration (#9590)
redhat_subscription: stop manual unsubscribing on unregistration (#9578)

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

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

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

(cherry picked from commit bcc92e8aac)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2025-01-20 19:47:22 +01:00
patchback[bot] f104fe3a58
[PR #8424/cee62a40 backport][stable-10] Proxmox remote pct connection (#9581)
Proxmox remote pct connection (#8424)

* First Revision (squashed)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Second Revision (squashed)

* implement data_in

* Removed quot()
There is no need for quoting, exec_command gets the command already quoted with shell from Ansible

* Use shell from self._shell

* Improved error handling

* updated docs

* Use Int for Container ID

* Updated docs to include detailed description for non root usage

* Fix ansible_user var in example

* Fix become method
We need to differentiate between become method used in Proxmox and the one inside the container.

* Implement review findings
- f-Strings
- lower() when input
- yaml indent
- consistent quotes
- use to_text()
- Enhanced examples
- Ansibullbot findings

* remove ssh cache

* Ensure we delete the tempfile

* use octal mode

* Use FileLock().lock_file

* ansibullbot findings

* refactor _connect()

* Update plugins/connection/pct_remote.py

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

* Apply suggestions from code review

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

* renamed plugin to proxmox_pct_remote

* Use ansible.builtin.ping as example

* added unit tests

* fixed bugs in close()

* catch invalid host key

* test invalid host key

* Added integration test

* cleanup

* setup test via ansible

* Revised notes based on review feedback

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

* gather_facts hint in example

* Update tests/integration/targets/connection_proxmox_pct_remote/aliases

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

* Fix FreeBSD, deactivate macOS

* Test and Fix: Hang on copy with empty content

---------

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

Co-authored-by: Nils <31704359+mietzen@users.noreply.github.com>
2025-01-18 16:43:09 +01:00
patchback[bot] 6260d5f873
[PR #9555/e2d19a96 backport][stable-10] Add cpanm option --with-recommends (#9574)
Add cpanm option --with-recommends (#9555)

* Add cpanm option --with-recommands

Fix #9554

* With accepted suggestions

* Use install_recommendations for cpanm option --with-recommends

* Fix typo in changelogs/fragments/9554

recommands -> recommends

* Doc for options users have for recommands and suggests dependencies

* Add new args to the command runner.

* Add test for cpanm --with-recommends

(cherry picked from commit e2d19a968b)

Co-authored-by: Erwan Colin <zephone@protonmail.com>
2025-01-15 20:56:44 +01:00
patchback[bot] 6907ae5a5e
[PR #9539/94d5256a backport][stable-10] Fix #9538 Inventory iocage fails when DHCP is enabled (#9568)
Fix #9538  Inventory iocage fails when DHCP is enabled (#9539)

* Fix #9538  Inventory iocage fails when DHCP is enbled.

* Add changelog fragment 9539-iocage-inventory-dhcp.yml

* Keep iocage_ip4 a string.

* Rename the variable iocage_ip4 to iocage_ip4_dict in _parse_ip4.

* Update the changelog fragment.

* Rename _parse_ip4 parameter ip4_addr to ip4.

* Fix changelog frangment present tense.

* If IP is not available set iocage_ip4='-' instead of the empty string.

* Update changelogs/fragments/9539-iocage-inventory-dhcp.yml

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

---------

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

Co-authored-by: Vladimir Botka <vbotka@gmail.com>
2025-01-13 18:28:24 +01:00
patchback[bot] 2314db59c7
[PR #9546/114deae3 backport][stable-10] Fix homebrew tap name handling (#9569)
Fix homebrew tap name handling (#9546)

* Add failing test

* Use fully qualified names

* Add changelog fragment

* Remove unnecessary initial cleanup

* Fix tests/integration/targets/homebrew/tasks/formulae.yml

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

---------

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

Co-authored-by: Thibaut Decombe <68703331+UnknownPlatypus@users.noreply.github.com>
2025-01-13 18:28:13 +01:00
patchback[bot] 7542b5429b
[PR #9563/3dcac2b0 backport][stable-10] test helper: adjusted unit tests using new features (#9564)
test helper: adjusted unit tests using new features (#9563)

(cherry picked from commit 3dcac2b030)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-01-12 10:12:02 +01:00
patchback[bot] b23d011582
[PR #9551/3f7ea607 backport][stable-10] Use multiple YAML documents for inventory plugin examples (#9559)
Use multiple YAML documents for inventory plugin examples (#9551)

* Use multiple YAML documents for inventory plugin examples.

* Add ignore.txt entries.

* Delete no longer needed ignore.txt files.

* Fix typo.

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

---------

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-08 20:34:06 +01:00
patchback[bot] 8b56b6dfea
[PR #9552/bf69dc46 backport][stable-10] CI: Add Fedora 41, Alpine 3.21, RHEL 9.5, FreeBSD 14.2 to CI for devel (#9558)
CI: Add Fedora 41, Alpine 3.21, RHEL 9.5, FreeBSD 14.2 to CI for devel (#9552)

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

* Add some ignores that are likely needed.

* Try to fix/ignore various errors.

* Fix redis setup on Fedora 41.

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

(cherry picked from commit bf69dc46ff)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-08 19:32:06 +01:00
patchback[bot] f99508b307
[PR #9496/43d5d6e2 backport][stable-10] remove code handling unsupported Python versions (#9502)
remove code handling unsupported Python versions (#9496)

* remove code handling unsupported Python versions

* drop unused import

* remove no longer needed ignore lines

(cherry picked from commit 43d5d6e2ce)

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

* Let changed reflect updated permissions.

* Make pylint happy.

(cherry picked from commit 1e28302a66)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-31 10:28:58 +01:00
patchback[bot] ec9b1fc503
[PR #9238/6bb7a1cc backport][stable-10] locale_gen: fix/improvements (#9481)
locale_gen: fix/improvements (#9238)

* locale_gen: fix/improvements

* fix sanity

* add RV doc

* add integration test forcing mechanism=debian

- test is failing

* fix RETURN doc

* reformat yaml

* comment out the test for ubuntu_mode=True

* multiple changes:

- add changelog fragment
- improved docs

* normalize docs after rebasing

* Update changelogs/fragments/9131-locale-gen-rewrite.yml

* apply recommendations from review

* Update plugins/modules/locale_gen.py

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

* Update changelogs/fragments/9238-locale-gen-rewrite.yml

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

* Update plugins/modules/locale_gen.py

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

* Update plugins/modules/locale_gen.py

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

---------

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-30 22:00:27 +01:00
patchback[bot] 5467334117
[PR #9275/adb4b3c8 backport][stable-10] Add module ldap inc (#9480)
Add module ldap inc (#9275)

* Add module ldap_inc

This module adds the ‘modify-increment’ capability corresponding to the extension implemented by OpenLdap described in RFC-4525. It can be used to increment an integer attribute and read it atomically. It is an help for posix userId definition while relying only on the directory server.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/ldap_inc.py

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

Update plugins/modules/ldap_inc.py

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

Update plugins/modules/ldap_inc.py

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

Fix the check mode support

Check mode documentation fix

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

---------

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

Co-authored-by: Philippe Duveau <pduvax@gmail.com>
2024-12-30 21:53:03 +01:00
patchback[bot] 4614047132
[PR #9383/482a90e8 backport][stable-10] add support for systemd creds encrypt/decrypt (#9468)
add support for systemd creds encrypt/decrypt (#9383)

* add support for systemd creds encrypt/decrypt

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

* add __metaclass__

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

* Python 2.7 issues

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

* update version_added and ci test aliases

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

* switch to container

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

* run tests in docker as well

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

* move tasks into tasks/

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

* no need to call echo

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

* lint and add become:

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

* dont append a newline

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

* don't clean newlines

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

* only use module name

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

* clean

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

* change msg to value

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

* add return values

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

* update attributes and description

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

* Update plugins/modules/systemd_creds_decrypt.py

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

* set newline default

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

* Update plugins/modules/systemd_creds_encrypt.py

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

* Update plugins/modules/systemd_creds_encrypt.py

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

* Update plugins/modules/systemd_creds_encrypt.py

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

* update required and spelling

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

* use single backslash

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>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 482a90e8b4)

Co-authored-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
2024-12-29 21:24:39 +01:00
patchback[bot] 60ba39da58
[PR #9262/23d97fa4 backport][stable-10] Add inventory plugin iocage (#9378)
Add inventory plugin iocage (#9262)

* Add inventory plugin iocage #9261

* inventory/iocage.py BOTMETA entry added.

* Remove missing methods from the test.

* Avoid shell mode.

* Parameter host is optional default=localhost

* Fix AnsibleError calls.

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* iocage_data removed. Not necessarily defined at this point.

* Description mentions that remote hosts are contacted via SSH.

* test inventory iocage

* Create get_jails and get_properties in iocage plugin to simplify testing.
* Update test_iocage.py
* Add fixtures iocage_*

* Update documentation.

* Update documentation.

* Update documentation.

* Fix localhost environment.

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

---------

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

Co-authored-by: Vladimir Botka <vbotka@gmail.com>
2024-12-25 22:00:31 +01:00
patchback[bot] a5c448d6e8
[PR #9324/6cd3f79e backport][stable-10] lookup plugins: use f-strings (#9367)
lookup plugins: use f-strings (#9324)

* lookup plugins: use f-strings

* add changelog frag

* manual change for few occurrences

* Update plugins/lookup/dependent.py

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

* adjustment from review

* no f-string for you

* Update plugins/lookup/dependent.py

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

---------

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-25 16:46:55 +01:00
patchback[bot] 92e4bd184d
[PR #9226/b429e8a2 backport][stable-10] xfconf/xfconf_info: add return value version (#9359)
xfconf/xfconf_info: add return value version (#9226)

* xfconf/xfconf_info: add return value version

* add changelog frag

* adapt test to helper improvements

* rollback copyright update

* replace tab with spaces in test yamls

(cherry picked from commit b429e8a2cf)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-24 14:05:31 +01:00
patchback[bot] 429b4b14a8
[PR #9294/d5237ee4 backport][stable-10] Add sanity test for action groups (#9343)
Add sanity test for action groups (#9294)

* Add sanity test for action groups.

* Fix interpolation.

* Fix message.

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

* Improve regex.

* Add entry for new 'keycloak' action group.

Ref: https://github.com/ansible-collections/community.general/pull/9284

---------

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-23 19:45:13 +01:00
patchback[bot] 28fed38757
[PR #9310/2adcc34d backport][stable-10] CI: Arch Linux updated to Python 3.13 (#9314)
CI: Arch Linux updated to Python 3.13 (#9310)

* Arch Linux updated to Python 3.13.

* Skip lmdb_kv lookup on Arch Linux.

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-22 22:23:33 +01:00
patchback[bot] 5c2e9e0c5b
[PR #9297/d2088ccf backport][stable-10] Polish botmeta extra sanity test and make it work without warnings on Python 3.13 (#9300)
Polish botmeta extra sanity test and make it work without warnings on Python 3.13 (#9297)

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

(cherry picked from commit d2088ccfcc)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-21 17:02:30 +01:00
patchback[bot] df5818282b
[PR #9255/9452a2c8 backport][stable-10] homebrew: fix incorrect handling of aliases (#9289)
homebrew: fix incorrect handling of aliases (#9255)

* Add failing test (See commit description)

Second assert returns this:

changed: [localhost] => changed=true
  changed_pkgs:
  - sqlite3
  msg: 'Changed: 1, Unchanged: 1'
  unchanged_pkgs:
  - sqlite

* Extract proper package_name from brew info using alisases

* Add changelog fragment

* Fix pep8

* Make sure sqlite is uninstalled beforehand

* Use `package_result is (not) changed` syntax in assertions

* Register more explicit names

* Fix handling of casks

(cherry picked from commit 9452a2c8ac)

Co-authored-by: Thibaut Decombe <68703331+UnknownPlatypus@users.noreply.github.com>
2024-12-20 23:27:15 +01:00