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

2283 commits

Author SHA1 Message Date
barloff-st
bf8f2950b4
Adding support for -p option to specify port(s) to scan (#6165)
* Adding support for `-p` option to specify port(s) to scan

* Adding changelog fragment file

* Corrected appending options

* Edit to doc section

* Correction in documentation type

* Fixed `:` use in doc breaking yaml

* Update changelogs/fragments/6165-nmap-port.yml

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

* Update plugins/inventory/nmap.py

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

* Update plugins/inventory/nmap.py

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

* Adding usage example

* Adding comment to example that was missed

* Breaking line up, was too long for sanity test 160 char limit

* Still too long since spaces are counted

* Changed type to string to work for a single entry as well as comma separated values

* Update changelogs/fragments/6165-nmap-port.yml

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

* Update plugins/inventory/nmap.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-19 13:27:10 +01:00
David Gunter
e8a7c27cab
Remove verkaufer as maintainer for yarn module (#6193) 2023-03-15 08:09:41 +01:00
Martin Helwig
1dd86bcb55
add optional use_tls parameter (#6154)
* add optional use_tls parameter

* add optional use_tls parameter

---------

Co-authored-by: Martin Helwig <prostep.helwig@extaccount.com>
2023-03-14 23:01:59 +01:00
Patrik Lundin
b97bee3fd6
openbsd_pkg: set TERM to 'dumb' in execute_command (#6149)
* openbsd_pkg: set TERM to 'dumb' in execute_command

Keeps pkg_add happy when someone running ansible is using a TERM that
the managed OpenBSD host does not know about.

Fixes #5738.

Selection of specific TERM from discussion at
https://marc.info/?l=openbsd-tech&m=167290482630534&w=2

* Add changelog fragment for openbsd_pkg TERM fix

* Update changelogs/fragments/6149-openbsd_pkg-term.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-14 23:01:06 +01:00
John Daly
df34569fad
Updating yarn.list to not fail when when warnings are emitted (#6129)
* Updating yarn.list to not fail when when warnings are emitted

* Adding changelog fragment

* Adding _process_yarn_error function

* - Adding back changes to the changelog fragment
- Fixing formatting

* Fix trailing whitespace

* Update plugins/modules/yarn.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-14 23:00:23 +01:00
Pino Toscano
e939cd07ef
redhat_subscription: use D-Bus for registration if possible (#6122)
subscription-manager currently does not have a way to get credentials
(username, password, activation keys, organization ID) in a secure way:
the existing command line parameters can be easily spotted when running
a process listing while 'subscription-manager register' runs.
There is a D-Bus service, which is used by e.g. cockpit and Anaconda to
interface with RHSM (at least for registration and common queries).

Try to perform the registration using D-Bus, in a way very similar to
the work done in convert2rhel [1] (with my help):
- try to do a simple signal test to check whether the system bus works;
  inspired by the login in the dconf module
- pass most of the options as registration options; for the few that are
  not part of the registration, execute 'subscription-manager' manually
- add quirks for differently working (or not) registration options for
  the D-Bus Register*() methods depending on the version of RHEL
- 'subscription-manager register' is used only in case the signal test
  is not working; silent fallback in case of D-Bus errors during the
  registration is not done on purpose to avoid silent fallback to a less
  secure registration

[1] https://github.com/oamg/convert2rhel/pull/540/
2023-03-14 22:52:51 +01:00
Cédric Jeanneret
a49ad340af
[make] Provide built command in the module output (#6160)
It may happen operator wants to get the built command instead of all the
parameters. This change injects a new entry in the dict output, showing
what command way actually launched.

This patch also takes the opportunity to add missing dots to some
documentation lines.
2023-03-14 20:44:08 +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
Roman Belyakovsky
abcba9dbbe
Interfaces file spaces fix (#6131)
* interfaces_file: added test case for #6120

* interfaces_file: reverted code to #fafabed

* interfaces_file: added changelog fragment

* interfaces_file: added missing licenses

* interfaces_file: improved test coverage

* interfaces_file: fixed retrieving option values

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py

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

* interfaces_file: spacing fix

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-09 20:09:13 +01:00
Felix Fontein
6b8a1cd8e6
Add macOS 13.2 to CI (#6166)
Add macOS 13.2 to CI.
2023-03-08 22:46:09 +01:00
Cédric Jeanneret
6d003ca7fc
[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.
2023-03-08 14:16:45 +01:00
Daniel Patrick
6cf674485f
memset*.py: Fixed URLError handling (#6114)
* memset.py: Added URLError exception and stderr to Response() object

* memset_*.py: Check response.status_code and response.stderr

* Added changelog fragment

* memset.py: Fixed pep8

* Renamed changelog fragment with .yml file extension
2023-03-08 07:54:36 +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
Jonathan Kamens
627371e2d8
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>
2023-03-04 20:51:50 +01:00
Chris Hoffman
733e31c85f
Remove chrishoffman as maintainer for yarn (#6143)
Ignore chrishoffman from yarn
2023-03-04 20:47:13 +01:00
cfiehe
c077818c5d
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>
2023-03-04 10:14:58 +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
Sam Potekhin
2dee3464dd
nmcli: fixed inability to change mtu on vlan connection (#6104)
* tests updated

Co-authored-by: Sam Potekhin <heaveaxy@gmail.com>
2023-03-04 10:01:52 +01:00
Giacomo Olgeni
9a97bc7c11
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
2023-03-03 22:56:24 +01:00
AnatomicJC
c0cb7958cb
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
2023-03-02 07:14:58 +01:00
Alexei Znamensky
345a69304a
opkg: fix bug when update_cache=true (#6119)
* opkg: fix bug when update_cache=true

* add changelog fragment
2023-03-02 07:01:15 +01:00
Felix Fontein
03084d1133
Remove glitchcrab as maintainer for memset modules and module utils (#6116)
Remove glitchcrab as maintainer for memset modules and module utils.
2023-03-01 21:28:29 +01:00
Reto Kupferschmid
d209466985
add xorder_discovery parameter (#6109)
* add xorder_discovery parameter

* fix regex raw string

* use dn logic from LdapGeneric

* Update documentation.

* Update changelog fragment.

* Improve if.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-02-27 20:26:01 +01:00
Felix Fontein
38adbec483 Next expected release is 6.5.0. 2023-02-27 20:05:36 +01:00
Felix Fontein
681fad92c2 Fix changelog fragment type. 2023-02-26 16:19:59 +01:00
Felix Fontein
e8bdec2733
jenkins_plugin: avoid undefined variable when updates file is not downloaded (#6100)
Avoid undefined variable when updates file is not downloaded.
2023-02-26 15:37:16 +01:00
Alex Groshev
29f5033737
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
2023-02-26 14:58:58 +01:00
Hemant Zope
617be6e124
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>
2023-02-26 14:13:22 +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
Roy Lenferink
094dc6b69c
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
2023-02-26 14:03:30 +01:00
Yannick Ihmels
810f3b50fc
Add enabled parameter to flatpak_remote (#5926) 2023-02-25 22:40:17 +01:00
Mike Raineri
3db0fcf1bd
Adding jyundt to Redfish maintainers (#6072) 2023-02-25 15:39:21 +01:00
schurzi
b64929118e
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>
2023-02-25 15:29:27 +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
dima1206
1877ef1510
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>
2023-02-25 11:03:13 +01:00
Phil Kauffman
53f729730b
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.
2023-02-25 11:02:28 +01:00
Felix Fontein
f0529dcb0e
lxd plugins and modules: fix TLS/SSL context creation (#6034)
Use correct purpose.
2023-02-25 11:01:32 +01:00
Jonathan Kamens
682c6fc967
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>
2023-02-25 11:00:43 +01:00
Joseph Shanak
92544993c0
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>
2023-02-25 11:00:07 +01:00
morco
95b8afdea3
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>
2023-02-25 10:59:18 +01:00
andre161292
2c762c4753
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>
2023-02-25 10:58:04 +01:00
Felix Fontein
de1f0ff419
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.
2023-02-25 10:57:48 +01:00
Felix Fontein
b72b7d4936
Run tests with EOL ansible-core versions in GHA (#6044)
Run tests with EOL ansible-core versions in GHA.
2023-02-24 11:32:20 +01:00
Felix Fontein
0307fd12eb
Add attributes to ocapi_info (#6066)
Add attributes to ocapi_info.
2023-02-24 11:13:27 +01:00
Felix Fontein
18a6bdd6aa
Add attributes to ipa and keycloak modules (#5950)
Add attributes to ipa and keycloak modules.
2023-02-24 09:25:31 +01:00
Felix Fontein
3ec2fde2c6
Add attributes to package manager modules (#5954)
Add attributes to package manager modules.
2023-02-24 09:25:20 +01:00
Felix Fontein
3b97fad577
Add attributes to some filesystem modules (#5960)
Add attributes to some filesystem modules.
2023-02-24 09:25:15 +01:00
Felix Fontein
51394b55a0
Add attributes to some messaging modules (#5962)
Add attributes to some messaging modules.
2023-02-24 09:24:50 +01:00
Felix Fontein
673c79f6d9
Add attributes to apache2, cobbler, dimensiondata, icinga2, lxca, pritunl, and spectrum modules (#5963)
Add attributes to apache2, cobbler, dimensiondata, icinga2, lxca, pritunl, and spectrum modules.
2023-02-24 09:24:37 +01:00