Commit Graph

3446 Commits (910c57aaa00243eebd19fd265942dc322808f94b)

Author SHA1 Message Date
Mark Armstrong 910c57aaa0
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)
2025-02-15 22:53:23 +13:00
Alexei Znamensky 8e324881a6
rename test helper (#9736)
* rename test helper

* update ignore lines
2025-02-15 18:26:25 +13:00
Alexei Znamensky 085bcb22a2
profitbricks: deprecation (#9733)
* profitbricks: deprecation

* add changelog frag
2025-02-13 20:17:25 +01:00
Felix Fontein ffae71a0d9 Remove comments. 2025-02-11 22:52:00 +01:00
Vladimir Botka fdd1331e4a
Implement #9650 Add parameter hooks to inventory plugin iocage (#9651)
* Add parameter hooks to inventory plugin iocage.

* Add changelog fragment.

* Update plugins/inventory/iocage.py

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

* Parameter renamed to hooks_results

* Fix DOCUMENTATION YAML 4-space indentation.

* Fix DOCUMENTATION YAML 2-space indentation.

* Update changelogs/fragments/9651-iocage-inventory-hooks.yml

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

* Add note about activated pool mountpoint.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-11 18:05:27 +01:00
Scott Seekamp 7af5e158b8
Add `FullPowerCycle` to Power commands (#9729)
* Add `FullPowerCycle` to Power commands

* Add changelog fragment

* Rename command

* Fix line length for redfish_command options
2025-02-11 18:04:51 +01:00
Felix Fontein d756aeb6ce
CI: Cleanup AZP config similarly to ansible-core did some years ago (#9722)
Cleanup AZP config similarly to ansible-core did some years ago.
2025-02-10 22:42:19 +01:00
sedrubal d5add1ed9f
ipa_host: Maintain the host certificates (#9694)
* ipa_host: Maintain the host certificates

Fix #9693

* Add changelog fragment

* Fix changelog message

* Fix changelog message again
2025-02-10 22:02:52 +01:00
Felix Fontein 4e0de41a85
onepassword_doc: fix 1Password Connect support (#9625)
Fix 1Password Connect support for onepassword_doc.
2025-02-10 21:54:51 +01:00
Vita Batrla 1f92a69992
zfs: fix multi-line value in user-defined property (#6264)
* zfs: fix multi-line value in user-defined property

* zfs: fix multi-line value in user-defined property

* Update changelogs/fragments/6264-zfs-multiline-property-value.yml

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

* Update plugins/modules/zfs.py

Co-authored-by: sam-lunt <samuel.j.lunt@gmail.com>

* rename self.properties -> self.extra_zfs_properties

---------

Co-authored-by: Vita Batrla <vita.batrla@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: sam-lunt <samuel.j.lunt@gmail.com>
2025-02-10 21:53:37 +01:00
Marcel Freundl 1beee87961
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>
2025-02-10 21:51:45 +01:00
Alexei Znamensky 165106d2bd
zfs_facts: set parameter "type" as a list (#9697)
* zfs_facts: set parameter "type" as a list

Plus minor readability improvements

* add changelog frag

* Update plugins/modules/zfs_facts.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-10 21:51:11 +01:00
Andreas Karis a842a26849
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>
2025-02-10 21:50:30 +01:00
Thibaut Decombe 75ffae43e6
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
2025-02-10 18:59:02 +01:00
Alexei Znamensky 191a4d8f63
xml: ensure the stream object is closed in main() (#9695)
* ensure the stream object is closed in main()

* add changelog frag

* Update plugins/modules/xml.py

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

* Update plugins/modules/xml.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-09 14:16:51 +01:00
Felix Fontein efe0c464ff
Disable failing copr tests (#9705)
Disable failing copr tests.
2025-02-09 12:35:08 +01:00
Felix Fontein d6943c9838 Fix typo. 2025-02-09 08:10:26 +01:00
Mark Armstrong 41caa9a22c
keycloak module utils replace missing return in `get_role_composites` (#9691)
* fix: replace missing return (#9678)

* chore: add changelog fragment (#9678)

* chore: update changelog fragment (#9678)

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-08 21:39:22 +01:00
Felix Fontein 10c15d31f7
filesystem tests: reiserfsprogs is no longer available on Arch Linux (#9699)
reiserfsprogs is no longer available on Arch Linux.
2025-02-08 20:06:50 +01:00
Felix Fontein 0b4337c13d
Also disable snap_alias tests for RHEL 8.8 (#9686)
Also disable snap_alias tests for RHEL 8.8.
2025-02-04 17:23:27 +01:00
Felix Fontein 54eec2cb09
Disable snap tests on RHEL 8.8 (#9679)
Disable snap tests on RHEL 8.8.
2025-02-03 10:45:01 +01:00
Alexei Znamensky 4a31c753e7
test helper: remove magically finding the testcasemock in the test module (#9675) 2025-02-03 18:34:49 +13:00
Alexei Znamensky 7a6125b99a
test helper: improvements (#9672) 2025-02-02 21:45:52 +13:00
amPrimeSign 250dc1139c
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>
2025-02-01 19:16:54 +01:00
Alexei Znamensky c0f57b5c62
test helper: add support for check and diff modes (#9666) 2025-02-02 02:17:58 +13:00
Alexei Znamensky 439da9e6da
test helper unit tests: reformat YAML files (#9664) 2025-02-01 23:16:03 +13:00
Alexei Znamensky 4d384bd74a
test helper: fix parameter passing in creation static method (#9662) 2025-02-01 10:58:45 +01:00
Conner Crosby 5f157aac15
lvol: fix the force parameter's description (#9660) 2025-02-01 09:03:43 +01:00
valievkarim 19d0049698
cloudflare_dns: fix crash when deleting a DNS record or when updating a record with solo=true (#9649)
* cloudflare_dns: fix crash when deleting a DNS record or when updating a record with solo=true

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

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

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

* Add changelog fragment

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

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

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

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-31 10:48:37 +01:00
JL Euler 37a9413a80
proxmox: fix pubkey translation and usage in update (#9645)
* proxmox: fix: pubkey translation and usage in update

* proxmox fix: add changelog

* proxmox: fix backticks in changelog
2025-01-29 20:29:31 +01:00
Felix Fontein 8749da7756
onepassword_ssh_key: avoid inheriting from OnePassCLIv2 (#9633)
* Avoid inheriting from OnePassCLIv2.

* Add changelog fragment.
2025-01-27 07:24:14 +01:00
Felix Fontein 73b9756fd7 Fix changelog fragment classification. 2025-01-27 07:05:49 +01:00
Felix Fontein 87b6a97dae The next feature release will be 10.4.0. 2025-01-27 06:31:20 +01:00
Alexei Znamensky 03dfed4c35
pipx: use global in state=latest (#9623)
* pipx: use global in state=latest

* add changelog frag
2025-01-27 05:24:38 +01:00
raoufnezhad 96f465ddf8
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>
2025-01-26 20:55:56 +01:00
JL Euler d71ba0fae8
Proxmox module refactoring (#9225)
* proxmox: Refactor

This is a squash of the following commits for easier rebasing:

proxmox module_utils: make use of choose_first_if_multiple in get_vm

proxmox: refactor module

proxmox: add changelog

proxmox: fix deprecation message

proxmox: remove type hints

proxmox: remove spaces for keywords

proxmox: run formatter

proxmox: make compabtible with old python versions

proxmox: remove f-strings

proxmox: fix string formatting in build_volume

proxmox: revert disk size parameter to simple integer

proxmox: update changelog fragment

proxmox: fix argument spec

proxmox: fix size handling in build_volume

proxmox: fix formatting

proxmox: update changelog fragment

* proxmox: Fix changelog fragment, doc, and deprecation string formatting.

* proxmox: Fix formatting in imports

* proxmox: require one of `vmid` or `hostname`, simplify checks

* proxmox: apply check for supported features to entire module

* proxmox: move parameter conversions inside create and update functions
2025-01-26 16:06:14 +01:00
Mohammed Babelly 25a262bdcf
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>
2025-01-26 15:24:17 +01:00
Mark Armstrong af0118278b
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)
2025-01-26 15:23:39 +01:00
fgruenbauer fb4f7248c9
keycloak_client: sanitize `saml.encryption.private.key` (#9621)
* sanitize saml.encryption.private.key in module output

* add changelog fragment

* Re-categorize changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-26 13:15:06 +01:00
Alexei Znamensky cc331db43d
apache2-mod-proxy: simplified/improved string manipulation (#9614)
* apache2-mod-proxy: simplified/improved string manipulation

* add changelog frag

* Update changelogs/fragments/9614-apache2-mod-proxy-revamp7.yml

* remove redundant .keys() call

* remove unneeded str() call

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-26 12:44:59 +01:00
Luiggi33 6d5aa4ae78
allow jira transition with target id (#9602)
* allow jira transition with target id

This is needed, because jira seems to autotranslate the status name

* add changelog fragment

* add newline to changelog fragment

* format according to pep 8

* switch formatting of fragment to LF

* implement suggestions on changelog fragment

* implement changes to module based on suggestions

* add status id as a alternative to status

* implement suggestions and add correct error handling

* fix up mistakes
2025-01-26 12:44:27 +01:00
Andrew Bowen b9299e633c
proxmox_template: Add optional checksum validation (#9601)
* Adds support for checksums in Proxmox_template.

* Implemented checksum verification

* Removed unintended captilization changes

* further fixing of unintended changes

* removed misspelling

* Final adjustementsto proxmox_template.py

* fixed typo

* fixed a typo in sha512

* add changelog fragment

* fixed type in choices for checksum_algortihm

* fixed file naming error and add relevant links to changelog

* Fix all unintentional refactorings

* refactoring changes removed

* renamed the function verify_checksum to fetch_and_verify for clarity

* Adjusted additions based on feedback

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-25 10:21:20 +01:00
Alexei Znamensky 6294f0b747
pagerduty_alert: remove redundant required=false (#9618) 2025-01-24 21:42:01 +01:00
Alexei Znamensky f5cbf5acc7
apache2-mod-proxy: use deps to handle dependencies (#9612)
* apache2-mod-proxy: use deps to handle dependencies

* add changelog frag

* fix errors
2025-01-23 20:33:38 +01:00
Alexei Znamensky bf5c7f8be8
apache2-mod-proxy: better handling regexp extraction (#9609)
* apache2-mod-proxy: better handling regexp extraction

* add changelog frag
2025-01-23 20:32:59 +01:00
Alexei Znamensky a5d2e3ec80
apache2-mod-proxy: reformatted YAML blocks (#9613) 2025-01-23 23:03:51 +13:00
Alexei Znamensky a4562bced4
apache2-mod-proxy: make state option a list (#9600)
* apache2-mod-proxy: make state option a list

* add changelog frag

* Update plugins/modules/apache2_mod_proxy.py

* Update changelogs/fragments/9600-apache2-mod-proxy-revamp2.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-23 06:45:45 +01:00
Alexei Znamensky d7f067dd28
apache2-mod-proxy: receive results from fetch_url as tuple of vars (#9608)
* apache2-mod-proxy: receive results from fetch_url as tuple of vars

* add changelog frag
2025-01-23 06:45:33 +01:00
Alexei Znamensky 1c0b487b41
apache2-mod-proxy: refactor BalancerMember serialization (#9599)
* apache2-mod-proxy: refactor BalancerMember serialization

* add changelog frag
2025-01-22 20:05:12 +01:00
Alexei Znamensky f27d5e7a42
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>
2025-01-22 20:04:38 +01:00