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

1382 commits

Author SHA1 Message Date
patchback[bot]
5c7b103936
[PR #6687/e06a0e22 backport][stable-7] keycloak_client_rolemapping.py: add support for subgroups (#6723)
keycloak_client_rolemapping.py: add support for subgroups (#6687)

* keycloak_client_rolemapping.py: add support for subgroups

* Add PR number after creating a PR to 6687-support-subgroups-for-keycloak-client-rolemapping.yml

* Update changelogs/fragments/6687-support-subgroups-for-keycloak-client-rolemapping.yml

Add missing URL

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

* Update plugins/modules/keycloak_client_rolemapping.py

Set a correct version_added (previously it was a copy-paste)

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

---------

Co-authored-by: Mikhail Putilov <Mikhail.Putilov@dimoco.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e06a0e22f7)

Co-authored-by: Mikhail Putilov <post.snowy@gmail.com>
2023-06-18 20:25:34 +02:00
patchback[bot]
bee530b6cc
[PR #6660/473e557c backport][stable-7] Onepassword lookup add service accounts (#6710)
Onepassword lookup add service accounts (#6660)

* add service account token and bypass required fields when service account token is set

* add token to base class

* add Info

* add service_account_token

* add service_account_token

* add documentation

* add service_account_token

* fix E111: indentation is not a multiple of 4

* fix lint problems

* Update plugins/lookup/onepassword_raw.py

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

* Update plugins/modules/onepassword_info.py

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

* Update plugins/lookup/onepassword.py

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

* add changelog fragment

* change type service_account_token to align to domain option

* add fragment value

* Update changelogs/fragments/6660-onepassword-lookup-service-account.yaml

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

* Update plugins/lookup/onepassword.py

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

* remove service_account_token from onepassword_info.py

* adjust V1 to raise error if service_account_token is set

* adjust V1 to raise error if service_account_token is set

* adjust V1 to raise error if service_account_token is set

* adjust if assert_logged_in

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* remove double return

* remove new line

* remove new line

* remove new line

* remove spaces

* remove new line

* remove spaces

* Update plugins/lookup/onepassword_raw.py

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

* add _check_required_params

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* remove _check_required_params

* remove spaces

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* remove code

---------

Co-authored-by: Jan Sagurna <jan.sagurna@sag-solutions.com>
Co-authored-by: Jan Sagurna <58932831+jansagurna@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sam Doran <github@samdoran.com>
(cherry picked from commit 473e557c2f)

Co-authored-by: Dominik Haßelkuss <Domi-cc@users.noreply.github.com>
2023-06-15 20:38:19 +02:00
patchback[bot]
94f23ee647
[PR #6668/f3ecf4c7 backport][stable-7] ldap: Add client certificate support (#6696)
ldap: Add client certificate support (#6668)

* Set up secure ldap server

* ldap: Added client cert options

Shamelessly copied from https://github.com/andrewshulgin/ldap_search

* Added tests for ldap client authentication

* Add changelog fragment

* Make sure the openssl commands work on older versions of openssl

* Apply suggestions from code review

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

* Remove aliases for new arguments

* Add required_together to ldap module declerations

---------

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

Co-authored-by: Gnonthgol <gnonthgol+github@gmail.com>
2023-06-15 08:42:42 +02:00
patchback[bot]
7dcbb1ade4
[PR #6648/88014635 backport][stable-7] plugins/modules/ldap_search: Add support for multipage searches (#6697)
plugins/modules/ldap_search: Add support for multipage searches (#6648)

* Add more integration tests for ldap_search

* Add new page_size option to ldap_search

* Add changelog fragment

* Apply suggestions from code review

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

* Simplify if statement to reduce negatives

* 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 8801463575)

Co-authored-by: Gnonthgol <gnonthgol+github@gmail.com>
2023-06-15 08:42:35 +02:00
patchback[bot]
adca0d5d75
[PR #6662/bb216934 backport][stable-7] csv module utils: detect unicode BOM in content (#6695)
csv module utils: detect unicode BOM in content (#6662)

* csv module utils: detect unicode BOM in content

* fix handling of py2

* fix comment

* add changelog frag

* add missing link

* simplification

(cherry picked from commit bb2169340d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-06-15 08:42:27 +02:00
patchback[bot]
41ba810463
[PR #6469/9395df1c backport][stable-7] Inspq keycloak role composites (#6693)
Inspq keycloak role composites (#6469)

* Add composites to keycloak_role module

* Add composites support for realm role in keycloak module_utils

* Clean f.write from keycloak_role module

* keycloak_role support state for realm role composites

* Add support for composites in client role for keycloak_role module

* Add changelog fragment for keycloak role composites PR

* Fix pep8 and validate-modules tests errors

* Update changelogs/fragments/6469-add-composites-support-for-keycloak-role.yml

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

I will try it

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

* Fix test_keycloak_role assertion

* Fix role composite compare before update in keycloak_role module

* Fix realm problem with update_role_composites in keycloak.py module_utils

* Add units tests for composites and client roles in keycloak_role module

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Change try in is_struct_included and add unit tests for keycloak.py module_utils

* Add integration tests for composites roles and fix bug with non master roles in keycloak_role module

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* is_struct_included refactor

---------

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

Co-authored-by: Philippe Gauthier <philippe.gauthier@inspq.qc.ca>
2023-06-15 08:42:10 +02:00
patchback[bot]
a8f5926da3
[PR #6688/032996e0 backport][stable-7] Fix composites comparison for role in is_struct_included keycloak.py … (#6690)
Fix composites comparison for role in is_struct_included keycloak.py … (#6688)

* Fix composites comparison for role in is_struct_included keycloak.py function

* Add changelog fragment and unit tests

* Update changelogs/fragments/6688-is-struct-included-bug-in-keycloak-py.yml

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

---------

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

Co-authored-by: Philippe Gauthier <philippe.gauthier@inspq.qc.ca>
2023-06-14 23:30:33 +02:00
patchback[bot]
3b24363383
[PR #6641/1f6d404d backport][stable-7] Proxmox inventory plugin: support composite variables (#6684)
Proxmox inventory plugin: support composite variables (#6641)

* Added composite var support for proxmox inventory plugin

* Composite variables support for Proxmox nodes in dynamic inventory plugin
Fixes #6640

* Composite variables support for Proxmox nodes in dynamic inventory plugin
Fixes #6640

* Added composite var support for proxmox inventory plugin

* Added composite var support for proxmox inventory plugin

* Update changelogs/fragments/6640-proxmox-composite-variables-support.yml

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

---------

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

Co-authored-by: Paul Levytskyi <25350788+levytskyip@users.noreply.github.com>
2023-06-12 22:11:09 +02:00
patchback[bot]
7b0890c98f
[PR #6673/2dbe529a backport][stable-7] rhsm_repository: deprecate "state=present" and "state=absent" (#6675)
rhsm_repository: deprecate "state=present" and "state=absent" (#6673)

"state=present" is broken, and acts like "disabled"; also, the
subscription repositories cannot be really "added" or "removed", which
is what "present" and "absent" would imply, but only enabled or
disabled. Hence, deprecate both these states, slating them for removal
in community.general 10.0.0.

(cherry picked from commit 2dbe529a90)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-06-11 12:42:43 +02:00
patchback[bot]
f986b97c9a
[PR #6669/74ffb295 backport][stable-7] rhsm_release: improve the execution of subscription-manager (#6674)
rhsm_release: improve the execution of subscription-manager (#6669)

- pass the arguments to run_command() directly as list, rather than
  joining the arguments to string, which run_command() will need to
  split again
- disable the expansions of variables, as there are none

Adapt the unit test to the different way run_command() is called,
factorizing the kwargs for run_command() so there is less repetition.

There should be no behaviour changes.

(cherry picked from commit 74ffb29573)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-06-11 12:05:42 +02:00
patchback[bot]
396b94183d
[PR #6658/42f7531f backport][stable-7] redhat_subscription: refactor of internal Rhsm class (#6667)
redhat_subscription: refactor of internal Rhsm class (#6658)

The two RegistrationBase & Rhsm classes were copied from the ones in the
shared module_utils.redhat module; that said:
- the versions here got improvements over the years
- the RegistrationBase in module_utils.redhat is used only by the RHN
  modules, which are deprecated and slated for removal

Hence, the classes here can be kept and simplified a bit:
- fold the non-dummy content of RegistrationBase into Rhsm: there is no
  more need for the separate RegistrationBase base class
- drop the init arguments "username", "password", and "token": the
  instance variables of them are not used anywhere, as the needed
  credentials (together with other variables) are passed to the
  register() method
- create the Rhsm object later in main(), after the AnsibleModule
  creation and the uid check: this avoids the creation of Rhsm with a
  null module variable, changing it later

There should be no behaviour change.

(cherry picked from commit 42f7531f21)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-06-10 21:10:56 +02:00
patchback[bot]
88b5e7ec0b
[PR #6663/78c42def backport][stable-7] Deprecate module_utils.redhat (#6666)
Deprecate module_utils.redhat (#6663)

This module contains bits that are either unused (the Rhsm* classes), or
used only by deprecated modules (the RegistrationBase class).
Considering that the bits here have not seen updates in years, it is
unlikely that anyone is actually using them as "library".

Hence, deprecate the whole module altogether:
- the Rhsm* classes, as not used by anything, are slated for removal in
  9.0.0
- the RegistrationBase class is slated for removal in 10.0.0, together
  with its only user (i.e. the rhn_register module)

(cherry picked from commit 78c42def04)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-06-10 14:59:48 +02:00
patchback[bot]
211b520017
[PR #6652/eddd1ba4 backport][stable-7] Fetch secret id's which are in folder by folder id (#6661)
Fetch secret id's which are in folder by folder id (#6652)

Added function to fetch secret id's by folder id

(cherry picked from commit eddd1ba4f2)

Co-authored-by: delinea-sagar <131447653+delinea-sagar@users.noreply.github.com>
2023-06-09 17:51:37 +02:00
patchback[bot]
cae94f9d5e
[PR #6650/61b88974 backport][stable-7] redhat_subscription: deprecate "pool" (#6657)
redhat_subscription: deprecate "pool" (#6650)

The "pool" option is slower to use, and the regexp may expand to broader
results than wanted. Because of that, deprecate it in favour of the
"pool_ids" options (which is much better), slating it for removal in
community.general 10.0.0.

(cherry picked from commit 61b889749e)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-06-09 17:13:31 +02:00
patchback[bot]
fc0981f3f1
[PR #6649/994f08b3 backport][stable-7] MH VarsMixin deprecation (#6656)
MH VarsMixin deprecation (#6649)

* MH VarsMixin deprecation

* add changelog frag

(cherry picked from commit 994f08b37a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-06-09 17:13:18 +02:00
patchback[bot]
d63658ea79
[PR #6646/621bedf7 backport][stable-7] redhat_subscription: officially deprecate "autosubscribe" (#6655)
redhat_subscription: officially deprecate "autosubscribe" (#6646)

The "autosubscribe" alias for the "auto_attach" option has been
deprecated for many years, although only in the documentation.
Officially mark it as deprecated also in the module parameters spec,
slating it for removal in 9.0.0.

(cherry picked from commit 621bedf751)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-06-09 14:06:47 +02:00
patchback[bot]
543792a68e
[PR #6577/72162864 backport][stable-7] proxmox_snap: allow set retention for snapshots (#6654)
proxmox_snap: allow set retention for snapshots (#6577)

* proxmox_snap: allow to trim snapshots

* proxmox_snap: add changelog fragment for trim parameter

* proxmox_snap: fix linter issues

* Update plugins/modules/proxmox_snap.py

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

* Update changelogs/fragments/6576-proxmox-snap-allow-trimming.yml

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

* proxmox_snap: rename 'trim' into 'retention'

* proxmox_snap: improve docu, as suggested by felixfontein

* proxmox_snap: rename 'trim' in changelog

* Update plugins/modules/proxmox_snap.py

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

* Update plugins/modules/proxmox_snap.py

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

---------

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

Co-authored-by: Alexander Petermann <petermann.a@gmx.net>
2023-06-09 13:34:08 +02:00
patchback[bot]
1f518751a1
[PR #6644/494909ab backport][stable-7] MH mh/mixins/deps.py: prevent deprecation warning when no deps are specified (#6653)
MH mh/mixins/deps.py: prevent deprecation warning when no deps are specified (#6644)

* MH mh/mixins/deps.py: prevent deprecation warning when no deps are specified

* rollback empty "patch" on license markers to prevent test error

* disable test in ansible 2.12

* add changelog frag

(cherry picked from commit 494909aba5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-06-09 13:28:30 +02:00
patchback[bot]
ef0665843f
[PR #6531/58958fc4 backport][stable-7] opentelemetry: add span event attributes (#6631)
opentelemetry: add span event attributes (#6531)

* add span event attributes (task name and host name)

* add fragment

* refactor: use set_attributes

* Add same span attributes to the event

* chore: change description in the fragment

* as mentioned in the code review

* use flag to disable the attributes in logs

there are some vendors that might not require those attributes since those details are shown in the UI when accessing the spans, i.e.: jaeger

* Update plugins/callback/opentelemetry.py

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

---------

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

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
2023-06-06 22:11:00 +02:00
patchback[bot]
c55585a0e2
[PR #6435/b78d1999 backport][stable-7] snap: aware of channel in installed snaps (#6630)
snap: aware of channel in installed snaps (#6435)

* [WIP] snap: aware of channel in installed snaps

* parse snap list output and assert whether channel matches

* undo test

* fail rightfully when install with different channel does not work

* transparetent refresh

* rollback comment in integration test

* rollback comment in integration test

* add changelog frag

* Update plugins/modules/snap.py

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

---------

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-06-06 21:30:31 +02:00
patchback[bot]
1eeff1556f
[PR #6612/c4e7a943 backport][stable-7] Redfish: Add MultipartHTTPPushUpdate (#6624)
Redfish: Add MultipartHTTPPushUpdate (#6612)

* Redfish: Add MultipartHTTPPushUpdate

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* Updates based on CI results

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* Update plugins/modules/redfish_command.py

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

* Update changelogs/fragments/6471-redfish-add-multipart-http-push-command.yml

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

* Update plugins/modules/redfish_command.py

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

* Update plugins/module_utils/redfish_utils.py

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

* Update plugins/module_utils/redfish_utils.py

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

* Update plugins/module_utils/redfish_utils.py

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

* Update plugins/module_utils/redfish_utils.py

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

* Added missing import statement

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* Added documentation for the usage of 'timeout'

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

---------

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c4e7a943c0)

Co-authored-by: Mike Raineri <michael.raineri@dell.com>
2023-06-06 06:05:15 +02:00
patchback[bot]
b4275969c1
[PR #6510/f71a4747 backport][stable-7] proxmox: support param timezone when creating container (#6611)
proxmox: support param `timezone` when creating container (#6510)

* proxmox: support param `timezone` when creating container

* add changelog fragments for #6510

* Apply suggestions from code review

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

* Improved param description

* Use major.minor version comparison for options

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sergei Antipov <s.antipov@mulesoft.com>
(cherry picked from commit f71a474726)

Co-authored-by: nxet <nxet821@protonmail.com>
2023-05-31 08:52:20 +02:00
patchback[bot]
41b5464942
[PR #6601/c9aae5e4 backport][stable-7] CmdRunner module utils: deprecate format method as_default_type() (#6609)
CmdRunner module utils: deprecate format method `as_default_type()` (#6601)

* CmdRunner module utils: deprecate format method `as_default_type()`

* add changelog frag

(cherry picked from commit c9aae5e45c)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-05-31 08:33:03 +02:00
patchback[bot]
7ee0389c98
[PR #6602/59db302d backport][stable-7] VarDict module utils: add as_dict() method (#6610)
VarDict module utils: add `as_dict()` method (#6602)

* VarDict module utils: add `as_dict()` method

* add changelog frag

(cherry picked from commit 59db302deb)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-05-31 08:32:10 +02:00
patchback[bot]
07f854fff1
[PR #6570/b133aa40 backport][stable-7] proxmox_kvm | Expose timeout param to stopped state (#6599)
proxmox_kvm | Expose timeout param to stopped state (#6570)

* Expose timeout param to stopped state

Forcefully stop virtual machine using timeout param for proxmox vm
shutdown api call.

* Add changelog fragment

* Typo fix in timeout param description

* Update changelogs/fragments/6570-handle-shutdown-timeout.yaml

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

* Update plugins/modules/proxmox_kvm.py

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

* Revert back exception message

---------

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

Co-authored-by: Sergei Antipov <s.antipov@mulesoft.com>
2023-05-30 06:20:03 +02:00
patchback[bot]
307a291b57
[PR #6533/01f21b1d backport][stable-7] proxmox_kvm: support for tpmstate0 parameter (#6600)
proxmox_kvm: support for tpmstate0 parameter (#6533)

* proxmox_kvm: added support for tmpstate

adds hash of options for a TPM state disk, which is required for Windows 11 installations

* updated wrong version in docs

* bump version 7.1.0 -> 7.1.1

* fixed parameter name typo

* updated to pass sanity; assumed version_added to be next major (7.2.0)

* replaced 'tpmstate' with 'tpmstate0'; added suboptions to kvm_args

* fixed line too long

* use get() instead of pop() to preserve verbose invocation.module_args

* update comment to include tpmstate0

* added changelog fragment

* Revert "bump version 7.1.0 -> 7.1.1"

This reverts commit 772ed98dba.

* Include PR link in changelog fragment

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

* Corrected version_added

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

* corrected semantic markup for option name

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

* set suboptions of tpmstate0 to required

* set default for tpmstate0.version (2.0)

* fixed typo

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

* wrapped default version string in quotes

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

* Improve changelog formatting.

---------

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

Co-authored-by: Jeff Turner <jeff@torusoft.com>
2023-05-30 06:19:53 +02:00
patchback[bot]
c4ebd482eb
[PR #6546/c76af60a backport][stable-7] ini_file: Don't creates new file instead of following symlink (#6598)
ini_file: Don't creates new file instead of following symlink (#6546)

* ini_file: Don't creates new file instead of following symlink

This is a bug fix that address a situation where `community.general.ini_file`
was destroying symlinks instead of updating of updating their targets.

Closes: #6470

* ini_file: add the follow parameter

If `poth` points on a symlink and `follow` is true, the `ini_file` plugin
will preserve the symlink and modify the target file.

* adjust the documentation of the new key

- yes/no -> true/false.
- new key will be introduced in 7.1.0.
- clean up the `state=link` part.

(cherry picked from commit c76af60a73)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
2023-05-29 20:03:24 +00:00
patchback[bot]
dd726d28ca
[PR #6525/4c0eff02 backport][stable-7] sorcery: moved import to top (#6595)
sorcery: moved import to top (#6525)

* sorcery: moved import to top

* add changelog frag

* Update changelogs/fragments/6525-sorcery-import.yaml

Co-authored-by: Vlad Glagolev <vaygr@users.noreply.github.com>

---------

Co-authored-by: Vlad Glagolev <vaygr@users.noreply.github.com>
(cherry picked from commit 4c0eff02e5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-05-29 21:36:34 +02:00
patchback[bot]
2a40169da5
[PR #6502/8586adcd backport][stable-7] plugins/inventory/cobbler: Add option to use system name for inventory (#6593)
plugins/inventory/cobbler: Add option to use system name for inventory (#6502)

* plugins/inventory/cobbler: Add option to use system name for inventory hostname (#6492)

* plugins/inventory/cobbler: Add warning for systems with empty profiles

(cherry picked from commit 8586adcd51)

Co-authored-by: Orion Poplawski <orion@nwra.com>
2023-05-29 21:08:59 +02:00
patchback[bot]
131bf72d72
[PR #6520/4373f2f3 backport][stable-7] mas: disable sign-in check for macOS 12+ (#6592)
mas: disable sign-in check for macOS 12+ (#6520)

* disable sign-in check for macOS 12+

* move is_version_greater func outside class Mas

* fix formatting

* remove trailing whitespace

* make use of LooseVersion to compare versions

* update requirement description

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

* update requirement description link

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

* update constant of macOS version

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

* use updated constant

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

* update getting macOS version

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

* add changelog fragment

---------

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

Co-authored-by: Justine Jose <59870720+justinpjose@users.noreply.github.com>
2023-05-29 21:08:53 +02:00
patchback[bot]
b49aeab5f5
[PR #6522/bd6cec21 backport][stable-7] respawn copr module when dnf is missing (#6591)
respawn copr module when dnf is missing (#6522)

* respawn copr module when dnf is missing

Fixes: https://bugzilla.redhat.com/2203513

* don't guard common.respawn module_util import

(cherry picked from commit bd6cec2105)

Co-authored-by: Maxwell G <maxwell@gtmx.me>
2023-05-29 21:08:45 +02:00
patchback[bot]
91bfdbd7a0
[PR #6513/e588e675 backport][stable-7] opkg: remove useless default value for force (#6590)
opkg: remove useless default value for force (#6513)

* opkg: remove useless default value for force

* add changelog frag

* Update changelogs/fragments/6513-opkg-default-force.yml

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

* add to force param description

* typo

---------

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-05-29 21:08:38 +02:00
patchback[bot]
f663fe73c1
[PR #6512/64f74e12 backport][stable-7] cpanm: deprecate default mode (#6589)
cpanm: deprecate default mode (#6512)

* cpanm: deprecate default mode

* add changelog frag

(cherry picked from commit 64f74e1228)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-05-29 21:08:31 +02:00
patchback[bot]
703519197f
[PR #6523/ee47497e backport][stable-7] datadog_monitor: Added notification preset name and renotify options (#6588)
datadog_monitor: Added notification preset name and renotify options (#6523)

* added notification_preset_name to datadog_monitor module

* added renotify optiond

* fix renotify_interval

* remove renotify_interval, it's already there

* add renotify_status only if renotify_interval not None

* add default for renotify_occurrences

* fix renotify_occurrences

* set renotify_occurrences default to 1

* fix renotify_occurrences

* fix renotify_occurrences

* fix renotify_occurrences

* fix renotify_occurrences

* fix renotify_statuses

* fix renotify_statuses

* fix renotify_statuses

* fix renotify_statuses

* final changes

* added changelog fragment

* added choices for renotify_statuses and changed version

* remove choices duplication

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

---------

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

Co-authored-by: day4me <nickydragon1999@gmail.com>
2023-05-29 21:08:22 +02:00
patchback[bot]
7531e97ddd
[PR #6539/dca7fd45 backport][stable-7] Enable using semantic markup (#6540)
Enable using semantic markup (#6539)

Enable using semantic markup.

(cherry picked from commit dca7fd4552)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-29 18:00:40 +02:00
patchback[bot]
7b83815835
[PR #6568/27fe14bf backport][stable-7] Fix get_user_by_username in keycloak library (#6583)
Fix get_user_by_username in keycloak library (#6568)

* Fix get_user_by_username in keycloak library for keycloak_user_rolemapping module

* Add changelog fragment for keycloak.py bug fix

(cherry picked from commit 27fe14bfc1)

Co-authored-by: Philippe Gauthier <philippe.gauthier@inspq.qc.ca>
2023-05-29 16:22:50 +02:00
Felix Fontein
714b24b01c Release 7.0.1. 2023-05-22 22:15:24 +02:00
patchback[bot]
5d5dd734e5
[PR #6534/a9fd9f89 backport][stable-7] added handling of zypper exitcode 102: ZYPPER_EXIT_INF_REBOOT_NEEDED (#6560)
added handling of zypper exitcode 102: ZYPPER_EXIT_INF_REBOOT_NEEDED (#6534)

* added handling of zypper exitcode 102: ZYPPER_EXIT_INF_REBOOT_NEEDED - Returned after a successful installation of a patch which requires reboot of computer.

The exitcode 102 will be treated exactly like 0 by the module internally now, and the changed status will be reported correctly. However, since I preserve the rc 102 in the retvals to allow the playbook to react to the requested reboot, the task must still include a "failed_when: zypper_cmd.rc not in [0, 102]" to not fail in this case.

* removed trailing whitespaces

* added changelogs fragment

* Fix typo.

Co-authored-by: Alex <alexgubin@gmx.de>

* Add URL.

---------

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

Co-authored-by: tover99 <101673769+tover99@users.noreply.github.com>
2023-05-22 04:54:18 +00:00
patchback[bot]
45d3708d31
[PR #6554/29790df5 backport][stable-7] Don't require api_password when api_token_id is used in proxmox_tasks_info (#6562)
Don't require api_password when api_token_id is used in proxmox_tasks_info (#6554)

* Don't require api_password when api_token_id is used in proxmox_tasks_info

* Add changelog fragment

* Fix casing.

---------

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

Co-authored-by: Sergei Antipov <greendayonfire@gmail.com>
2023-05-22 04:54:05 +00:00
patchback[bot]
5b7c759552
[PR #6548/5f968fb0 backport][stable-7] portage: fix changed_use and newuse not triggering rebuilds (#6008) (#6558)
portage: fix changed_use and newuse not triggering rebuilds (#6008) (#6548)

* portage: fix changed_use and newuse not triggering rebuilds (#6008)

* Add changelog fragment

* Update changelogs/fragments/6548-portage-changed_use-newuse.yml

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

---------

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

Co-authored-by: s-hamann <10639154+s-hamann@users.noreply.github.com>
2023-05-21 22:02:39 +02:00
patchback[bot]
443d5a2a5f
[PR #6527/cb1e6376 backport][stable-7] nmcli: Fix bond option xmit_hash_policy (#6556)
nmcli: Fix bond option xmit_hash_policy (#6527)

* nmcli_bond_xmit_fix

* Create 6527-nmcli-bond-fix-xmit_hash_policy.yml

add changelog

* Update changelogs/fragments/6527-nmcli-bond-fix-xmit_hash_policy.yml

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

* unit tests extend

---------

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

Co-authored-by: Sergey Putko <mail@psvlan.com>
2023-05-21 17:24:39 +02:00
Felix Fontein
ac398d8b2b Prepare 7.0.1 release. 2023-05-20 15:04:13 +02:00
Felix Fontein
d4aeb322bb Release 7.0.0. 2023-05-09 21:50:18 +02:00
Felix Fontein
165da11731 Prepare 7.0.0 release. 2023-05-09 21:46:18 +02:00
Peter Upton
88f7b5a675
Shutdown systemd without sysv (#6171)
* setup test

* inital working commit to enable shutdown using systemd

* add changelog fragment

* address sanity checks

* fix changelog fragement

* update to combine args and command

* fix self pararm

* fix pylint output

* cleanup test

* fix tests

* fix systemd missing failure message

* broaden test coverage

* address pr feedback

* address sanity test results

* fix tests

* fix tests

* pep8 sanity fix

* fix test conditional ordering

* quick fix for pep8

* Update changelogs/fragments/6171-shutdown-using-systemd.yml

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

* Update changelogs/fragments/6171-shutdown-using-systemd.yml

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

* Fix indentation.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-09 20:10:09 +02:00
Pino Toscano
aa6b5e4a60
Deprecate rhn_channel & rhn_register (#6493)
They are useful only with RHN, which Red Hat discontinued many years
ago, and with Spacewalk 5, which is EOL for more than 3 years;
while they could be potentially used with Uyuni / SUSE Manager (fork of
Spacewalk 5), we have not heard about anyone using it in those setups.

Hence, deprecate these two modules, with their removal planned for
10.0.0 in case there are no reports about being still useful, and
potentially noone that steps up to maintain them.
2023-05-09 19:30:19 +02:00
Sam Potekhin
c949f3a834
nmcli: added new module option 'slave_type' to allow create non-ethernet slave connections (#6108)
* nmcli: added new module option 'slave_type' to allow create non-ethernet slave connections

* argument specs updated

* documentation updated

* examples updated

* added warning message when using type='bridge-slave'

* remove trailing whitespace

* Added warnings about rewrite 'slave-type' property when using type one of 'bond-slave', 'bridge-slave', 'team-slave'.
Added module fails when user sets contradicting values of 'slave-type' for types 'bond-slave', 'bridge-slave', 'team-slave'.
Returned back checking for types that can be a slave to assign 'master' and 'slave-type' properties.

* Extending list of slave-conn-types

* Update plugins/modules/nmcli.py

Version updated

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

* Update plugins/modules/nmcli.py

Updated documentation for `slave_type`

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

* Updated argspec's 'required_by' for 'master' property.

* Fixed mistake in property  naming in module argspec.

* changelog fragment and module docs updated

* Validation of 'master', 'slave_type' options improved. (rebased)

* Validation of 'master' and 'slave_type' separated to special method.

* Wrote 6 tests for slave_type option behaviour

* Removed erroneously added property 'hairpin'

* Update version_added for 'slave_type'

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

* Update changelogs/fragments/473-nmcli-slave-type-implemented.yml

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

* Update plugins/modules/nmcli.py

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

* Let master be without slave_type

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-08 19:44:30 +02:00
Jonathan Kamens
9f3c86a589
dconf - Try to find a Python interpreter that has gi.repository.GLib (#6491)
* dconf - Try to find a Python interpreter that has gi.repository.GLib

If we're invoked in a Python interpreter that doesn't have access to
`gi.repository.GLib`, try to find one that does and respawn the task
in that interpreter.

* ChangeLog fragment for #6491

* Update changelogs/fragments/6491-dconf-respawn.yml

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

* Simplify import code

* Get rid of ModuleNotFoundError

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-08 19:42:49 +02:00
Alexei Znamensky
febe7a2fb4
gitlab modules: minor refactor (#6384)
* gitlab modules: minor refactor

* add changelog frag

* Update plugins/module_utils/gitlab.py

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

* Update plugins/module_utils/gitlab.py

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

* update changelog frag

* remove extraneous bracket

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-08 19:40:52 +02:00
ljkimmel
165182cdbf
mssql_script: allow non-returning SQL statements (#6457)
* feat: Allow non-returning SQL statements

- The current implementation fails out when certain statements or
  batches do not have resultsets - this limits the usefulness of the
  module
- Instead, it is known that statements without resultsets return then
  OperationalError exception with text "Statement not executed or
  executed statement has no resultset". We will utilize these facts to
  accept these statements
- The implementation also assumes that users will always use best-
  practices for the script syntax; that is, "GO" will always be
  capitalized but this is not strictly required -- update to allow "GO"
  to be any mixed-case

Signed-off-by: Lesley Kimmel <lesley.j.kimmel@gmail.com>

* feat: Add changelog fragment for change

- Add changelog fragment for PR 6192

Signed-off-by: Lesley Kimmel <lesley.j.kimmel@gmail.com>

* feat: Improve batching

- Previous batching had shortcomings like making strict assumptions
  about the format of the incoming script and did not handle Windows-
  based scripts (e.g. \r characters). It also did not handle cases where
  there were trailing or leading whitespace characters round the 'GO'
- Added a special case for removing the Byte Order Mark (BOM) character
  that may come as part of a script when slurped from some hosts.

Signed-off-by: Lesley Kimmel <lesley.j.kimmel@gmail.com>

* feat: Use str.splitlines()

- Use of this method is cleaner

Signed-off-by: Lesley Kimmel <lesley.j.kimmel@gmail.com>

* Update changelogs/fragments/6192-allow-empty-resultsets.yml

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

* fix: Update transcribing errors

- Replace local namespace with project namespace
- Remove 'return' statement from the module.fail_json call

Signed-off-by: Lesley Kimmel <lesley.j.kimmel@gmail.com>

---------

Signed-off-by: Lesley Kimmel <lesley.j.kimmel@gmail.com>
Co-authored-by: Lesley Kimmel <lesleyk@vmware.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-07 21:58:38 +02:00