Commit Graph

3433 Commits (75ffae43e6c8e80c54904ffbb24ec52809a467bc)

Author SHA1 Message Date
Alexei Znamensky 1b6c05176b
zfs modules: adjust docs (#9281)
* zfs modules: adjust docs

* Apply suggestions from code review

* fix examples indentation

* Update plugins/modules/zfs.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-21 23:42:54 +01:00
Alexei Znamensky afa5716e0b
yum_versionlock: adjust docs (#9280)
* yum_versionlock: adjust docs

* fix examples indentation
2024-12-21 17:03:23 +01:00
Alexei Znamensky 1ee244f02d
fix examples indentation (#9295) 2024-12-21 17:03:12 +01:00
Felix Fontein d2088ccfcc
Polish botmeta extra sanity test and make it work without warnings on Python 3.13 (#9297)
Polish botmeta and make it work without warnings on Python 3.13.
2024-12-21 16:49:23 +01:00
Stanislav Shamilov 2b2872f0ef
Add android sdk module (#9236)
* adds simple implementation of adding and removing android sdk packages

* adds package update

* adds simple installed packages parsing

* moves parsing logic to a separate class

* adds absent state for sdkmanager packages and setup for tests

* adds output for installing and removing packages

* removes version from Package object since it is not possible to specify version for a package while using sdkmanager

* adds 'latest' state

* adds tests

* fixes crash when sdkmanager is invoked from python with LC_ALL=C

* fixes latest state

* adds sdk_root parameter

* adds channel parameter

* simplifies regexps, removes unused named groups

* minor refactoring of sdkmanager parsing

* adds java dependency variable for different distributions

* adds RETURN documentation

* adds check for nonexisting package

* adds check for non-accepted licenses

* removes excessive methods from sdkmanager

* removes unused 'update' module parameter, packages may be updated using 'latest' state

* minor refactoring

* adds EXAMPLES doc section

* adds DOCUMENTATION section and license headers

* fixes formatting issues

* removes diff_params

* adds maintainer

* fixes sanity check issues in sdkmanager

* adds java dependency for macos and moves some tests to a separate FreeBSD configuration

* fixes dependencies setup for OSX

* fixes dependencies setup for OSX (2)

* fixes dependencies setup for OSX (3)

* Apply minor suggestions from code review

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

* applies code review suggestions

* changes force_lang from C.UTF-8 to auto in sdkmanager (as per discussion https://github.com/ansible-collections/community.general/pull/9236#discussion_r1881114326)

* Revert "changes force_lang from C.UTF-8 to auto in sdkmanager (as per discussion https://github.com/ansible-collections/community.general/pull/9236#discussion_r1881114326)"

This reverts commit 619f28dd58.

* fixes some more comments from review

* minor sanity issue fix

* uses the 'changed' test instead of checking the 'changed' attribute

* adds 'accept_licenses' parameter. Installation is now performed independently for each package specified.

* removes "Accept licenses" task from examples

* fixes docs sanity issues

* applies minor suggestions from code review

* fixes regexps. The previous version didn't match versions like "32.1.0 rc1". Also, this allows to simplify the parsing logic as there is no need to skip table headers anymore.

* renamed sdkmanager.py to android_sdkmanager.py

* applies minor suggestions from code review

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

* updates BOTMETA

* reordered BOTMETA

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-20 22:55:12 +01:00
Florian Apolloner 2682ec47d9
keycloak_authentication: Fix priority attribute during execution updates (#9263)
keycloak_authentication: Fix priority attribute during execution updates.
2024-12-20 22:54:15 +01:00
Thibaut Decombe 9452a2c8ac
homebrew: fix incorrect handling of aliases (#9255)
* Add failing test (See commit description)

Second assert returns this:

changed: [localhost] => changed=true
  changed_pkgs:
  - sqlite3
  msg: 'Changed: 1, Unchanged: 1'
  unchanged_pkgs:
  - sqlite

* Extract proper package_name from brew info using alisases

* Add changelog fragment

* Fix pep8

* Make sure sqlite is uninstalled beforehand

* Use `package_result is (not) changed` syntax in assertions

* Register more explicit names

* Fix handling of casks
2024-12-20 22:53:41 +01:00
xilmen c5855d1a58
Clean up Proxmox API token handling by stripping whitespace and forma… (#9228)
* Clean up Proxmox API token handling by stripping whitespace and formatting the token string

* Update plugins/inventory/proxmox.py

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

* Update plugins/inventory/proxmox.py

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

* Update changelogs/fragments/9228-fix-issue-header.yml

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

* Update changelogs/fragments/9228-fix-issue-header.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-20 22:52:50 +01:00
Alexei Znamensky d629a50b17
yarn: adjust docs (#9279) 2024-12-19 20:43:44 +13:00
Alexei Znamensky dcdec6ee4e
mh guide: update exception handling (#9282) 2024-12-19 20:42:45 +13:00
Felix Fontein 50b25f8c01
random_words integration tests: avoid test failure due to valid result (#9271)
Avoid test failure due to valid result.
2024-12-17 21:20:19 +01:00
Thomas Bechtold 65827bdc96
Drop myself from team_suse (#9259)
I no longer work with ansible and/or SUSE so drop me from the team.
2024-12-16 20:51:38 +01:00
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