[make] Improve module doc (#6161)
This change reorder the parameters so that we get the mandatory one at
the top, then alphabetically order the other bellow.
It also adds the returned values.
(cherry picked from commit 6d003ca7fc)
Co-authored-by: Cédric Jeanneret <39397510+cjeanner@users.noreply.github.com>
More true/false normalization (#6152)
* More true/false normalization.
* Boolean do not need explicit choices.
* One more.
* Fix type argument.
(cherry picked from commit 11c7611ced)
Co-authored-by: Felix Fontein <felix@fontein.de>
dconf: Check for changes properly despite style of quotes used by user (#6049)
dconf: parse GVariant values to check for equality whenever possible
Direct string comparisons are an inaccurate way to compare two
GVariant representations. For example, 'foo' and "foo" (including the
quote marks, which are part of the representation) are equal GVariants
but if you just do a string compare (remember, including the quotes)
they'll be interpreted.
We therefore want to use the `gi.repository` Python library to parse
GVariant representations before comparing them whenever possible.
However, we don't want to assume that this library will always be
available or require it for Ansible to function, so we use a straight
string comparison as a fallback when the library isn't available. This
may result in some false positives, i.e., Ansible thinking a value is
changing when it actually isn't, but will not result in incorrect
values being written into `dconf`.
Co-authored-by: Jonathan Kamens <jik@jik5.kamens.us>
(cherry picked from commit 627371e2d8)
Co-authored-by: Jonathan Kamens <jik@kamens.us>
Remove chrishoffman as maintainer for yarn (#6143)
Ignore chrishoffman from yarn
(cherry picked from commit 733e31c85f)
Co-authored-by: Chris Hoffman <99742+chrishoffman@users.noreply.github.com>
Fixes#6112: community.general.gitlab_runner KeyError: 'access_level' (#6130)
The fix ensures that no 'KeyError' is raised, when 'access_level' is not provided as module parameter or when 'access_level_on_creation' is false.
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <c.fiehe@eurodata.de>
(cherry picked from commit c077818c5d)
Co-authored-by: cfiehe <cfiehe@users.noreply.github.com>
nmcli: fixed inability to change mtu on vlan connection (#6104)
* tests updated
Co-authored-by: Sam Potekhin <heaveaxy@gmail.com>
(cherry picked from commit 2dee3464dd)
Co-authored-by: Sam Potekhin <24751685+heaveaxy@users.noreply.github.com>
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
(cherry picked from commit 3d67f51824)
Co-authored-by: Sargun Vohra <sargun.vohra@gmail.com>
Add 'inventory_hostname' to the jail plugin documentation (#6118)
This fixes the following warning on FreeBSD:
[WARNING]: The "jail" connection plugin has an improperly configured
remote target value, forcing "inventory_hostname" templated value
instead of the string
(cherry picked from commit 9a97bc7c11)
Co-authored-by: Giacomo Olgeni <olgeni@olgeni.com>
Documentation: yum_versionlock typo fix (#6121)
##### SUMMARY
Fixing typo in documentation, we need to use name parameter instead of package.
##### ISSUE TYPE
- Docs Pull Request
+label: docsite_pr
(cherry picked from commit c0cb7958cb)
Co-authored-by: AnatomicJC <github@open-web.fr>
Remove glitchcrab as maintainer for memset modules and module utils (#6116)
Remove glitchcrab as maintainer for memset modules and module utils.
(cherry picked from commit 03084d1133)
Co-authored-by: Felix Fontein <felix@fontein.de>
jenkins_plugin: avoid undefined variable when updates file is not downloaded (#6100)
Avoid undefined variable when updates file is not downloaded.
(cherry picked from commit e8bdec2733)
Co-authored-by: Felix Fontein <felix@fontein.de>
add persistent option for modprobe (#5424)
* add persistent option for modprobe
* add suggested changes + fix broken test
* change modprobe module path in tests due to rebase
* change persistent option type from bool to str with choices
* fix unused import
* add example with persistent option
* fix some minor issues after review
- move regexps compiling to __init__
- move AnsibleModule to build_module function and use this function in tests instead of AnsibleModule
- fix terminlogy issue in documentation
* fix unused-import
(cherry picked from commit 29f5033737)
Co-authored-by: Alex Groshev <38885591+haddystuff@users.noreply.github.com>
Add new project features to API (#5986)
* Add new project features to API
* add changelog fragment
* remove extra line from changelog
* Update changelog formatting
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 617be6e124)
Co-authored-by: Hemant Zope <42613258+zhemant@users.noreply.github.com>
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>
(cherry picked from commit c8a2ac3a47)
Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>
cloudflare_dns: Fix setting SRV records with a root level entry (#5972)
* cloudflare_dns: Fix setting SRV records with a root level entry
* cloudflare_dns: Remove the part which deletes the zone from the SRV record name
The cloudflare API accepts the record name + zone name to be sent. Removing that, will guarantee the module to be idempotent even though that line was added ~7 years ago for that specific reason: 7477fe5141
It seems the most logical explanition is that Cloudflare changed their API response somewhere over the last 7 years.
* cloudflare_dns: Update the changelog fragment
(cherry picked from commit 094dc6b69c)
Co-authored-by: Roy Lenferink <lenferinkroy@gmail.com>
stop passing loader/dataloader since it has been deprecated by ansible (#6074)
* stop passing loader/dataloader since it has been deprecated by ansible
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
* add changelog fragment
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
* explicitly pass None to keep compatibility to older Ansible versions
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
* use try/except to keep things compatible
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
* Update plugins/lookup/cartesian.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/lookup/flattened.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/lookup/flattened.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/lookup/cartesian.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/6074-loader_in_listify.yml.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b64929118e)
Co-authored-by: schurzi <github@drachen-server.de>
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>
(cherry picked from commit 7d3e6d1bb7)
Co-authored-by: morco <thegreatwiper@web.de>
github_webhook: Don't include secret in the config if it's absent (#5994)
* github_webhook: Don't include secret in the config if it's absent
* Add changelogs
* Fix indentation
* Apply suggestion to simplify the check
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: dima1206 <32818228+dima1206@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1877ef1510)
Co-authored-by: dima1206 <32818228+dima1206@users.noreply.github.com>
zfs_delegate_admin: fix: zfs allow cannot parse unknown uid/gid (#5943)
When setting allow permissions for particular users or groups
there will be circumstances when that user is not known to the
host system.
In that case the output of `zfs allow <pool/dataset>`
looks similar to this:
$ sudo zfs allow tank/test
---- Permissions on tank/test ---------------------------------------
Local+Descendent permissions:
user (unknown: 1002) hold
user zfsuser receive
The fix in this commit removes ' (unknown: '+')' from the output
leaving only the uid/gid.
This allows the current parser to continue even if the uid/gid
is not known.
This situation occurs most often when moving a zpool from one system
to another that may not have the same users/groups. Simply adding
permissions to a user/group and then deleting the user/group
from the system will cause this situation to occur.
(cherry picked from commit 53f729730b)
Co-authored-by: Phil Kauffman <philip@kauffman.me>
nmcli: Treat order as significant when comparing address lists (#6048)
* nmcli: Treat order as significant when comparing address lists
Don't sort the old and new values for ipv4.addresses and
ipv6.addresses before comparing them, because order matters in these
parameters: the first address specified is the default source address
for outbound connections.
* Changelog fragment for #6048
* Update changelogs/fragments/6048-nmcli-addres-order.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 682c6fc967)
Co-authored-by: Jonathan Kamens <jik@kamens.us>
community.general.osx_defaults: Include stderr in error messages (#6011)
* Update osx_defaults documentation examples
* Include stderr in errors from osx_defaults
* Add Changelog Fragment
* Update changelogs/fragments/6011-osx-defaults-errors.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Change format of examples
* Update plugins/modules/osx_defaults.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 92544993c0)
Co-authored-by: Joseph Shanak <josephshanak@protonmail.com>
Added support for openSUSE MicroOS (#5998)
* fix(zypper): Added condition to check for transactional-update binary to support microos
closes#5615
* style(changelog): Made zypper-change uppercase
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix(zypper): Removed check for /var/lib/misc/transactional-update.state
* feat(zypper): Aligned transactional-update checks with zypper's
* refactor(zypper): Removed dependency to psutil and made use of parsing /proc/mount
* refactor(zypper): Removed need for regex, plus small refactoring
---------
Co-authored-by: André Dörscheln <ad@itesign.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2c762c4753)
Co-authored-by: andre161292 <andre161292@users.noreply.github.com>
providerType should be defaulted for keycloak_user_federation mappers (#5863)
* feat(modules/keycloak_user_federation): mapper ...
... provider type should have a default value
* add changelog fragment
---------
Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
(cherry picked from commit 95b8afdea3)
Co-authored-by: morco <thegreatwiper@web.de>
Consolidate onepassword unit tests so that ansible-test will find them when the plugin is modified (#6075)
Consolidate onepassword unit tests so that ansible-test will find them when the plugin is modified.
(cherry picked from commit de1f0ff419)
Co-authored-by: Felix Fontein <felix@fontein.de>
* Run tests with EOL ansible-core versions in GHA (#6044)
Run tests with EOL ansible-core versions in GHA.
(cherry picked from commit b72b7d4936)
* Re-schedule cron.
Add attributes to ocapi_info (#6066)
Add attributes to ocapi_info.
(cherry picked from commit 0307fd12eb)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to some messaging modules (#5962)
Add attributes to some messaging modules.
(cherry picked from commit 51394b55a0)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to some filesystem modules (#5960)
Add attributes to some filesystem modules.
(cherry picked from commit 3b97fad577)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to aix and ibm modules (#5959)
Add attributes to aix and ibm modules.
(cherry picked from commit 5b9ee78610)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to consul, datadog, jenkins, pagerduty, rundeck, and sensu modules (#5957)
* Add attributes to consul, datadog, jenkins, pagerduty, rundeck, and sensu modules.
* Fix error.
(cherry picked from commit 1f1ae558f9)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to source control modules (#5956)
Add attributes to source control modules.
(cherry picked from commit bad4b4b086)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to manageiq, udm, utm, and webfaction modules (#5955)
Add attributes to manageiq, udm, utm, and webfaction modules.
(cherry picked from commit e944a67c18)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to some database modules (#5953)
Add attributes to some database modules.
(cherry picked from commit cc3a79bc48)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to ipa and keycloak modules (#5950)
Add attributes to ipa and keycloak modules.
(cherry picked from commit 18a6bdd6aa)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to clc, hwc, and lxd modules (#5952)
Add attributes to clc, hwc, and lxd modules.
(cherry picked from commit cc29b16536)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add attributes to scaleway and profitbricks modules (#5949)
Add attributes to scaleway and profitbricks modules.
(cherry picked from commit 50d7597ddc)
Co-authored-by: Felix Fontein <felix@fontein.de>