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

987 commits

Author SHA1 Message Date
patchback[bot]
2d27dbd9ea
[PR #6535/ddca52ee backport][stable-6] CI: include has finally been removed in ansible-core devel (#6536)
CI: include has finally been removed in ansible-core devel (#6535)

include: → include_tasks:.
(cherry picked from commit ddca52ee15)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-19 20:45:25 +02:00
patchback[bot]
55cbccf0fc
[PR #6478/c740f89d backport][stable-6] CI: Add FreeBSD 13.2 (#6508)
CI: Add FreeBSD 13.2 (#6478)

* Add FreeBSD 13.2.

* Skip FreeBSD 13.2 for iso_extract tests.

* Fix autoremove test: m4 is no longer a dependency, or it was already installed beforehand.

* Also disable the jail tests for FreeBSD 13.2.

(cherry picked from commit c740f89df3)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-09 20:10:00 +02:00
patchback[bot]
e9e494e1ff
[PR #6387/9c112308 backport][stable-6] Fixes #5143: xfs_quota fails to initialize new project quotas (#6495)
Fixes #5143: xfs_quota fails to initialize new project quotas (#6387)

This fix ensures that in case of a project quota, the corresponding project gets initialized, if required.

Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <c.fiehe@eurodata.de>
(cherry picked from commit 9c11230824)

Co-authored-by: cfiehe <cfiehe@users.noreply.github.com>
2023-05-06 07:20:03 +02:00
patchback[bot]
3a19fbc89c
[PR #6458/d254372d backport][stable-6] puppet: fix noop parameter error (#6481)
puppet: fix noop parameter error (#6458)

* puppet: fix noop parameter error

* add changelog frag

(cherry picked from commit d254372d37)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-05-04 08:14:19 +02:00
patchback[bot]
6fd58ba388
[PR #6396/c411e125 backport][stable-6] Setup docker (#6466)
Setup docker (#6396)

* setup-docker: install and run docker inside integration test VMs

* must pip install requests to satisfy community.docker requirements

* add Ubuntu configuration to setup_docker

* Update tests/integration/targets/mssql_script/tasks/main.yml

* Update tests/integration/targets/mssql_script/tasks/main.yml

* docker_pacakges variable non-existent by default

* add setup_docker to keycloak_groups

* add setup_docker to keycloak_groups

* removed unused file tasks/nothing.yml

* add README

* add copyright notice to readme file

* Update tests/integration/targets/setup_docker/README.md

* rolled back the boilerplate disclaimer to mssql_script tasks/main.yml

(cherry picked from commit c411e12555)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-05-01 21:20:01 +02:00
patchback[bot]
49967547df
[PR #6459/24efe6b9 backport][stable-6] Make sure that plugins/module_utils/deps.py is cleaned up before every test (#6462)
Make sure that plugins/module_utils/deps.py is cleaned up before every test (#6459)

Make sure that plugins/module_utils/deps.py is cleaned up before every test.

ci_complete

(cherry picked from commit 24efe6b9db)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-29 22:27:12 +02:00
patchback[bot]
1e30afa92f
[PR #6439/6e913a3b backport][stable-6] dnsimple_info: remove extraneous importorskip from test (#6446)
dnsimple_info: remove extraneous importorskip from test (#6439)

* dnsimple_info: remove extraneous importorskip from test

* remove yet another extraneous importorskip from test

(cherry picked from commit 6e913a3b28)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-04-28 10:21:00 +02:00
patchback[bot]
20a9d120aa
[PR #6403/eab39ffc backport][stable-6] iso_customize: fix integration test (#6425)
iso_customize: fix integration test (#6403)

* Fix bad parameters in integration test.

* Remove unrelated thing.

* Simply remove test.

(cherry picked from commit eab39ffc23)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-23 20:59:27 +02:00
patchback[bot]
f4a40592a1
[PR #6415/f0fcc91a backport][stable-6] zypper_repository: disable failing repository (#6424)
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.

(cherry picked from commit f0fcc91ac7)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-23 18:50:08 +02:00
patchback[bot]
3d5145e924
[PR #6414/69d7f19c backport][stable-6] Restrict jail tests for sysrc to certain FreeBSD versions (#6421)
Restrict jail tests for sysrc to certain FreeBSD versions (#6414)

Restrict jail tests for sysrc to certain FreeBSD versions.

(cherry picked from commit 69d7f19c74)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-23 18:49:58 +02:00
patchback[bot]
1ae5a2cd05
[PR #6413/0edc3e82 backport][stable-6] xfs_quota: uninstalling packages breaks tests on Alpine (#6418)
xfs_quota: uninstalling packages breaks tests on Alpine (#6413)

Uninstalling packages breaks tests on Alpine.

(cherry picked from commit 0edc3e820e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-23 18:49:49 +02:00
patchback[bot]
75aa353281
[PR #6412/68614502 backport][stable-6] Fix kdeconfig tests (#6416)
Fix kdeconfig tests (#6412)

Fix kdeconfig tests.

(cherry picked from commit 6861450243)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-23 18:49:39 +02:00
patchback[bot]
33809395ab
[PR #6256/bc228d82 backport][stable-6] Add keycloak_authz_authorization scope module (#6400)
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>
(cherry picked from commit bc228d82be)

Co-authored-by: Samuli Seppänen <samuli.seppanen@gmail.com>
2023-04-23 14:59:59 +02:00
patchback[bot]
29671cb54c
[PR #6322/1f2c7b17 backport][stable-6] Add a module to set the keycloak client scope type (#6392)
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.

(cherry picked from commit 1f2c7b1731)

Co-authored-by: Simon Pahl <simpahl@gmail.com>
2023-04-23 12:28:33 +02:00
patchback[bot]
b001e36fb3
[PR #6381/9b493d53 backport][stable-6] iptables_state: add comment sanity ignore files (#6386)
iptables_state: add comment sanity ignore files (#6381)

add comment to iptables_state line in the sanity ignore files

(cherry picked from commit 9b493d53a9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-04-20 19:25:27 +02:00
patchback[bot]
eff452e4a5
[PR #6361/4171418e backport][stable-6] snap_alias: fix regex expression when listing aliases (#6378)
snap_alias: fix regex expression when listing aliases (#6361)

* snap_alias: fix regex expression when listing aliases

* simplify regex, add changelog

(cherry picked from commit 4171418e37)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-04-20 07:27:53 +02:00
patchback[bot]
d393b16064
[PR #6303/996fc8c1 backport][stable-6] pipx: fix state=latest w/ install_deps=true (#6377)
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

(cherry picked from commit 996fc8c18e)

Co-authored-by: Paul Aurich <paul@darkrain42.org>
2023-04-20 05:21:40 +00:00
patchback[bot]
40b5967fc3
[PR #5832/ae5090d9 backport][stable-6] New modules btrfs_subvolume / btrfs_info (#6376)
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>
(cherry picked from commit ae5090d90e)

Co-authored-by: Gregory Furlong <50386272+gnfzdz@users.noreply.github.com>
2023-04-20 07:12:45 +02:00
patchback[bot]
7e7b84348b
[PR #6337/67b921e4 backport][stable-6] parted: add integration test (#6348)
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>
(cherry picked from commit 67b921e4e6)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-04-16 22:09:49 +02:00
patchback[bot]
baf552337d
[PR #6345/ee11847c backport][stable-6] Do extra docs validation; explicitly disallow semantic markup in docs (#6350)
Do extra docs validation; explicitly disallow semantic markup in docs (#6345)

* Do extra docs validation. Explicitly disallow semantic markup in docs.

* Forgot to add new requirement.

* Fix prefixes.

* Remove superfluous condition.

* TEMP - make CI fail.

* Revert "TEMP - make CI fail."

This reverts commit 14f4d6b503.

* Remove unnecessary import.

* Make sure ANSIBLE_COLLECTIONS_PATH is set.

* Make sure sanity tests from older Ansible versions don't complain.

(cherry picked from commit ee11847c7e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-16 19:45:21 +02:00
patchback[bot]
590ff351b4
[PR #6294/cb3ca05b backport][stable-6] one_vm: fix syntax error when creating VMs with a more complex template (#6342)
one_vm: fix syntax error when creating VMs with a more complex template (#6294)

* one_vm: fix syntax error when creating VMs with a more complex template

with more complex templates that make use of quoted strings the new
"render" method fails to produce a template that is accepted by
OpenNebula.  ==> escape double quotes in strings to make OpenNebula
happy again.

I also tested whether newlines need to be escaped, looks like they are
fine as they are.

Fixes #6225

* module_utils/opennebula: skip empty values in render

(cherry picked from commit cb3ca05bd1)

Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
2023-04-16 13:40:09 +02:00
patchback[bot]
a5824a2a9d
[PR #6312/29a7d24d backport][stable-6] nmcli: Add macvlan connection type support (#6341)
nmcli: Add macvlan connection type support (#6312)

* add nmcli macvlan type

* changelog

* improve docs

* macvlan params

* fix linter and improve module params

* improve_docs

* raise error if type macvlan and macvlan options not set

(cherry picked from commit 29a7d24d75)

Co-authored-by: Sergey Putko <mail@psvlan.com>
2023-04-16 13:40:00 +02:00
patchback[bot]
71975be3c1
[PR #5488/d7340945 backport][stable-6] snap: add tests for multiple commands (#6340)
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

(cherry picked from commit d7340945a4)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-04-16 13:39:52 +02:00
patchback[bot]
564f87c775
[PR #6115/f95b8ab9 backport][stable-6] Adding CheckiLORebootStatus functionality to ilo_redfish_command (#6339)
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>
(cherry picked from commit f95b8ab9cd)

Co-authored-by: TSKushal <44438079+TSKushal@users.noreply.github.com>
2023-04-16 13:39:44 +02:00
patchback[bot]
4c399f1c01
[PR #6293/ea8720f5 backport][stable-6] Add skip_tags option to Puppet module (#6327)
Add skip_tags option to Puppet module (#6293)

* Add Puppet skip_tags option

* Include changelog fragment

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ea8720f572)

Co-authored-by: Jon-Paul Lindquist <jonpaul@lindquist.me>
2023-04-13 05:09:28 +00:00
patchback[bot]
be96c33257
[PR #6313/aa77a88f backport][stable-6] pkgng: skip jail tests also on FreeBSD 12.3 (#6315)
pkgng: skip jail tests also on FreeBSD 12.3 (#6313)

Skip jail tests also on FreeBSD 12.3.

(cherry picked from commit aa77a88f4b)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-10 21:30:59 +02:00
patchback[bot]
e68b1017e3
[PR #6307/28bdf1ed backport][stable-6] xfs_quota: fix integration tests for Alpine Linux (#6310)
xfs_quota: fix integration tests for Alpine Linux (#6307)

* xfs_quota: fix integration tests for Alpine Linux

* remove skip/alpine

(cherry picked from commit 28bdf1ed74)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-04-10 07:26:44 +00:00
patchback[bot]
44e4b1d202
[PR #6308/f93a1bf5 backport][stable-6] pipx: Add support for system_site_packages (#6311)
pipx: Add support for system_site_packages (#6308)

* pipx: Add support for system_site_packages

* Add changelog fragment

(cherry picked from commit f93a1bf5ec)

Co-authored-by: Paul Aurich <paul@darkrain42.org>
2023-04-10 07:26:31 +00:00
patchback[bot]
24378fd944
[PR #6304/08f14f3e backport][stable-6] pids tests: 'some-' is not that a unique pattern. (#6306)
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.

(cherry picked from commit 08f14f3eb0)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-09 15:10:11 +02:00
patchback[bot]
c3e1715233
[PR #6299/37cddb8c backport][stable-6] snap: enable ubuntu in integration tests (#6302)
snap: enable ubuntu in integration tests (#6299)

enable ubuntu in integration tests for snap

(cherry picked from commit 37cddb8c02)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-04-08 17:28:48 +00:00
patchback[bot]
5aa2779a48
[PR #6284/7d19eca8 backport][stable-6] Update CI matrix: add stable-2.15 (#6285)
Update CI matrix: add stable-2.15 (#6284)

* Add ignore files for bumped devel version.

* Update CI matrix.

(cherry picked from commit 7d19eca8bf)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-04 10:10:25 +02:00
patchback[bot]
8ecb322816
[PR #5533/f52dd194 backport][stable-6] Add new merge_variables lookup plugin (#6249)
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>
(cherry picked from commit f52dd194f9)

Co-authored-by: Roy Lenferink <lenferinkroy@gmail.com>
2023-03-26 13:36:46 +02:00
patchback[bot]
1260a63241
[PR #6210/be7f11bf backport][stable-6] Add worklog functionality to jira module (#6248)
Add worklog functionality to jira module (#6210)

community.general#6209 Add worklog functionality to jira

(cherry picked from commit be7f11bf39)

Co-authored-by: Hugo Prudente <hugo.kenshin@gmail.com>
2023-03-26 10:21:49 +02:00
patchback[bot]
f6aad230c2
[PR #6182/99776187 backport][stable-6] Add module to manipulate KDE config files using kwriteconfig (#6247)
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>
(cherry picked from commit 997761878c)

Co-authored-by: Salvatore Mesoraca <s.mesoraca16@gmail.com>
2023-03-26 10:05:57 +02:00
patchback[bot]
4f78e7979e
[PR #6148/d4f272ba backport][stable-6] nmcli: add runner_fast_rate option (#6239)
nmcli: add runner_fast_rate option (#6148)

* add runner_fast_rate option

* unset default value for runner_fast_rate parameter

* add some commas

* Remove default in copy of argspec.

Co-authored-by: Sam Potekhin <eax24@ya.ru>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sam Potekhin <eax24@ya.ru>
(cherry picked from commit d4f272ba52)

Co-authored-by: Alex Groshev <38885591+haddystuff@users.noreply.github.com>
2023-03-26 09:46:04 +02:00
patchback[bot]
9cd3f37686
[PR #6198/6fa833fe backport][stable-6] pipx: Allow injected modules to add apps (#6238)
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>
(cherry picked from commit 6fa833feed)

Co-authored-by: Paul Aurich <paul@darkrain42.org>
2023-03-26 09:45:48 +02:00
patchback[bot]
5e1508e0df
[PR #6205/e9655239 backport][stable-6] ssh_config: add proxyjump option (#6236)
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>
(cherry picked from commit e96552396e)

Co-authored-by: Gavin Will <g@gavinwill.me.uk>
2023-03-25 23:36:56 +01:00
patchback[bot]
16a18d1456
[PR #3935/f3be0076 backport][stable-6] Add Gitlab group runners support (#6234)
Add Gitlab group runners support (#3935)

(cherry picked from commit f3be0076af)

Co-authored-by: Léo GATELLIER <26511053+lgatellier@users.noreply.github.com>
2023-03-25 08:50:28 +01:00
patchback[bot]
25464602d9
[PR #5974/ed8049a2 backport][stable-6] nmcli: add new addr_gen_mode6 options (#6228)
nmcli: add new addr_gen_mode6 options (#5974)

* nmcli: add new addr_gen_mode6 options

* Add changelog fragment.

* Update plugins/modules/nmcli.py

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

* Adjust documentation.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ed8049a220)

Co-authored-by: Jeffrey Cutter <jeffmcutter@users.noreply.github.com>
2023-03-25 08:22:25 +01:00
patchback[bot]
47b8df8019
[PR #5664/bbd68e26 backport][stable-6] redhat_subscription: require credentials only when needed (#6222)
redhat_subscription: require credentials only when needed (#5664)

The module currently has a static 'required_if' statement for its
parameters that forces any of 'username' or 'activationkey' or 'token'
in case state=present; while this is generally a good idea, it can be
an extra requirements in some cases. In particular, if the system is
already registered, there is no need for credentials -- some of the
operations of the module, such as manipulating pools, can be done
perfectly without credentials.

Hence:
- change the static 'required_if' to require credentials only when
  forcing the registration
- check for credentials manually when a registration is needed, i.e.
  on an unregistered system; the fail message is the same as the one
  shown by 'required_if'

Adapt the tests to this new situation:
- test_without_required_parameters now needs to mock an unregistered
  system
- add a new version of test_without_required_parameters to test an
  already registered system
- add a simple test case for only state=present usable on an already
  registered system
- remove the credentials from a test case for pool attachment that
  mocks an already registered system

(cherry picked from commit bbd68e26a2)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-03-22 20:56:22 +01:00
patchback[bot]
9c411586ea
[PR #6211/9f67cbbe backport][stable-6] rhsm modules: cleanly fail when not run as root (#6218)
rhsm modules: cleanly fail when not run as root (#6211)

subscription-manager on RHEL installs a symlink in /usr/bin to
console-helper (part of usermode), which triggers an interactive prompt
for root credentials when run as user. It seems that console-helper
does not handle well non-interactive contexts (e.g. without a TTY for
input), and thus it will hang waiting for input when run as user in an
Ansible task.

Since subscription-manager requires root already anyway (and it will
fail when explicitly run as user), then apply the same logic locally on
all the modules that interact with it: redhat_subscription,
rhsm_release, and rhsm_repository.

(cherry picked from commit 9f67cbbe36)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-03-22 17:57:46 +00:00
patchback[bot]
1676b09573
[PR #6122/e939cd07 backport][stable-6] redhat_subscription: use D-Bus for registration if possible (#6188)
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/

(cherry picked from commit e939cd07ef)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-03-14 23:06:41 +01:00
patchback[bot]
e9bc32528e
[PR #6175/1ddcdc63 backport][stable-6] Mark monit integration tests as unstable (#6178)
Mark monit integration tests as unstable (#6175)

Mark monit integration tests as unstable.

(cherry picked from commit 1ddcdc63ff)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-12 15:50:18 +01:00
patchback[bot]
8e84b3ef8e
[PR #6117/3862de3f backport][stable-6] Removes dependency on StormSSH (#6179)
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

(cherry picked from commit 3862de3f15)

Co-authored-by: Peter Upton <peterupton99@gmail.com>
2023-03-12 15:50:07 +01:00
patchback[bot]
944bc78360
[PR #6131/abcba9db backport][stable-6] Interfaces file spaces fix (#6169)
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>
(cherry picked from commit abcba9dbbe)

Co-authored-by: Roman Belyakovsky <roman.beliakovskii@smartly.io>
2023-03-09 20:31:08 +01:00
patchback[bot]
47514e1401
[PR #6152/11c7611c backport][stable-6] More true/false normalization (#6153)
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>
2023-03-07 07:10:10 +01:00
patchback[bot]
186b4200f6
[PR #6049/627371e2 backport][stable-6] dconf: Check for changes properly despite style of quotes used by user (#6145)
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>
2023-03-05 11:49:43 +01:00
patchback[bot]
4860c20108
[PR #6104/2dee3464 backport][stable-6] nmcli: fixed inability to change mtu on vlan connection (#6140)
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>
2023-03-04 10:21:59 +01:00
patchback[bot]
8efbd8172c
[PR #6138/3d67f518 backport][stable-6] Fix Yarn global not working without explicit executable path (#6141)
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>
2023-03-04 10:21:50 +01:00
patchback[bot]
1d39bbefd9
[PR #6119/345a6930 backport][stable-6] opkg: fix bug when update_cache=true (#6124)
opkg: fix bug when update_cache=true (#6119)

* opkg: fix bug when update_cache=true

* add changelog fragment

(cherry picked from commit 345a69304a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-03-02 07:15:28 +01:00