Commit Graph

3447 Commits (bb2ba14b8fde1639f1053fc0e0a52349b22deee3)

Author SHA1 Message Date
Peter Siegel bb2ba14b8f
fix: use os module to get uid and gid 2025-02-10 11:13:04 +01:00
Peter Siegel 06fb16c658
fix: format 2025-02-02 13:48:18 +01:00
Peter Siegel bb3262079b
fix: add comment about defaults 2025-02-02 13:44:21 +01:00
Peter Siegel e2d3fe7a1c
fix: display msg for PUT 2025-02-02 13:35:36 +01:00
Peter Siegel ab11857bc0
fix: format 2025-02-02 13:34:35 +01:00
Peter Siegel b2583960c0
fix: print put command 2025-02-02 11:08:39 +01:00
Peter Siegel 894c28fa28
fix: use ints for uid and gid 2025-02-02 10:39:24 +01:00
Peter Siegel bdb9ab354f
fix: ensure default values are of type str 2025-02-02 02:34:42 +01:00
Peter Siegel 478b25c636
fix: better logging 2025-02-02 02:30:09 +01:00
Peter Siegel cce1c3c099
feat: complete placeholder _get_remote_uid_gid function 2025-02-02 02:23:54 +01:00
Peter Siegel b27fdf07c7
feat: add get_remote_uid_gid placeholder function 2025-02-02 02:11:51 +01:00
Peter Siegel 4eb496c1ea
fix: add put command 2025-02-02 01:55:59 +01:00
Peter Siegel 4f097d90be
Update 9659-lxd_connection-nonroot-user.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-01 15:57:19 +01:00
Peter Siegel ad0ff7909e
fix: use underscore for module name in fragment 2025-02-01 00:39:23 +01:00
Peter Siegel eb0989d19a
doc: add changelog fragment 2025-02-01 00:37:36 +01:00
Peter Siegel e40b0e2be4
Update plugins/connection/lxd.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-31 22:45:14 +01:00
Peter Siegel 42a51c9b01
Update plugins/connection/lxd.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-31 22:44:54 +01:00
Peter Siegel 553f38ac98
Update plugins/connection/lxd.py
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-31 22:44:44 +01:00
Peter Siegel fe0add095c
fix: use -c flag with su 2025-01-31 22:21:04 +01:00
Peter Siegel 297f3c0f9a
fix: line length 2025-01-31 20:41:02 +01:00
Peter Siegel 30a6f46570
fix: ensure lxc exec comes first 2025-01-31 20:41:02 +01:00
Peter Siegel 845705665f
fix: use single quotes inside f-string 2025-01-31 20:41:02 +01:00
Peter Siegel daf5eaa20a
fix: remove ansible_ssh_user from remote_user vars 2025-01-31 20:41:02 +01:00
Peter Siegel de8272c1f1
fix: add root as default remote_user 2025-01-31 20:41:02 +01:00
Peter Siegel 4a661375bb
feat: add options for setting remote user and become method 2025-01-31 20:41:02 +01:00
Peter Siegel 28fb13bdff
unset default user 2025-01-31 20:41:02 +01:00
Peter Siegel 4ebd4a6efe
fix: use build_exec_command to execute as nonroot 2025-01-31 20:41:02 +01:00
Peter Siegel bb81a7bb11
fix: show correct info for connection 2025-01-31 20:41:02 +01:00
Peter Siegel 433ed7c030
fix: add support for non-root user 2025-01-31 20:40:59 +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