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

2527 commits

Author SHA1 Message Date
Alexei Znamensky
d074af8d09
minor quoting fix in doc (#6904) 2023-07-11 18:28:34 +12:00
Abhijeet Kasurde
59479b4abd
chroot: added an example (#6824)
* chroot: added an example

Added a simple example of chroot connection plugin

Fixes: #6365

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Apply suggestions from code review

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

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-08 10:21:13 +02:00
Sergei Antipov
7adb99855a
[proxmox_vm_info] New module to retrieve virtual machines information from Proxmox VE API (#6852)
* [proxmox_vm_info] New module to retrieve virtual machines information from Proxmox VE API

* Address review comments

* Fix seealso fragment

* Update plugins/modules/proxmox_vm_info.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-08 10:15:04 +02:00
Alexei Znamensky
f6ee2177a2
pacman: support yay as root (#6713)
* pacman: support yay as root

* make pylint happy

* minor adjustments

* rollback some test actions

* removal of user and pkgs in handlers

* add comment to note

* add changelog frag

* fix doc

* Update tests/integration/targets/pacman/tasks/yay-become.yml

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

* Update tests/integration/targets/pacman/tasks/yay-become.yml

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

* simplify pkg install in int. tests

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-08 10:14:22 +02:00
Skrekulko
7748002636
Fix Keycloak authentication management indexing (#6734)
* fix: keep original index

* refac: provider id choice

* refac: default

* fix: missing docs

* fix: ident

* fix: yaml formatting

* chore: bugfix changelog fragment

* fix: remove minor changes form current PR

* fix: missing yml extension

* Update changelogs/fragments/6734-keycloak-auth-management-indexing.yml

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

---------

Co-authored-by: Skrekulko <Skrekulko@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-08 10:13:51 +02:00
Rafael Sadowski
704a3019b7
Handle pkg_info(1) error message "Can't find" (#6785)
* Handle pkg_info(1) error message "Can't find"

* Update plugins/modules/openbsd_pkg.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-08 10:12:42 +02:00
Simon Keil
fc74f9a4f2
[datadog_downtime] - added 'type' to recurrence object when rrule param is present (#6811)
* added 'type' to recurrence object when rrule param is present

* formatting cleanup
2023-07-08 10:11:45 +02:00
jantari
5365647ee7
New lookup plug-in: Bitwarden Secrets Manager (#6389)
* add Bitwarden Secrets Manager lookup

* fix pep8 and yamllint complaints

* fix version_added, add maintainer and copyright notice

* document BWS_ACCESS_TOKEN env var and declare as required

* avoid returning nested list

* update 'value of a secret' example after f6c4492c

* update copyright notice in bitwarden_secrets_manager plugin

thx felixfontein

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

* rename classes to distinguish from existing bw plugin

* use AnsibleLookupError, formatting

* bump version_added to 7.0.0

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

* ci fix: python style guide calls for excessive blank lines

https://peps.python.org/pep-0008/#blank-lines

* first attempt at unit tests for bws lookup

* ci fix: remove trailing newline

* attempt to fix tests object not callable error

* address formatting, tests and pyright suggestions

* reduce scope of mocked code for more real test coverage

only the actual bws CLI call is mocked now, this should enable the
exception thrown test to succeed if I didn't add new problems

* fix undefined variable 'expected_rc'

* fix mocked _run method to return correct data types

* keep list of one element for test case comparison

* bump version_added to 7.2.0

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

---------

Co-authored-by: jantari <jantari@github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-08 10:11:02 +02:00
Alexei Znamensky
dc0d00452f
snap: add track 'latest' if no track is specified (#6835)
* snap: add track 'latest' if no track is specified

See https://snapcraft.io/docs/channels for more details.

* snap: assume track latest if channel does not specify it
2023-07-08 10:10:32 +02:00
Pierre-yves Fontaniere
eb73dc464e Add redfish processor architecture to Redfish CPU inventory (#6864)
* Add Processor Architecture to CPU Inventory details

* Add changelog fragment

* Changelog fragment writing guide formatting

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

---------

Co-authored-by: Pierre-yves FONTANIERE <pyf@cc.in2p3.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-07 22:30:03 +02:00
Alexei Znamensky
49349fce5e
proxmox: default value when checking for dict key (#6838)
* proxmox: default value when checking for dict key

* add changelog frag
2023-07-07 22:24:32 +02:00
Alexei Znamensky
e79c7e0f41
proxmox: remove unused imports (#6873)
* proxmox: remove unused imports

* add changelog frag
2023-07-07 08:11:41 +02:00
Valerio Poggi
242258eb53
Refactor consul_session to support authentication with tokens (#6755)
* Split into separate PR

* Refactor test, add author to inactive maintainers

* Add changelog fragment and correct requirements section on module documentation

* Add changelog fragment and correct requirements section on module documentation

* Update changelogs/fragments/6755-refactor-consul-session-to-use-requests-lib-instead-of-consul.yml

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

---------

Co-authored-by: Valerio Poggi <vrpoggigmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-07 07:49:10 +02:00
Felix Fontein
53c1ed184d
Temporarily disable pipx tests (#6874)
Temporarily disable pipx tests.
2023-07-07 07:43:28 +02:00
Alexei Znamensky
91a681870e
opkg: add executable parameter (#6862)
* opkg: add executable parameter

* add changelog frag

* Update plugins/modules/opkg.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-07 07:15:17 +12:00
genofire
9d8bec14c0
nmcli: fix empty list to replace / remove values (#6769) 2023-07-06 21:06:24 +02:00
Alexei Znamensky
601fa0df62
locale_gen: refactor module to use CmdRunner (#6820)
* refactor module to use CmdRunner

* add changelog frag
2023-07-06 21:05:34 +02:00
Drew Brown
216962a98c
proxmox_kvm: Add required timeout arg when force deleting (#6827)
* Add required timeout arg when force deleting

* Add changelog fragment

* Update changelogs/fragments/6827-proxmox_kvm-force-delete-bug-fix.yaml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-06 20:59:11 +02:00
Seige
99a35b1664
Add example for github_key in a single task (#6854)
* Add example for github_key in a single task

* Update plugins/modules/github_key.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-06 06:23:32 +02:00
Alexei Znamensky
4d704c03df
htpasswd: deprecate crypt_scheme (#6841)
* htpasswd: rename crypt_scheme with hash_scheme

* add changelog frag

* fixed chglog frag

* adjusted code for parameter name change
2023-07-06 06:15:37 +02:00
Alexei Znamensky
11406715f5
npm: replace test with required_if (#6848)
* npm: replace test with required_if

* add changelog frag
2023-07-05 22:07:58 +02:00
Alexei Znamensky
c34a22717e
proxmox: deprecate old compatibility feature flag (#6836)
* proxmox: deprecate old compatibility feature flag

* add changelog frag

* bump deprecation to 10
2023-07-04 20:08:48 +02:00
Alexei Znamensky
41e3f4d5fa
htpasswd: add integration tests (#6847) 2023-07-04 20:07:10 +02:00
Alexei Znamensky
e5dc697887
proxmox module utils: better error msg when token fails with old proxmoxer (#6839)
* proxmox module utils: clear msg when token fails with old proxmoxer

* add changelog frag

* better way to determine version
2023-07-03 22:07:05 +02:00
Alexei Znamensky
b6883492c7
htpasswd: minor updates in the docs (#6840)
* htpasswd: minor updates in the docs

* remove double spaces
2023-07-03 21:25:32 +02:00
Felix Fontein
92ea63e20b
Revert "proxmox_kvm: remove non-working example (#6498)" (#6832)
This reverts commit 61a0dc4370.
2023-07-02 22:25:32 +02:00
Sergei Antipov
2d6e369d81
[proxmox_template] Fix error while uploading big ISO to Proxmox VE cluster (#6757)
* [proxmox_template] Fix error while uploading big ISO to Proxmox VE cluster

* Fix pep8 test

* Add changelog fragment

* Add notes about requests_toolbelt

* Check versions and file size

* Fix typo in notes

* Add unit test. Move try inside of each function.

* Fix sanity tests

* Add proxmoxer in requirements file

* Update integration tests

* Add proxmoxer into constraints.txt

* Address review comments

* Don't run tests on 2.6 python

* Disable Python 2.6 tests for other proxmox modules
2023-07-02 21:48:26 +02:00
Pino Toscano
867704dd75
rhsm_repository: refactor handling of subscription-manager (#6783)
Create a small helper class Rhsm, so all the logic related to the
interaction with subscription-manager is grouped there:
- create the Rhsm object in main(), once the initial checks are done
- search subscription-manager as required (so there is no need to
  manually check it), and store its path for reuse
- store the common arguments for running subscription-manager
- move run_subscription_manager() to Rhsm as run_repos()
- get rid of the different list parameters: we list only all the
  repositories, so the other cases are not needed (and can be added
  easily, if needed)
- move get_repository_list() to Rhsm as list_repositories()

The execution of subscription-manager is improved as well:
- pass the arguments to run_command() directly as list, rather than
  joining the arguments to string, which run_command() will need to
  split again
- move the "repos" parameter directly in run_repos()
- explicitly disable the shell, already off by default
- disable the expansions of variables, as there are none

Adapt the unit test to the different way run_command() is called.

There should be no behaviour changes.
2023-07-02 21:44:53 +02:00
Alexei Znamensky
eb734d03c0
snap: fix bug when processing output (#6826)
* snap: fix bug when processing output

* add changelog frag
2023-07-02 21:27:50 +02:00
Alexei Znamensky
3fd4cdb119
locale_gen: works with C.UTF-8 (#6774)
* locale_gen: fix

* test working with C.UTF-8

* working with locale eo

* handle C.UTF-8 edge cases

* grammatic pedantism

* add changelog frag

* add doc about specific OS support

* update changelog frag
2023-06-30 06:39:11 +02:00
Matthew Davis
89ad18d1a7
random_string docs to say it's cryptographically secure (#6691)
Modify random_string docs to state that randomness is cryptographically secure
2023-06-29 23:29:50 +02:00
Felix Fontein
c4a2801f99
Remove pre-commit config (#6804)
Remove pre-commit config.
2023-06-28 22:22:27 +02:00
Skrekulko
a53bf9d261
Keycloak authentication provider ID choices (#6763)
* refac: provider id choices

* feat: minor changes fragment

* Update changelogs/fragments/6763-keycloak-auth-provider-choices.yml

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

---------

Co-authored-by: Skrekulko <Skrekulko@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-27 21:26:03 +02:00
Juan Estupinan
3571df837d
Module proxmox_kvm restarted state bug fix (#6773)
* Change proxmox_kvm restart to use new method

Previously, the `restarted` state used both stop and start vm functions to restart a vm.
This change introduces the a new function that utilizes the proxmox reboot endpoint instead for a more reliable method of restarting a vm.

* Create 6773-proxmox_kvm-restarted-state-bug-fix.yaml

* Fix typo

* Add link to PR

* Chanel log fragment formatting changes

* Move try/catch to `restart_vm` function

* Update changelogs/fragments/6773-proxmox_kvm-restarted-state-bug-fix.yaml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-26 23:31:18 +02:00
exodious
70e2048d8c
proxmox_disk: fix failure to create cdrom (#6770)
* proxmox_disk: fix failure to create cdrom

* Add changelog fragment 6770

* Update changelogs/fragments/6770-proxmox_disk_create_cdrom.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-26 23:30:33 +02:00
Mike Raineri
93f5a48b8c
Redfish: Filter empty account slots from ListUsers (#6772)
* Redfish: Filter empty account slots from ListUsers

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

* Update 6771-redfish-filter-empty-account-slots.yml

* Update changelogs/fragments/6771-redfish-filter-empty-account-slots.yml

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

---------

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-26 23:29:51 +02:00
TSKushal
22efbcc627
Fixing bug in get_volume_inventory (#6719)
* Fixing bug in get_volume_inventory

* Adding changelog fragment

* sanity fix

* Update changelogs/fragments/6719-redfish-utils-fix-for-get-volume-inventory.yml

Agreed

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

* Updating changelog fragment

* Update changelogs/fragments/6719-redfish-utils-fix-for-get-volume-inventory.yml

Agreed

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

* Updating changes as per PR comments

* PR comment changes

---------

Co-authored-by: Kushal <t-s.kushal@hpe.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-26 23:29:18 +02:00
Felix Fontein
7b404fd45d
CI: Remove Fedora 37 from devel; add Fedora 38 (#6788)
Remove Fedora 37 from devel; add Fedora 38.
2023-06-26 22:12:19 +02:00
Felix Fontein
8b5dc27d23
Add Debian Bookworm to CI (#6779)
* Add Debian Bookworm to CI.

* The package has been netcat-openbsd for some time now. The transitional package was removed in Debian 12.
2023-06-24 16:29:16 +02:00
Pino Toscano
08fa05f05f
rhsm_repository: add an initial unit test (#6758)
So far there are no tests for the rhsm_repository module, which makes it
difficult to do even basic changes. Hence, add an initial version of
unit tests, heavily based on the approach of the redhat_subscription
unit tests.
2023-06-24 12:32:54 +02:00
Felix Fontein
cfaeed0492
Bump AZP container (#6775)
Bump AZP container.
2023-06-24 12:14:06 +02:00
Felix Fontein
fd63f583ef
Improve seealso (#6766)
* Improve seealso.

* Update ignore files.
2023-06-22 13:16:22 +02:00
Felix Fontein
f88f40086d
ipify_facts: skip tests on Python 2.6 (#6759)
Needs some special requirements on Python 2.6 so that it can contact the server.

These seem to be installed when running all tests. I don't want to figure out what exactly
is missing, so let's just skip the tests on Python 2.6 for now.
2023-06-21 08:19:49 +02:00
Felix Fontein
c10fd44baf Next minor release will be 7.2.0. 2023-06-20 20:51:00 +02:00
Skrekulko
cd48e818ae
Keycloak: Authentication required actions management (#6732)
* feat: keycloak required actions

* Update plugins/modules/keycloak_authentication_required_actions.py

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

* Update plugins/modules/keycloak_authentication_required_actions.py

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

* fix: dedent

* fix: unnecessary defaults

* fix: sanity checks

* Update plugins/modules/keycloak_authentication_required_actions.py

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

* fix: ident

---------

Co-authored-by: Skrekulko <Skrekulko@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-20 19:18:26 +02:00
yoannlr
806f6da16b
icinga2_host: fix a key error when modifying an existing host (#6748)
* Initialize `template` variable. Add changelog fragment.

* Update changelogs/fragments/6286-icinga2_host-template-and-template-vars.yml

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

* icinga2_host: fix a key error when updating a host

* Changelog fragment.

* Update changelog fragment with correct PR number.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-20 18:25:32 +02:00
laszlojau
6bff57ee6e
Fix multiple issues with the TSS lookup plugin when using fetch_attachments (#6720)
* Treat files as binary when downloading attachments

* Raise a warning when the attachment can't be read

* Set the 'itemValue' for files, even when they can't be read

* Always return the original secret content

* Add changelog

* Fix changelog

* Update changelog

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

* Revert "Always return the original secret content"

This reverts commit a9fb96e165.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-20 18:23:16 +02:00
Felix Fontein
13e9e4b196
Add more semantic markup (#6744)
Add more semantic markup.
2023-06-20 08:14:02 +02:00
Pino Toscano
ffb9b6ff96
rhsm_repository: update returned "repositories" when using "purge=true" (#6676)
In case the "purge" option was enabled, the "repositories" element in
the returned JSON was not updated with the repositories disabled by that
option.
2023-06-20 07:13:47 +02:00
Felix Fontein
068a799bba
Add RHEL 8.7, 8.8, and 9.2 to CI (#6739)
* Add RHEL 8.7, 8.8, and 9.2 to CI.

* Add more ignores.

* Disable another test.
2023-06-19 23:49:33 +02:00