Commit Graph

3409 Commits (af0118278b5f8ce2f587ee2f5121f43de8ba4b6b)

Author SHA1 Message Date
Alexei Znamensky ab0959480e
redfish_utils module utils: remove redundant code (#9190)
deprecate method instead
2024-12-02 20:17:44 +01:00
Thibaut Decombe fddccea940
Greatly speed up homebrew module when multiple packages are passed in the `name` key (#9181)
* Increase test coverage and assert output more strictly

* Remove unused `_current_package_is_installed_from_head`

* Remove `un/changed_count` and infer from un/changed_pkgs length

* Track `installed` & `outdated` package state once

* Validate package names beforehand

* Install packages in 1 brew call instead of N

This also has the side effect of fixing the check message so that it prints every packages that will be installed instead of only the first one.

* Uninstall packages in 1 brew call instead of N

* Link packages in 1 brew call instead of N

* Unlink packages in 1 brew call instead of N

* Upgrade packages in 1 brew call instead of N

* Remove dangling checks

* Remove `_status` method and directly return the tuple

* Add changelog fragment

* Fix invalid format string (nice catch pylint!)

* Update changelogs/fragments/9181-improve-homebrew-module-performance.yml

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

* Update brew info parsing for casks

* Update changelogs/fragments/9181-improve-homebrew-module-performance.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-02 20:17:04 +01:00
jurelou da97e220ef
iso_extract: Add password argument (#9159)
* iso_extract: Add password argument

* Update iso_extract.py

* Update iso_extract.py

* Update plugins/modules/iso_extract.py

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

* Create 9159-iso-extract_add_password.yml

* Update 9159-iso-extract_add_password.yml

* Remove default value for password

* Use password with 7z only

* Apply suggestions from code review

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

* Fix indentation

* Update plugins/modules/iso_extract.py

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

* iso_extract: add password warning

* Update plugins/modules/iso_extract.py

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

* Shorten a docs line.

* Fix formatting.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-02 20:16:30 +01:00
Stanislav Shamilov 41b6a281e1
Add decompress module (#9175)
* adds simple implementation of `decompress` module

* adds simple test, fixes src and dest arg types

* minor refactoring

* adds support for common file operations
adds integration test for gz decompressing

* makes tests parametrized to test all supported compression formats

* checks that target file exists

* writes to decompressed file now uses atomic_move

* adds idempotency for decompression

* refactoring, removed classes

* adds support for check mode

* adds check for destination file. If it exists and it is a directory, the module returns error

* refactoring, moves code to a class. Also, simplifies tests (now only tests related to the module core functionality run as parametrized, tests for idempotency and check mode run only for one format)

* adds 'remove' parameter that deletes original compressed file after decompression

* adds documentation

* fixes bug with 'remove' parameter in check mode

* makes dest argument not required. Dest filename now can be produced from the src filename

* adds dest to output

* updates the documentation, adds "RETURN" block

* fixes test

* adds support for python2

* removes some of the test files that can be generated during testing. Adds copyright header to test files

* adds maintainer

* apply minor suggestions from code review

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

* fixes code review comments (idempotency issue with non existing src, existing dest and remove=true; fixes the issue and adds test)

* refactors the module to use ModuleHelper

* refactors lzma dependency manual check to use 'deps.validate'

* minor fix

* removes registered handlers check

* minor refactoring

* adds aliases

* changes setup for tests

* tests: ignores macos and fixes tests for FreeBSD

* tests: reverts ignore for macos and fixes issue with centos7

* tests: adds liblzma dependency for python2

* tests: adds backports.lzma

* fixes bz2 decompression for python2

* tests: install xz for osx

* tests: install xz for osx (2)

* fixes code review comments

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-02 20:16:00 +01:00
Matthieu Bourgain f2dbe08d0e
Fail if Slack API response is not OK with error message (#9198)
* Fails if slack api return is not ok

* add changelog

* show all error

* add doc

* Update plugins/modules/slack.py

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

* Update changelogs/fragments/9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-02 20:11:00 +01:00
IamLunchbox c38b474982
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>
2024-12-02 20:06:08 +01:00
shios86 420f78de2f
Add the options apply_live to rpm_ostree_pkg (#9167)
rpm_ostree_pkg: add support for `apply_live` and return value `needs_reboot` #9167
2024-11-28 06:51:21 +01:00
Alexei Znamensky f828bdee22
flatpak: force locale language to be C (#9187)
* flatpak: force locale langauge to be C

* add changelog frag
2024-11-28 06:50:39 +01:00
tomcperry a863b62859
fixing broken check mode in the github_key (#9186)
* fixing datetime.strftime()

* added changelog fragment

* Update changelogs/fragments/9186-fix-broken-check-mode-in-github-key.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-28 06:42:57 +01:00
Alexei Znamensky b49830861c
scaleway_lb: simplify function logic (#9189)
* scaleway_lb: simplify function logic

* add changelog frag
2024-11-25 21:27:42 +01:00
Alexei Znamensky fa7c2df4b8
ufw: add note to docs about concurrency (#9191)
* ufw: add note to docs about concurrency

* wordsmithing
2024-11-25 21:27:21 +01:00
Sergio 3c23ce4a7b
`cloudflare_dns`: add support for `comment` and `tags` (#9132)
* `cloudflare_dns`: add support for `comment` and `tags`

* `cloudflare_dns`: add return values for `comment`/`tags` fields

* `cloudflare_dns`: fix return values samples

* `cloudflare_dns`: changelog fragment formatting

* `cloudflare_dns`: add missing `version_added`

* `cloudflare_dns`: remove explicit `required: false`

* `cloudflare_dns`: empty `comment` idempotency fix
2024-11-24 22:10:51 +01:00
Alexei Znamensky a9449ccc2e
pipx/pipx_info: add return value version (#9180)
* pipx/pipx_info: add return value version

* add changelog frag
2024-11-24 22:10:19 +01:00
Alexei Znamensky a3bd49c010
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
2024-11-24 22:09:53 +01:00
Alexei Znamensky 152339a8f9
gio_mime: fix bug when looking for version (#9171)
* gio_mime: fix bug when looking for version

* add changelog frag
2024-11-23 15:03:56 +01:00
Alexei Znamensky 47637cdec7
locale_gen: add testcase for de_CH.utf8 (#9176) 2024-11-23 10:47:22 +13:00
Alexei Znamensky bf6ae7bf59
pipx: add testcase for upgrade --global (#9170) 2024-11-22 18:36:16 +13:00
Spencer Boyer 8078a08f72
Add server-side artifact fetching to proxmox_template module (#9113)
* Add server-side artifact fetching to proxmox_template module

* Update docs, format per feedback.

* Formatting plugins/modules/proxmox_template.py

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

---------

Co-authored-by: spencer <Spencer>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-11-21 21:34:06 +01:00
Stanislav Shamilov 4b0d5cb8cf
dnf_config_manager: fix parsing for non-english locales (#9157)
* dnf_config_manager: forces locale to 'C' when the module starts

* adds changelog fragment

* Apply suggestions from code review

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-11-20 19:08:34 +01:00
Ian Richardson 5a9715874a
Update docs for github_app_access_token.py (#9152)
* Update github_app_access_token.py

updating docs - github_token missing {{ }}

* Update plugins/lookup/github_app_access_token.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-20 19:07:06 +01:00
Max Gautier 54194ccb24
modprobe: document when 'persistent' was added. (#9144)
This is based on `git tag --contains
29f5033737a7fd86349ff3daab7d7ee7db66ad00`.
2024-11-19 20:08:16 +01:00
Max Gautier dc856ab6fe
filters/dict: document the correct return value (#9145) 2024-11-18 20:42:14 +01:00
dependabot[bot] 2a66ac719a
build(deps): bump fsfe/reuse-action from 4 to 5 (#9143)
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 4 to 5.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 19:36:38 +01:00
Andrew Hyatt 36c7e56005
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>
2024-11-17 15:27:53 +01:00
Thibaut Decombe 626c0e1049
Remove redundant `HomebrewValidate.valid_package` calls in homebrew module. (#9076)
* Remove redundant `HomebrewValidate.valid_package` calls

* Add changelog fragment
2024-11-16 18:34:47 +01:00
Stanislav Shamilov 523439ab62
alternatives: add support for "family" parameter (#9096)
* alternatives: added parsing and setting of 'family' for an alternative

* alternatives: added checks for path nullability

* alternatives: added idempotence when setting alternative using family

* alternatives: added family to diff mode

* alternatives: added tests for family

* alternatives: updated documentation and examples

* alternatives: added constraints for 'path' and 'family' parameters.

in any invariants at least one of the parameters must be specified

* alternatives: added changelog fragment

* removed unnecessary check

* added version

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-16 18:34:09 +01:00
Alex Willmer 737717d015
launchd: Add plist option (#9102)
This allows the module to be used with services such as com.openssh.sshd, when
the name of the plist file doesn't match the service name.

fixes #5932
2024-11-16 18:33:35 +01:00
Tan Siewert 1f786a6171
redfish_command: add update_custom_oem options (#9123)
* redfish_command: add update_custom_oem options

The Multipart HTTP push update implementation allows OEM specific
parts that are not part of the `UpdateParameters` body part, but a
separate one. This OEM part shall start with `Oem` and is optional.
The OEM part implementation is specified in the Redfish spec point
12.6.2.2 [1].

Right now, the implementation will only support JSON as MIME Type,
although it is not limited to JSON.

[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.21.0.html#oem

Signed-off-by: Tan Siewert <tan@siewert.io>

* redfish_command: add option to set custom mime type

The implementation of using a custom MIME type will also remove the
default JSON type.
Converting the payload to JSON or any other type is up to the user.

Signed-off-by: Tan Siewert <tan@siewert.io>

* redfish_command: apply docs changes from review

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

* redfish_command: add mime type option to changelog

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

---------

Signed-off-by: Tan Siewert <tan@siewert.io>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-16 18:32:49 +01:00
dronenb 9596995ffc
homebrew_cask: add + to valid cask chars (#9128)
* fix(homebrew_cask): add + to valid cask chars

* docs(homebrew_cask): add changelog fragment

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>

* fix(homebrew_cask): add PR link to changelog fragment

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>

* fix: add period to end of changelog fragment

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>

* fix: remove blank line from changelog fragment

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>

* fix: changelog fragment formatting

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

* Update changelogs/fragments/9128-homebrew_cask-name-regex-fix.yml

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

---------

Signed-off-by: Ben Dronen <dronenb@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-16 18:31:45 +01:00
Tan Siewert bafb8aca29
redfish_utils: remove undocumented default applytime (#9114)
* redfish_utils: remove undocumented default applytime

The `@Redfish.OperationApplyTime` parameter is optional as per Redfish
spec version 1.21.0, paragraph 7.11 [1]. Some systems reject the
request rather than ignore it, causing failures that can not be
workarounded.

Removing this default resolves compatibility issues.

[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.21.0.html

Signed-off-by: Tan Siewert <tan@siewert.io>

* redfish_utils: fix changelog fragment to bugfix

Signed-off-by: Tan Siewert <tan@siewert.io>

---------

Signed-off-by: Tan Siewert <tan@siewert.io>
2024-11-11 20:04:14 +01:00
fgruenbauer d27d86ecb1
keycloak_clientscope: remove code turning attributes dict into list (#9082)
* remove code turning attributes dict into list

* add changelog fragment
2024-11-11 20:02:41 +01:00
fgruenbauer 62cb6087b5
keycloak_client: remove code that turns attributes dict into list (#9077)
* remove code that turns attributes dict into list

* add changelog fragment

* Update changelogs/fragments/9077-keycloak_client-fix-attributes-dict-turned-into-list.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-11 20:01:47 +01:00
alexander 195ae4afde
ipa_getkeytab: Fix example task (#9104)
Fix ipa_getkeytab example task
2024-11-08 23:07:58 +01:00
Felix Fontein 04c2ad18da
Add FreeBSD 13.4 to CI (#9109)
* Add FreeBSD 13.4 to CI.

* iso_extract won't work.

* pkgng: jail won't work either.
2024-11-08 23:05:35 +01:00
Felix Fontein e13d6de250 Adjust nightly CI schedules. 2024-11-04 19:23:07 +01:00
Felix Fontein 187910df51 Clean up repo; new features will go into 10.1.0. 2024-11-04 19:11:15 +01:00
Mikhail Vorontsov 886d4a6596
proxmox inventory: fix urllib3 InsecureRequestWarnings not suppressing when a token is used (#9099)
* proxmox inventory: fix urllib3 InsecureRequestWarnings not suppressing when a token is used

* proxmox inventory: add changelog fragment

* proxmox inventory: add forgotten pr number

* Update changelog.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-04 19:02:34 +01:00
bluikko 94e3635c0a
mattermost: add support for message priority (#9087)
* mattermost: add support for message priority

* Add changelog fragment

* Consistency nit in changelog

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

* Validate priority arg and doc fixes

Validate the two possible priorities with choices.
Add priority arg to one example and add version_added
field for the arg docs.

* Update changelog.

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-03 14:55:16 +01: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
witrdotnet 8fc11fe88f
keycloak_clientscope_type fix checkmode (#9093)
* fix check_mode on set keycloak client scope type (#9092)

* add changelog fragment (#9092)

* update changelog fragment (#9092)

* compact code: make one line conditions with list comprehension and any()

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

* fix syntax error: remove extra ')'

* fix changelog fragment type

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

* add issue's link in changelog fragment

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-11-03 11:25:59 +01:00
alexander cecaa1840d
one_image: Add image creation and timeout (#9075)
* Add creation one_image

* Add CHANGELOG

* PR fix docs

* Add doc line for create
2024-11-03 11:25:39 +01:00
Alexei Znamensky 2429e228a4
pipx/pipx_info: multiple fixes (#9044)
* pipx_info: factored process_list out

* pipx_info: no need to pass param to _list

* pipx_info: minor adjustment

* pipx mod utils: make_process_list parameters

* fix test for state=install_all

* fix assertions

* pipx tests: fix detection of pipx 1.7.0

* pipx: use make_process_output

* add testcase

* pipx: remove import json

* pinned in pipx list is not always there

* Update plugins/modules/pipx_info.py

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

* remove ensurepath and --user from pipx install

* add changelog frag

* Update changelogs/fragments/9044-pipx-fixes.yml

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

* Update changelogs/fragments/9044-pipx-fixes.yml

* Update changelogs/fragments/9044-pipx-fixes.yml

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

* Update changelogs/fragments/9044-pipx-fixes.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-02 17:50:24 +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
Felix Fontein 9553dd9ddf
Stop using ansible.module_utils.compat.importlib (#9085)
Stop using ansible.module_utils.compat.importlib.
2024-10-31 06:49:11 +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
Mike Raineri c71f662d55
Redfish: Added handling for trailing slashes in URIs when extracting member identifiers (#9057)
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
2024-10-29 18:45:25 +01:00
Robzz 9069f673e2
proxmox_kvm: add support for ciupgrade parameter (#9066)
* proxmox_kvm: add support for ciupgrade parameter

* add changelog fragment

* proxmox_kvm: version_added specifier for ciupgrade parameter

* proxmox_kvm: remove default value from docs for ciupgrade parameter
2024-10-28 21:13:06 +01:00
alexander 67d1b6c413
one_image/one_image_info: Fix class typo (#9056)
* Fix one_image class method args

* Add CHANGELOG fragment

* PR fix

* PR fixes
2024-10-28 21:11:39 +01:00
Scott Seekamp 3506f73da1
Add UpdateUserAccountTypes command to redfish_command (#9059)
* Add UpdateUserAccountTypes command to redfish_command

https://github.com/ansible-collections/community.general/issues/9058

* Add changelog fragment

* Update changelogs/fragments/9059-redfish_command-updateuseraccounttypes.yml

Update changelog fragment

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-10-28 21:10:48 +01:00