Commit Graph

501 Commits (stable-10)

Author SHA1 Message Date
patchback[bot] 27629b6497
[PR #9787/e8e3e5c2 backport][stable-10] Allow Xen Host and/or Xen VM names instead of their UUIDs (#9801)
Allow Xen Host and/or Xen VM names instead of their UUIDs (#9787)

* Allow using Xen Host and/or Xen VM names instead of their UUIDs for inventory

* xen_orchestra inventory plugin allow using vm and host names instead of UUID inventory

* Update changelog fragment with correct PR number

* Set missing inventory attributes in unit test

* Add version_added suggestion as per github comments

* Description update.

---------

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

Co-authored-by: rt-vnx <riordan.toms@vonex.com.au>
2025-02-24 06:18: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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] a89990ab9b
[PR #9242/88ea025d backport][stable-10] test helper improvements (#9247)
test helper improvements (#9242)

(cherry picked from commit 88ea025d12)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-14 10:44:16 +01:00
patchback[bot] 5727f1afd4
[PR #9168/82462e40 backport][stable-10] Add SR-IOV support to nmcli module (#9217)
Add SR-IOV support to nmcli module (#9168)

* Add SR-IOV support to nmcli module (#9168)

* Add SR-IOV support to nmcli module (#9168)

Fixes

* Add SR-IOV support to nmcli module (#9168)

Add test

* Update changelogs/fragments/9168-nmcli-add-sriov-parameter.yml

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

* Update plugins/modules/nmcli.py

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

* Update plugins/modules/nmcli.py

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

* Update plugins/modules/nmcli.py

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

* Populate sriov options

---------

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

Co-authored-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>
2024-12-02 20:34:49 +01:00
patchback[bot] e31999f369
[PR #9197/c38b4749 backport][stable-10] Add backup module for proxmox (#9210)
Add backup module for proxmox (#9197)

* Defined configuration variables, main backup function todo

* Defined configuration variables, main backup function todo

* wip

* permission checks and basic flow done, final request missing

* ansible-test and unit test open

* Improve documentation

* fix pep8 errors

* remove f-string and fix bugs through manual testing

* longer full example

* improve docs

* error message for fail + timeout

* move sleep location

* remove residual debugger

* include newline for better readability

* more linting errors fixed

* Include UPIDs as return value

* Output logs as comma separated value, move exception and create new abstraction for api calls

* pretter logs

* Update project to final version

* Remove accidential placeholder for integration test

* Fix missing explizit string in docstring

* Reorder imports below docstrings

* remove type annotations and fix indendation of options dict

* prettier idendation and aplhabetic ordering of options dict

* aplhabetic ordering of docstring options

* Remove the rest of type hinting as well :(

* fix version

* improve documentation

* add change detection mode

* refactor list comprehension to filter function

* remove storage availability check for node

* refactor to quotation marks

* Fix trailing newline and incorrect RV usage

* rollback filter plugin

* Remove action_group reference and add proxmox_backup to meta/runtime.yml

* Include note about missing idempotency

---------

Co-authored-by: IamLunchbox <r.grieger@hotmail.com>
(cherry picked from commit c38b474982)

Co-authored-by: IamLunchbox <56757745+IamLunchbox@users.noreply.github.com>
2024-12-02 20:33:38 +01:00
patchback[bot] 0b64fc1ee4
[PR #9179/a3bd49c0 backport][stable-10] deps module utils: unit tests + minor improvement (#9182)
deps module utils: unit tests + minor improvement (#9179)

* deps module utils: unit tests + minor improvement

* deps.clear() calls dict.clear() instead of creating new dict

* add changelog frag

(cherry picked from commit a3bd49c010)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-11-25 19:49:12 +01:00
patchback[bot] 0ff52abfdd
[PR #9171/152339a8 backport][stable-10] gio_mime: fix bug when looking for version (#9177)
gio_mime: fix bug when looking for version (#9171)

* gio_mime: fix bug when looking for version

* add changelog frag

(cherry picked from commit 152339a8f9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-11-23 15:18:34 +01:00
patchback[bot] a20ee0e816
[PR #9124/36c7e560 backport][stable-10] dnf_config_manager: use --assumeyes when changing state (#9142)
dnf_config_manager: use --assumeyes when changing state (#9124)

* dnf_config_manager: use --assumeyesm when changing state

* changelog fragment

* update tests

* format fix

* Update changelogs/fragments/9124-dnf_config_manager.yml

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

---------

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

Co-authored-by: Andrew Hyatt <4400272+ahyattdev@users.noreply.github.com>
2024-11-17 20:19:55 +00:00
Connor Newton 3d03c373ff
jenkins_node: Add set offline message (#9084)
* jenkins_node: Add set offline message

* Implement offline_message parameter for updating a Jenkins node
  offline cause reason when the state is "disabled" (offline).

* Fix enabled, disable and absent node state redirect authorization
  issues, same as was present for present.

* Add unit tests for redirect authorization workarounds.

* * Make docs clearer re: offline_message behaviour

* Exit with fail_json() instead of raising when
  create/delete/enable/disable node fail.

* * Add changelog fragment

* Update changelog fragments.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-03 11:31:32 +01:00
Alexei Znamensky c8410a924e
opkg: add return value version (#9086)
* opkg: add return value version

* add changelog frag
2024-11-02 17:49:54 +01:00
Alexei Znamensky 8a2ac4f1eb
cpanm: add return value cpanm_version (#9061)
* add return value version

* add changelog frag

* fix indentation

* fix RV name and tests

* Update plugins/modules/cpanm.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-02 17:49:41 +01:00
Alexei Znamensky e63c2f54cf
gio_mime: add return value version (#9067)
* add return value version

* add changelog frag
2024-10-29 20:27:43 +01:00
Alexei Znamensky ce1b9887b1
gconftool2/gconftool2_info: add return value version (#9064)
* add return value version

* add changelog frag
2024-10-27 09:36:52 +01:00
Alexei Znamensky 107df41d9c
django_command/django_check/django_createcachetable: add return value version (#9063)
* add return value version

* add changelog frag

* reformat yaml
2024-10-27 09:36:38 +01:00
lewismiddleton 5b3b7a1fb1
github_app_access_token: add support for private key fact (#8989)
* github_app_access_token: add support for private key fact

Adds support for specifying the GitHub App private key via an ansible
fact instead of a path to a file.

This is useful when you want to generate registration tokens for a
remote host but don't want to put secrets on the host.

* Add license file

* Fix pep8 formatting

* Add changelog fragment

* Run sanity tests on changelog

* Apply suggestions from code review

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

* Add input validation check

* Add import

* Apply suggestions from code review

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

* Add error for mutually exclusive options

* Update plugins/lookup/github_app_access_token.py

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-10-21 20:53:18 +02:00
Björn Bösel 9fb686fe35
add plugin for generic keycloak component (#8826)
* add plugin for generic keycloak component

* add changelog fragment

* fix import in test

* Update plugins/modules/keycloak_component.py

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

* Update plugins/modules/keycloak_component.py

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

* Update plugins/modules/keycloak_component.py

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

* Update plugins/modules/keycloak_component.py

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

* set correct supported diff_mode

* fix line lenght

* Update docblock

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

* Update changelogs/fragments/8826-keycloak-component.yml

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

* Update plugins/modules/keycloak_component.py

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

* Update plugins/modules/keycloak_component.py

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

* update docblocks

* add entry to BOTMETA.yml

* update copyright

* Set Version number

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

* remove changelog fragment

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-10-21 20:52:28 +02:00
Connor Newton 064f76c27b
New module: Jenkins node management (#9016)
* New module: Jenkins node management

* Fix sanity errors

* (Try to) fix mock import for Python 2.7

* Remove encoding from XML tostring in hopes of appeasing py27

Default encoding is probably always good enough.

* Turns out that encoding parameter was important for python3...

It's not super obvious how to resolve in a 2 + 3 compatible way,
so branch and omit encoding for 2.

* Implement review fixes and suggestions
2024-10-19 12:51:50 +02:00
Zac 1180843e35
bitwarden_secrets_manager lookup plugin: support more current versions of BWS CLI (#9028)
* add support for getting secrets in the current version of bitwarden secrets manager

* format

* format2

* fragment

* fix formatting errors

* strip out junk before the version in cli output

* mock the --version command in the unit tests

* use LooseVersion comparison - russoz suggestion

* add blank line
2024-10-19 12:49:47 +02:00
alexander 3de4682193
krb_ticket: Create module (#8953)
* Add kutils module

* PR Fixes

* PR Fixes 2

* PR Fixes

* Fix executables

* Fix comment

* Fix functions

* PR Fix

* PR Fix 2

* Fix list name

* Fix list name 2

* Rever check_for_none func

* Rever check_for_none func 2

* Update tests

* Update tests 2

* Fix principal

* Fix cmdrunner args

* Fix multiline

* Fix backslash

* Fix tests

* Fix elif

* Fix bool arg

* Update doc

* Fix doc

* Add man reference

* Fix doc YAML-quoting

* PR Fixes

* Fix indent

* Fix version_added and name

* Fix units name

* Fix module name
2024-10-10 22:03:30 +02:00
Felix Fontein ec6496024f
Prepare 10.0.0 release (#8921)
* Bump version to 10.0.0, remove deprecated modules and plugins.

* Remove redhat module utils.

* Drop support for ansible-core 2.13 and ansible-core 2.14.
2024-10-07 23:37:44 +02:00
Tom Paine 24b74cc4b9
opennebula inventory: add VM ID and VM host to data (#8532)
* Add VM id and VM host to opennebula inventory data

##### SUMMARY
<!--- Describe the change below, including rationale and design decisions --> To enable greater use of the inventory, add the ID of the VM, and the hostname of the host the VM is running on to the inventory output

<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->

<!--- Please do not forget to include a changelog fragment:
      https://docs.ansible.com/ansible/devel/community/collection_development_process.html#creating-changelog-fragments
      No need to include one for docs-only or test-only PR, and for new plugin/module PRs.
      Read about more details in CONTRIBUTING.md.
      -->

##### ISSUE TYPE
<!--- Pick one or more below and delete the rest.
      'Test Pull Request' is for PRs that add/extend tests without code changes. -->
- Feature Pull Request

##### COMPONENT NAME
<!--- Write the SHORT NAME of the module, plugin, task or feature below. --> opennebula.py

##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here --> <!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->

<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
                "host": "foo23.host",
                "id": 1234,
```

* Create 8532-expand-opennuebula-inventory-data.yml

* Update opennebula.py

* Update changelogs/fragments/8532-expand-opennuebula-inventory-data.yml

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

* Add check for empty records and add test

* fix attribute test

* fix attribute test

* fix attribute test

* fix attribute test

* Update plugins/inventory/opennebula.py

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

* update as per guidance

* restore attribute checks

* fix attr

* fix indent

* PR Fixes

* add attribute check in case of empty variable

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Александр Бакановский <abakanovskii@astralinux.ru>
2024-10-07 22:16:29 +02:00
fgruenbauer c814fd0530
keycloak_userprofile: improve diff by deserializing fetched `kc.user.profile.config` and serializing it before sending (#8940)
* deserialize fetched `kc.user.profile.config` and serialize it before sending

* change `kc.user.profile.config` to JSON formatted string in mock `get_component` responses

* add changelog fragment
2024-10-07 22:15:45 +02:00
alexander 1d86d49688
ipa_getkeytab: Create module (#8938)
* Add ipa_getkeytab

* Parameters fix

* PR fixes

* PR fixes 2

* Fix unit tests

* Fix doc and unit tests

* Fix doc

* Fix doc 2

* Fix doc 3

* PR fixes

* PR fixes 2

* Fix name

* Fix description typo

* Fix variable names

* Update tests

* Add man reference
2024-10-07 22:12:06 +02:00
alexander d4fb6bf8a6
nmcli: conn_reload param and up/down states (#8897)
* Update nmcli module

* Update nmcli state

* Update test_nmcli

* Add CHANGELOG fragment

* PR Fixes

* Fix DOCUMENTATION block
2024-10-03 12:37:18 +00:00
Alexei Znamensky 8ef77d8664
unit test helper: big revamp (#8894)
* initial commit

* multiple changes:

- TestCaseContext fixture no longer need to autouse=True
- Helper.from_module() allows extra param to specify yaml file
- test_django_check: adjusted .py and .yaml

* set fixtures per testcase

* set fixtures per testcase

* rollback to original state

* patch_ansible_module fixture

- now it works not only in parametrized functions but also directly with args

* tests/unit/plugins/modules/helper.py

- improved encapsulation, class Helper no longer knows details about test cases
- test functions no longer parametrized, that allows using test case fixtures per test function
- renamed 'context' to 'mock'

* enable Helper.from_list(), better param name 'ansible_module'

* adjusted test fiels to new helper

* remove unnecessary .license file

* fix bracket

* fix reference name

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

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

* revert to parametrized test func instead of multiple funcs

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-09-28 08:17:36 +03:00
Felix Fontein fe18b05f08
10.0.0: remove deprecated features (#8918)
* Remove pool option from redhat_subscription.

* Remove proxmox_default_behavior option from proxmox_kvm.

* Remove the logging option from ejabberd_user.

* Remove the ack_params_state_absent option from consul.

* irc: change defaults of use_tls and validate_certs to true.

* rhsm_repository: remove states present and absent.

* Re-add 'using'.

* Fix typo.
2024-09-28 08:11:21 +03:00
Alexei Znamensky 002f137134
10.0.0: CmdRunner: remove deprecated feature (#8928)
* remove deprecated feature

* remove deprecated feature from tests as well

* Adjust the integration test

* add changelog frag
2024-09-26 12:01:36 +03:00
Eike Waldt 529af4984c
keycloak_userprofile: new module (#8651)
keycloak_userprofile: new keycloak module to manage user profiles (#8651)
2024-09-09 13:51:07 +02:00