1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

518 commits

Author SHA1 Message Date
Felix Fontein
f0fcc91ac7
zypper_repository: disable failing repository (#6415)
* Disable failing repository from zypper_repository tests.

* Also disable repo file for >= 15.4.

* Simply disable file test for now.
2023-04-23 18:11:25 +02:00
Felix Fontein
69d7f19c74
Restrict jail tests for sysrc to certain FreeBSD versions (#6414)
Restrict jail tests for sysrc to certain FreeBSD versions.
2023-04-23 17:54:51 +02:00
Felix Fontein
0edc3e820e
xfs_quota: uninstalling packages breaks tests on Alpine (#6413)
Uninstalling packages breaks tests on Alpine.
2023-04-23 17:51:45 +02:00
Felix Fontein
6861450243
Fix kdeconfig tests (#6412)
Fix kdeconfig tests.
2023-04-23 17:51:33 +02:00
Felix Fontein
eab39ffc23
iso_customize: fix integration test (#6403)
* Fix bad parameters in integration test.

* Remove unrelated thing.

* Simply remove test.
2023-04-23 15:06:38 +02:00
Samuli Seppänen
bc228d82be
Add keycloak_authz_authorization scope module (#6256)
* Add keycloak_authz_authorization scope module

This module allows managing Keycloak client authorization scopes. The client has
to have authorization enable for this to work.

* botmeta: make mattock maintainer of keycloak_authz_authorization_scope

* botmeta: add mattock to team_keycloak

* keycloak_authz_authorization_scope: documentation and code layout fixes

* keycloak_authz_authorization_scope: do not fail on names with whitespace

* keycloak_authz_authorization_scope: use url quote method

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

* keycloak_authz_authorization_scope: style fixes to documentation

* keycloak_authz_authorization_scope: do not claim check/diff mode support

* keycloak_authz_authorization_scope: fix documentation

* keycloak_authz_authorization_scope: support check_mode and diff_mode

* keycloak_authz_authorization_scope: use more common terminology

Most keycloak modules use before_<object_type> and desired_<object_type> to
designate current and desired states of objects. Do the same for authorization
scopes.

* keycloak_authz_authorization_scope: fixes to check_mode and docs

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-23 14:07:58 +02:00
Simon Pahl
1f2c7b1731
Add a module to set the keycloak client scope type (#6322)
The module keycloak_clientscope_type allows to set the client scope
types (optional/default) either on realm or client level.
2023-04-22 22:55:46 +02:00
Alexei Znamensky
4171418e37
snap_alias: fix regex expression when listing aliases (#6361)
* snap_alias: fix regex expression when listing aliases

* simplify regex, add changelog
2023-04-20 06:56:21 +02:00
Paul Aurich
996fc8c18e
pipx: fix state=latest w/ install_deps=true (#6303)
* pipx and pipx_info: Document that modules require pipx 0.16.2.1 or above

Since their introduction, these modules rely on 'pipx list --json' to
return machine-readable output about installed pipx applications. That
functionality was introduced in 0.16.2, along with a critical bug fix
(invalid json) in 0.16.2.1.

* pipx: fix state=latest with install_deps=true

"pipx upgrade" stopped supporting the "--include-deps" option
("install_deps" in the ansible module) in pipx 0.15
(https://pypa.github.io/pipx/changelog/#01500).

The lack of support causes the pipx module to fail if attempting to use
state=latest with install_deps, since the parameter is passed to both
pipx install (fine) and pipx upgrade (fails).

* Add changelog fragment
2023-04-20 06:43:49 +02:00
Gregory Furlong
ae5090d90e
New modules btrfs_subvolume / btrfs_info (#5832)
* Initial implementation for new modules btrfs_subvolume and btrfs_info

* Improve/flesh out documentation. Add ability to target filesystem by uuid, label or device. Update tests to test targeting filesystem by each supported parameter and when only mountpoint.

* Updates for btrfs modules. Add missing copyright notices. Switch options to contains in return documentation. Update btrfs_subvolume to always use closest parent mount.

* Add maintainers for btrfs module(s) and remove unused class member cause lint failure.

* Add changelog fragment. Attempt to only run against the VMs as part of CI.

* Updates per code review. Remove changelog fragment. Switch use of map to list comprehension. Add trailing comma to last item in multi-line dicts. Clean up documentation with complete senstences for descriptions and correct/consistent use of macros.

* Improved error handling in btrfs_subvolume module: add custom exception type, favor exceptions over immediate call to fail_json and add single top level return for failure scenarios. Normalize name and snapshot_source parameters early in module execution and remove unecessary duplicate normalization throughout processing.

* Add azp/posix/3 to aliases per feedback

* Clean up automatic mounting. Prevent automount when check_mode=True. Immediately fail if a mount is identified as required and automount=True. Identify the minimal subset of subvolumes that need to be mounted instead of just finding a single common root.

* Skip btrfs_subvolume integration tests if btrfs-progs isn't successfully installed.

* Bump version_added for btrfs modules to 6.6.0. Ensure consistent trailing punctuation for module descriptions and document check_mode behavior as attribute description rather than a module level note.

* Remove unused imports from btrfs_subvolume module.

* Fix import.

* Docs improvements.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-20 06:35:29 +02:00
Felix Fontein
2bac3bb8b2 Revert "snap & snap_alias: enable integration tests on Fedora (#6360)"
This reverts commit 0524d70805.
2023-04-18 08:01:39 +02:00
Alexei Znamensky
0524d70805
snap & snap_alias: enable integration tests on Fedora (#6360) 2023-04-18 07:59:46 +02:00
Alexei Znamensky
67b921e4e6
parted: add integration test (#6337)
* parted: add integration test

* Update tests/integration/targets/parted/aliases

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

* adjusted for Alpine

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-16 15:34:53 +02:00
Alexei Znamensky
d7340945a4
snap: add tests for multiple commands (#5488)
* snap: add tests for multiple commands

* snap: add tests + become

* remove packages again for idempotency

* roll back become=true in tests
2023-04-16 13:18:34 +02:00
TSKushal
f95b8ab9cd
Adding CheckiLORebootStatus functionality to ilo_redfish_command (#6115)
* Adding CheckiLORebootStatus functionality to ilo_redfish_command

* PR fix

* Update plugins/modules/ilo_redfish_command.py

Agreed

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

* sanity fix

* Changed command to WaitforiLORebootCompletion

* PR comment fix

* Update plugins/modules/ilo_redfish_command.py

Agreed

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

* Update plugins/modules/ilo_redfish_command.py

Agreed

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

* Update plugins/modules/ilo_redfish_command.py

Agreed

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

* Update plugins/modules/ilo_redfish_command.py

Agreed

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

* Updating documentation based on PR comment

* Adding tests and updating task name in module

---------

Co-authored-by: Kushal <t-s.kushal@hpe.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-16 13:06:12 +02:00
Felix Fontein
aa77a88f4b
pkgng: skip jail tests also on FreeBSD 12.3 (#6313)
Skip jail tests also on FreeBSD 12.3.
2023-04-10 21:08:58 +02:00
Paul Aurich
f93a1bf5ec
pipx: Add support for system_site_packages (#6308)
* pipx: Add support for system_site_packages

* Add changelog fragment
2023-04-10 09:10:32 +02:00
Alexei Znamensky
28bdf1ed74
xfs_quota: fix integration tests for Alpine Linux (#6307)
* xfs_quota: fix integration tests for Alpine Linux

* remove skip/alpine
2023-04-10 08:37:48 +02:00
Felix Fontein
08f14f3eb0
pids tests: 'some-' is not that a unique pattern. (#6304)
* 'some-' is not that a unique pattern.

* Add debugging help.

* Avoid passing the name as a parameter to obtainpid.sh.
2023-04-09 14:59:37 +02:00
Alexei Znamensky
37cddb8c02
snap: enable ubuntu in integration tests (#6299)
enable ubuntu in integration tests for snap
2023-04-08 18:20:28 +02:00
Roy Lenferink
f52dd194f9
Add new merge_variables lookup plugin (#5533)
* Add new merge_variables lookup plugin

* Add changelog fragment

* Process bot feedback

* Refactor override options and add pattern_type option

* Fix unit tests

* Changed default pattern_type and simplified plugin based on feedback

* Processed feedback for merge_variables lookup plugin

* Adjust version_added.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-26 11:27:30 +02:00
Hugo Prudente
be7f11bf39
Add worklog functionality to jira module (#6210)
community.general#6209 Add worklog functionality to jira
2023-03-26 09:31:06 +02:00
Salvatore Mesoraca
997761878c
Add module to manipulate KDE config files using kwriteconfig (#6182)
* Add module to manipulate KDE config files using kwriteconfig

* Fix license issues

* Apply suggestions from code review

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

* Add smeso as kdeconfig.py maintainer

* Fix attributes fragment name

* Fix test

* Do not use shutil.chown

It isn't available on old Python versions

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-26 09:30:34 +02:00
Paul Aurich
6fa833feed
pipx: Allow injected modules to add apps (#6198)
* pipx: Allow injected modules to add apps

Add support for pipx inject's "--include-apps" parameter.

* add changelog fragment

* fix pipx test ("install_apps", not "include_apps")

* fix pipx test -- add a second invocation for install_apps

* Update changelogs/fragments/6198-pipx-inject-install-apps.yml

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

* Update plugins/modules/pipx.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-26 09:17:55 +02:00
Gavin Will
e96552396e
ssh_config: add proxyjump option (#6205)
* feat(ssh_config): proxyjump option

* feat(ssh_config: add proxyjump test

* CamelCase ProxyJump

* add changelog fragment

* Update plugins/modules/ssh_config.py

add version_added

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

* update task name to include new proxyjump option

* adding tests for proxyjump option

* fixing assert variable name

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-25 23:16:46 +01:00
Peter Upton
3862de3f15
Removes dependency on StormSSH (#6117)
* included storm config parser

* Add changelog fragment

* Fix changelog fragment

* address PR feedback

* fix license

* add required boilerplate, fix issues found in test output

* move __future__ imports

* address pr feedback

* address test output

* address pr feedback
2023-03-12 12:39:42 +01:00
Felix Fontein
1ddcdc63ff
Mark monit integration tests as unstable (#6175)
Mark monit integration tests as unstable.
2023-03-12 12:29:24 +01:00
Felix Fontein
11c7611ced
More true/false normalization (#6152)
* More true/false normalization.

* Boolean do not need explicit choices.

* One more.

* Fix type argument.
2023-03-06 23:02:24 +01:00
Sargun Vohra
3d67f51824
Fix Yarn global not working without explicit executable path (#6138)
* Fix Yarn global not working without explicit executable path

* changelog fragment

* fix formatting and add test

* oops
2023-03-04 10:09:14 +01:00
bluikko
c8a2ac3a47
sefcontext: add support for path substitutions (#5830)
* sefcontext: add path substitution support (#1193)

First commit for feedback, missing docs and tests.

* sefcontext: add documentation

* Add changelog fragment

* Documentation formatting

* Delete extra newline

* pep8 fixes

Fix indentation

* Add version_added to arg docs

* Add examples

* Don't delete non-matching path substitutions

* Add integration tests

* Delete only substitutions if such arg passed

Don't delete existing regular file context mappings if deletion of
a path substitution was requested with the presence of the
`equal` arg - delete only path substitutions in such case.

Path substitutions and regular mappings may overlap.

* Can only add args in minor releases

:(

* Cleanup before tests

* Fix deletion using substitution

Was comparing wrong var.

* Fix test checking wrong var

* Improve args documentation and examples

List the default values for selevel, seuser.
Add example for deleting path substitutions only.

* Add attributes documentation block

Not sure if should add become/delegate/async,
shouldn't those work just like that without any
specific code added for them?

* and fix indentation on attribute block

* Consistent indentation for attributes

Confusing, most plugins indent with 4 spaces.
But some use 2 like the rest of the code, so use 2.

* Add missing ref for attribute block

* Use correct c.g version in doc block

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

* Add full stop to changelog fragment

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

* Streamline documentation

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

* Support limiting deletion to setype

Deleting file context mappings may be limited by
passing setype or equal, if neither arg is passed
then delete either setype/equal mappings that match.

* Change arg name, diff mode output fix

Change arg name from equal to substitute.
Print target = subsitute in diff mode same way as
semanage does.

Also put back platform attribute, try to improve
clumsy language in the substitute arg docs.

* Delete even if arg setype not match existing

Test 5 indicates that deletion is supposed to not check that
the arg setype passed when deleting matches the setype
of the mapping to delete.
Delete any mapping that matches target, regardless of
setype arg value.

* Update arg name in tests

* Too eager replacing

Accidentally replaced seobject function names so fix them back

* 4564: Fix invalid setype in doc example

Change from httpd_git_rw_content_t which
does not exist to httpd_sys_rw_content_t

Fixes #4564

* Fix documentation attributes

Additional fragment

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

* Update version_added in docs

Bumping minor to 6.4.0 since it didn't make 6.3.0.

* Add more description to the new arg docs

Try to improve discoverability of the new feature and make it easier to understand without deep SELinux understanding.

* Update platform to Linux in documentation

* Add equal as alias for the new argument

Improve discoverability of the new feature by adding an alias to the new module argument. The argument name "equal" will be easy to find for users who are not familiar with SELinux and who just try to match to the CLI tool `semanage`.

* And add alias argument properly

Previous commit missed actually adding the alias (added to docs only).

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-02-26 14:04:57 +01:00
Yannick Ihmels
810f3b50fc
Add enabled parameter to flatpak_remote (#5926) 2023-02-25 22:40:17 +01:00
morco
7d3e6d1bb7
keycloak_group: support keycloak subgroups (#5814)
* feat(module/keycloak_group): add support for ...

... handling subgroups

* added changelog fragment and fixing sanity ...

... test issues

* more sanity fixes

* fix missing version and review issues

* added missing licence header

* fix docu

* fix line beeing too long

* replaced suboptimal string type prefixing ...

... with better subdict based approach

* fix sanity issues

* more sanity fixing

* fixed more review issues

* fix argument list too long

* why is it failing? something wrong with the docu?

* is it this line then?

* undid group attribute removing, it does not ...

... belong into this PR

* fix version_added for parents parameter

---------

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
2023-02-25 11:12:35 +01:00
Felix Fontein
24efe9ee9a
Normalize bools in tests (#5996)
* Normalize bools in tests.

* Fix typo.
2023-02-15 22:55:23 +01:00
Sargun Vohra
4c4ef80ca9
yarn: Fix state=latest not working with global=true (#5829)
* Yarn module: fix state=latest not working with global=true

* fix whitespace

* add changelog fragment

* add integration test cases

* add only tests for this PR (install+upgrade)

* fix assuming default global dir

* fix list() not working when global=true and name a package with no binary

* remove ignores

* whitespace

* Update changelogs/fragments/5829-fix-yarn-global.yml

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

* Update changelogs/fragments/5829-fix-yarn-global.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>
2023-02-13 21:54:56 +01:00
Felix Fontein
9f87989e7f
Remove unnecessary test imports (#5978)
Remove unnecessary test imports.
2023-02-12 21:05:08 +01:00
Renaud
dcc3d4f508
Add support for setenv parameters (#5883) 2023-01-30 06:30:54 +01:00
morco
6781dd1918
bugfixing keycloak user federation failing when updating default mapper simultaneously (#5750)
* fix(modules/keycloak_user_federation): fixes ...

... user federation creation failing when also updating/changing default
mappers at the same time

* add changelog fragment for pr

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
2023-01-22 17:28:33 +01:00
morco
0ca41dedce
Bugfix/keycloak userfed idempotency (#5732)
* fix(modules/keycloak_user_federation): fixes ...

... federation read call not finding already existing federations
properly because of bad parametrisation

* fix(modules/keycloak_user_federation): added ...

... new integration test for module idempotency bugfix

* added changelog fragment for pr

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
2023-01-22 17:27:57 +01:00
Felix Fontein
098912c229
stormssh tests: do not install newer cryptography (#5868)
Do not install newer cryptography.

ci_complete
2023-01-22 17:27:17 +01:00
Alexei Znamensky
1430ed000c
pipx: add testcase w/ env vars PIPX_xxxx (#5845)
* pipx: add testcase w/ env vars PIPX_xxxx

* add note to the docs about env vars

* add note to the docs about env vars

* Apply suggestions from code review

* Update plugins/modules/pipx.py

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

* Update plugins/modules/pipx_info.py

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

* break long lines into smaller ones

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-18 21:28:16 +01:00
Cédric Servais
756c0776d6
apache2_module generates false/misleading warning (#5793)
* Add parameter warn_mpm_module to control when warning are raised

* Remoe whitespace

* Add changelog fragment

* Add missing license

* Update changelogs/fragments/5793-apache2-module-npm-warnings.yml

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

* Update plugins/modules/apache2_module.py

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

* Update plugins/modules/apache2_module.py

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

* Update tests/integration/targets/apache2_module/tasks/635-apache2-misleading-warning.yml

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

* Refining integration test - previous was invalid

* False to false

* refactor assertion for suse

* Revert "refactor assertion for suse"

This reverts commit 61b86e7493.

* Excluding test on Suse

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-14 18:37:33 +01:00
Cédric Servais
6ec049734e
xml children module parameter does not exist (#5808)
* Add changelog

* Add integration tests

* Rename children to set_children

* Add PR information

* Update changelogs/fragments/5808-xml-children-parameter-does-not-exist.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-14 18:22:00 +01:00
Felix Fontein
6fb212b104
Update CI matrix (#5782)
* Update CI matrix.

* Disable RHEL 9.1 for tests where RHEL 9.0 was disabled as well.

* Skip iso_extract on FreeBSD 12.4.

* Fix cloud_init_data_facts test for Fedora 37.

* Do not try to install snap on RHEL 9.1.

* Skip pkgng jail tests on FreeBSD 12.4 as well.
2023-01-07 17:19:58 +01:00
Felix Fontein
759ca9a0ab
Remove currently unneeded generic tests from CI (#5786)
Remove currently unneeded generic tests from CI.
2023-01-07 14:08:34 +01:00
Alexei Znamensky
dc531b183d
ModuleHelper - lax handling of conflicting output (#5765)
* ModuleHelper - lax handling of conflicting output

* add changelog fragment

* only create _var when really needed

* adjust changelog

* Update changelogs/fragments/5765-mh-lax-output-conflict.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-07 10:21:13 +01:00
Alexei Znamensky
b49bf081f8
ModuleHelper - fix bug when adjusting conflicting output (#5755)
* ModuleHelper - fix bug when adjusting conflicting output

* add changelog fragment

* remove commented test code
2023-01-04 11:59:06 +01:00
Alexei Znamensky
488e828f9b
ansible_galaxy_install: use locale C tentatively, else en_US (#5680)
* ansible_galaxy_install: use locale C tentatively, else en_US

* use custom exception to signal unsupported locale

* add step to remove artefacts at the end of the test

* add step to remove artefacts at the beginning of the test

* comment out context controller

* trying with temporary dir as destination

* remove collection before test with reqs file

* ensure collections are installed in temp dir in tests + check_force

* simplified the change

* added extra condition for failing locale

* improved exception handling

* add changelog fragment
2022-12-22 06:45:07 +01:00
Felix Fontein
1f49241481
CI: add extra VMs for certain tests (#5713)
* Remove superfluous VM.

* Add extra VM group.

* More platforms, add scripts.

* [REVERT THIS] Shrink matrix to only the tests we are interested in.

* Fix some tests.

* Skip snap tests on Ubuntu VMs for now.

* Skip xfs_quota tests on Alpine VMs due to ansible.posix.mount failing.

* Revert "[REVERT THIS] Shrink matrix to only the tests we are interested in."

This reverts commit 2e98e163db.

* Stick to Alpine and Ubuntu 22.04 for now.
2022-12-21 07:31:46 +01:00
Laurence
77fde030cd
Add support for host restriction in sudoers module (#5703)
* Add support to restrict privileges by host

* Missing comma

* Making linter happy.

* Add version 6.2.0 as when sudoers host parameter added

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

* Changelog fragment for PR #5703

* Test for sudoers host-based restriction

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-20 12:49:11 +01:00
Felix Fontein
50021d6bfb
Fix pipx_info tests (#5668)
Update dependencies.
2022-12-08 22:13:41 +01:00