Commit Graph

3471 Commits (main)

Author SHA1 Message Date
Felix Fontein f6dae1fc4d
CI: Fix some issues pointed out by zizmor (#9250)
Fix some issues pointed out by zizmor.
2024-12-14 14:56:05 +01:00
Scott Seekamp 34e8e8e5d1
Fix VerifyBiosAttributes command on Systems with multiple entries (#9234)
* Fix verify_bios_attributes command

* Add changelog fragment

* Update changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml

Improve fragment

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-14 10:44:33 +01:00
Alexei Znamensky 88ea025d12
test helper improvements (#9242) 2024-12-14 12:06:41 +13:00
Felix Fontein 9df4ef9a9c
sysrc: add another exclusion for ezjail (#9243)
Add another exclusion.
2024-12-13 21:09:58 +00:00
snailed d7ad7c2dca
xbps: support --rootdir and --repository (#9174)
* xbps: support --rootdir and --repository

* please the robot

* rename repository arg to repositories

* skip repo flag when querying package state

* add accept_pubkey param, detect pubkey import fail

* add example for manually copying signing keys

* bugfix package removal

* fix typos

* change root param type to path

* fix "root" type, bump version_added

* lintfix
2024-12-09 19:26:53 +01:00
IamLunchbox 6f87bf2bad
Fix incorrect key lookup (#9223)
* Fix incorrect key lookup

* Create changelog fragment
2024-12-09 19:25:13 +01:00
Felix Fontein e5761bd7c7 The next feature release will be 10.2.0. 2024-12-02 21:14:04 +01:00
fgruenbauer 55d714da81
keycloak_clientscope_type: sort default and optional clientscope lists before diff (#9202)
* sort default and optional clientscope lists before diff

* add changelog fragment
2024-12-02 20:21:26 +01:00
Max Gautier a789bd128f
Add the accumulate filter (#9133)
* Add the accumulate filter

- Add myself as a maintainer for it.
- Some integration tests.

* accumulate: fix documentation and add test aliases

The aliases file was copied over from
tests/integrations/targets/filter_dict/aliases as the documentation[1]
suggests to use the same group as existing similar tests.

[1]: https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/integration-aliases.html

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

* accumulate: documentation: markup consistency with other plugins

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

* filter/accumulate: Validate input is a Sequence

Accepting arbitrary iterables might lead to surprising behavior so we
are stricter on what we accept in the filter.
Relaxing those requirements is easier than retrofitting them, in terms
of backwards compatibility.

Suggested-by: Felix Fontein <felix@fontein.de>
Signed-off-by: Max Gautier <mg@max.gautier.name>

* filter/accumulate: Document the behavior with a string

Signed-off-by: Max Gautier <mg@max.gautier.name>

---------

Signed-off-by: Max Gautier <mg@max.gautier.name>
2024-12-02 20:20:13 +01:00
Alexei Znamensky d826dd1c88
opkg: deprecate value "" for force (#9172)
* opkg: deprecate value "" for force

* fix sanity plus wording

* add comments for future removal

* add changelog frag
2024-12-02 20:19:36 +01:00
ONODERA Masaru 34010a788a
Add dynamicforward option (#9192)
* Add dynamicforward option

* Add fragment

* Modify fragment
2024-12-02 20:18:56 +01:00
Ian Bishop 82462e407e
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>
2024-12-02 20:18:28 +01:00
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