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

1659 commits

Author SHA1 Message Date
patchback[bot]
d7b31655c4
[plugins/callback/syslog_json.py] use v2 api, add option to skip sysl… (#4223) (#4310)
* [plugins/callback/syslog_json.py] use v2 api, add option to skip syslog on gather_facts

* Update plugins/callback/syslog_json.py

Add version

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

* Update plugins/callback/syslog_json.py

consistency for description

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

* Update plugins/callback/syslog_json.py

ANSIBLE_ environment variable prefix

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

* add changelog fragment for PR 4223

* Update changelogs/fragments/4223-syslog-json-skip-syslog-option.yml

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

Co-authored-by: andrewroffey <36812998+andrewroffey@users.noreply.github.com>
2022-03-03 07:58:00 +01:00
patchback[bot]
70a7f66d4c
pipx: added options editable and pip_args (#4303) (#4309)
* pipx: added options editable and pip_args

* added changelog fragment

* added version markers on new options

(cherry picked from commit f988eb5726)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-03-02 22:47:37 +01:00
patchback[bot]
391c3aa850
pacman: re-adding support for URL based pkgs (#4286) (#4302)
* pacman: re-adding support for URL based pkgs

* Update plugins/modules/packaging/os/pacman.py

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

* Update plugins/modules/packaging/os/pacman.py

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

* cmd=cmd in every call to self.fail()

* pacman: integration test for mixed pkg sources

* Add more tests + fix minor bug with URL packages

Version checking for URL packages is left to pacman, so add a check
after the dry run to see if it would actually install anything.

* remove double templating

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

Co-authored-by: Jean Raby <jean@raby.sh>
2022-03-01 06:34:27 +01:00
patchback[bot]
deb95ea6bf
zypper: support automatic removal of orphaned dependencies (#4195) (#4301)
* zypper: support automatic removal of orphaned dependencies

* zypper: support automatic removal of orphaned dependencies

  - Add support for --clean-deps option during package removal, which
    will clean up packages that were only installed as dependencies
    of the package being removed.

* Update changelogs/fragments/4192-zypper-add-clean-deps.yml

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

* Update plugins/modules/packaging/os/zypper.py

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

* Update plugins/modules/packaging/os/zypper.py

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

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

Co-authored-by: Jeff Mahoney <jeffm@jeffm.io>
2022-02-28 19:54:58 +01:00
patchback[bot]
806ca0a9e0
Improve ArchLinux tests (#4291) (#4295)
* Make sure that every test that uses package: requires setup_pkg_mgr.

* Upgrade system packages for Arch Linux.

* Re-enable java keytool tests on Arch.

(cherry picked from commit 274b8cceef)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-27 15:50:15 +01:00
patchback[bot]
a171d9bb90
Make timezone tests work on Alpine. (#4292) (#4296)
(cherry picked from commit 14ef334754)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-27 15:50:06 +01:00
patchback[bot]
dd70c8b031
filesize: fix alpine linux sparse file (#4288) (#4294)
* fix sparse file creation on Alpine linux

* re-enable tests for Alpine
* remove `conv=sparse` flag (rely only on `seek=fullsize` & `count=0`)
* doc: add a reference to busybox's dd
* doc: remove restrictions for OpenBSD, Solaris & AIX (should work as
  for Alpine linux now)
* add a changelog fragment

* fix typo

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

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

Co-authored-by: quidame <quidame@poivron.org>
2022-02-27 13:55:50 +01:00
patchback[bot]
30e707aa79
Add very basic integration tests for pcaman. (#4289) (#4290)
(cherry picked from commit be433d762b)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-27 13:21:16 +01:00
patchback[bot]
7be95c8bbe
Temporarily disable Java keytool installation on Archlinux (#4283) (#4284)
* Temporarily disable Java keytool installation on Archlinux.

* Fix comment.

(cherry picked from commit 0d0e695d8f)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-24 23:22:14 +01:00
patchback[bot]
8e9a348e92
pacman: fix upgrade: yes (#4275) (#4277)
* s/sys-upgrade/sysupgrade/

* changelog fragment

* yamllint

* more fragment tweaks

(cherry picked from commit b9f62bb4ef)

Co-authored-by: Jean Raby <jean@raby.sh>
2022-02-23 18:01:06 +01:00
patchback[bot]
2622513d65
Re-enable ansible_galaxy_install tests. (#4253) (#4255)
(cherry picked from commit 2b0b780ccb)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-22 23:16:28 +01:00
Felix Fontein
37d37b20cb Next expected release is 4.6.0. 2022-02-22 14:37:01 +01:00
Felix Fontein
631d555f8a Release 4.5.0. 2022-02-22 13:56:04 +01:00
patchback[bot]
c4a53243d5
Fixes for keycloak_user_federation (#4212) (#4252)
* keycloak: fix creating a user federation w/ idempotent id

Creating a user federation while specifying an id (that doesn't exist
yet) will fail with a 404. This commits fix this behavior.

* keycloak: fix user federation mapper duplication

This commit fixes a bug where mappers are duplicated instead of
configured when creating a user federation.

When creating a user federation, some mappers are autogenerated by
keycloak. This commit lets the keycloak_user_federation module recompute
mappers final values after the user federation is created so that the
module can try to merge them by their name.

* add missing fragment for pr #4212

(cherry picked from commit c1485b885d)

Co-authored-by: Jules Lamur <jlamur@users.noreply.github.com>
2022-02-22 10:08:53 +01:00
patchback[bot]
c0008e976f
CI: Add ArchLinux, Debian Bullseye, CentOS Stream 8, and Alpine 3 (#4222) (#4244)
* Add ArchLinux, Debian Bullseye and CentOS Stream 8 to CI.

* Add Alpine to CI matrix as well.

(cherry picked from commit a06903f33a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-22 09:08:35 +00:00
patchback[bot]
f60c90873f
Temporarily disable ansible_galaxy_install tests due to Galaxy failures. (#4247) (#4250)
(cherry picked from commit 06705348e3)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-22 09:39:53 +01:00
patchback[bot]
c08a57a7c1
ansible_galaxy_install: added no_deps option (#4240) (#4246)
* ansible_galaxy_install: added no_deps option

* added changelog fragment

* Update plugins/modules/packaging/language/ansible_galaxy_install.py

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-02-22 09:21:02 +01:00
patchback[bot]
3d2caf3933
passwordstore: Add configurable locking (#4194) (#4243)
* passwordstore: Add configurable locking

Passwordstore cannot be accessed safely in parallel, which causes
various issues:

- When accessing the same path, multiple different secrets are
  returned when the secret didn't exist (missing=create).
- When accessing the same _or different_ paths, multiple pinentry
  dialogs will be spawned by gpg-agent sequentially, having to enter
  the password for the same gpg key multiple times in a row.
- Due to issues in gpg dependencies, accessing gpg-agent in parallel
  is not reliable, causing plays to fail (this can be fixed by adding
  `auto-expand-secmem` to _~/.gnupg/gpg-agent.conf_ though).

These problems have been described in various github issues in the past,
e.g., ansible/ansible#23816 and ansible/ansible#27277.

This cannot be worked around in playbooks by users in a non-error-prone
way.

It is addressed by adding new configuration options:

- lock:
  - readwrite: Lock all operations
  - write: Only lock write operations (default)
  - none: Disable locking
- locktimeout: Time to wait for getting a lock (s/m/h suffix)
  (defaults to 15m)

These options can also be set in ansible.cfg, e.g.:

    [passwordstore_lookup]
    lock=readwrite
    locktimeout=30s

Also, add a note about modifying gpg-agent.conf.

* Tidy up locking config

There is no reason why lock configuration should be part of self.paramvals.
Now locking and its configuration happen all in one place.

* Change timeout description wording to the suggested value.

* Rearrange plugin setup, apply PR feedback

(cherry picked from commit 2416b81aa4)

Co-authored-by: grembo <freebsd@grem.de>
2022-02-21 21:37:47 +01:00
patchback[bot]
df6a00dc89
pmem: Add namespace and namespace_append options (#4225) (#4239)
* pmem: Add namespace and namespace_append options

- namespace: Configure the namespace of PMem. PMem should be configured
  by appdirect/memmode, or socket option in advance.
- namespace_append: Enables to append the new namespaces.

* Add changelog fragment entry

* Update the changelog fragment

* Update changelog fragment entry

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

* Update to use human_to_bytes

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

* Update to fix the description of namespace_append

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

* Update to release v4.5.0

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

* Update to fix the typo in the description of namespace_append

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

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

Co-authored-by: mizumm <26898888+mizumm@users.noreply.github.com>
2022-02-20 22:20:02 +01:00
patchback[bot]
bdddc50358
Fix module failure due to itertools.izip_longest (#4211) (#4238)
* Fix module failure due to itertools.izip_longest

* Add changelog fragment. Remove itertools import

* Update changelogs/fragments/4206-imc-rest-module.yaml

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

Co-authored-by: Boris Vasilev <bvasilev@vmware.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 40f9445aea)

Co-authored-by: Boris <borisvasilev395@gmail.com>
2022-02-20 09:53:42 +01:00
Felix Fontein
8a01ad200d Prepare 4.5.0 release. 2022-02-19 23:32:28 +01:00
patchback[bot]
b6ccac372c
Fix some more instances of ansible.module_utils._text. (#4232) (#4233)
(cherry picked from commit a262a30122)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-19 08:21:01 +01:00
patchback[bot]
3b1b7966ca
feat: support cache in Linode inventory (#4179) (#4234)
(cherry picked from commit f6e0693e86)

Co-authored-by: Will Hegedus <whegedus@linode.com>
2022-02-18 23:33:44 +01:00
patchback[bot]
1f522c414e
[PR #4183/f5ec7373 backport][stable-4] yum_versionlock: Fix entry matching (#4228)
* yum_versionlock: Fix entry matching (#4183)

As an input the module receives names of packages to lock.
Those never matched existing entries and therefore always reported
changes.

For compatibility yum is symlinked to dnf on newer systems,
but versionlock entries defer. Try to parse both formats.

Signed-off-by: Florian Achleitner <flo@fopen.at>
(cherry picked from commit f5ec73735f)

* Empty commit to trigger CI.

Co-authored-by: fachleitner <flo@fopen.at>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-18 23:19:39 +01:00
patchback[bot]
cf60761cf9
mail: fix the encoding of the mail senders and recipients name (#4061) (#4229)
(cherry picked from commit 8682ac96df)

Co-authored-by: Lénaïc Huard <L3n41c@users.noreply.github.com>
2022-02-18 22:59:04 +01:00
patchback[bot]
4b28b036c9
Drop CentOS 8 from CI. (#4139) (#4231)
(cherry picked from commit b444dc81a1)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-18 22:31:25 +01:00
patchback[bot]
ec7c39351d
Rework of gitlab_project_variable over gitlab_group_variable (#4086) (#4226)
* Rework of gitlab_project_variable over gitlab_group_variable

* Linting and removed unused example

* Fix test 2

* Sync from review of gitlab_project_variable #4038

* Linting, default protected True, value optional

* Next version is 4.5.0

* Roll back protected default true, and value not required

* Apply suggestions from code review

Missing check_mode

Co-authored-by: Markus Bergholz <git@osuv.de>

* Fix one unit test, comment test that requires premium gitlab

* Add changelog

* Update plugins/modules/source_control/gitlab/gitlab_group_variable.py

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

* Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml

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

* Added conditional gitlab_premium_tests variable when required

* Allow delete without value

* Fix variable name

* Linting

* Value should not be required in doc

* Linting missing new-line

* Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml

Co-authored-by: Markus Bergholz <git@osuv.de>

Co-authored-by: Markus Bergholz <git@osuv.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 44f9bf545d)

Co-authored-by: Sebastian Guarino <sebastian.guarino@gmail.com>
2022-02-18 20:52:36 +00:00
patchback[bot]
b3963fd3c7
passwordstore: Fix error detection for non-English locales (#4219) (#4221)
The passwordstore lookup plugin depends on parsing GnuPG's
error messages in English language. As a result, detection of
a specific error failes when users set a different locale.

This change corrects this by setting the `LANGUAGE` environment
variable to `C` when invoking `pass`, as this only affects
gettext translations.

See
https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

(cherry picked from commit 77a0c139c9)

Co-authored-by: grembo <freebsd@grem.de>
2022-02-17 22:21:12 +01:00
patchback[bot]
271bafb637
passwordstore: Prevent using path as password (#4192) (#4218)
Given a password stored in _path/to/secret_, requesting the password
_path/to_ will literally return `path/to`. This can lead to using
weak passwords by accident/mess up logic in code, based on the
state of the password store.

This is worked around by applying the same logic `pass` uses:
If a password was returned, check if there is a .gpg file it could
have come from. If not, treat it as missing.

Fixes ansible-collections/community.general#4185

(cherry picked from commit da49c0968d)

Co-authored-by: grembo <freebsd@grem.de>
2022-02-17 21:33:18 +01:00
patchback[bot]
6f5152d053
Allow YAML docs in plugins/test/ and plugins/filters/. (#4204) (#4216)
(cherry picked from commit 1e4b8e30a9)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-17 19:44:34 +01:00
patchback[bot]
f8842e39be
ini_file: Don't report changed=true when removing if nothing is changed. (#4155) (#4214)
* don't report changed when nothing is removed

* add change log

* linter happy

* Update plugins/modules/files/ini_file.py

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

* Update changelogs/fragments/4154-ini_file_changed.yml

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

* add absent idempotency test

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

Co-authored-by: James Livulpi <james.livulpi@me.com>
2022-02-17 13:50:57 +01:00
patchback[bot]
b1459b13fe
gitlab_runner: Make owned and project mutually exclusive (#4136) (#4210)
* gitlab_runner: Set owned and project mutually exclusive

* gitlab_runner : Refactor _runners_endpoint usage

(cherry picked from commit 05c3e0d69f)

Co-authored-by: Léo GATELLIER <26511053+lgatellier@users.noreply.github.com>
2022-02-17 13:29:19 +01:00
patchback[bot]
57fa900f40
[modules/cloud/misc/proxmox_kvm] Adding EFI disk support (#4106) (#4209)
* Included efidisk0 option to be able to create VMs with persitent EFI disks

* Added forgotten argument to create_vm invocation and missing test for update

* Added changelog fragment relevant to PR

* Fixed documentation issues (missing period, and added version) from review

* Removed breaking change dependency for new option, modified changelog fragment according to review

* Fixed typo in documentation

* Added examples of `efidisk0` usage

* Added examples of `efidisk0` usage

* Fixed lines containing blank spaces

* Rebased on 4.4.0, added efi option, added sanity checks on efi option

* Adjusted version_added to 4.5.0

* Corrected typo in create_vm invocation, adjusted merging of efi and efidisk0 options

* Updated efidosk0 option to dict, added flattening to str, added constraint on bios option if efidisk0 is set

* Replaced loop by list comprehension for efidisk0 flattening

* Removed unused code left over from refactor from efi/efidis0 options

(cherry picked from commit 988cc82a89)

Co-authored-by: thuttinpasseron <87776406+thuttinpasseron@users.noreply.github.com>
2022-02-16 22:52:58 +01:00
patchback[bot]
f0a232d7a7
New module: pmem to configure Intel Optane Persistent Memory modules (#4162) (#4208)
* Add new module: pmem

This commit introduces to pmem module to configure Intel Optane
Persistent Memory modules (PMem).

* Add botmeta

* Update plugins/modules/storage/pmem/pmem.py

* Convert to snake_case options

* Update related to xmltodict

* Update to use list instead of string

* Update to use single quote to the string

* Update plugins/modules/storage/pmem/pmem.py

(cherry picked from commit 7f793c83f1)

Co-authored-by: mizumm <26898888+mizumm@users.noreply.github.com>
2022-02-16 22:52:44 +01:00
patchback[bot]
64f91aafa8
Add nejch and lgatellier as GitLab module maintainers. (#4199) (#4201)
(cherry picked from commit 7b02adc57e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-14 21:10:00 +01:00
patchback[bot]
7600fec752
Updated keycloak.py to allow defining connection timeout value (#4168) (#4178) (#4198)
* Updated keycloak.py to allow defining connection timeout value (#4168) (#2)

* Added parameter to doc_fragments and edited the changelog message (#4168)

* Added parameter to doc_fragments and edited the changelog message (#4168)

(cherry picked from commit 2498591695)

Co-authored-by: Nikolas Laskaris <laskarisn@gmail.com>
2022-02-14 19:56:01 +01:00
patchback[bot]
5af1ac26ac
Add scaleway_private_network module (#4042) (#4197)
* begin add private network

* scaleway_private_network , basic add and remove ok, work in progress

* scaleway_private_network : add search in next page

* scalewy_private_network add tags

* scaleway_private_network fix correct return value for register

* scaleway_privat_network change some text

* fix some sanity

* fix  line too long

* fix  line too long SCALEWAY_LOCATION

* some change for sanity

* fix sanity again

* add author in BOTMETA

* fix error in name  in fike BOTMETA

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* add test for scaleway_private_network

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_private_network.py

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

Co-authored-by: pastral <52627592+pastral@users.noreply.github.com>
2022-02-14 18:27:07 +01:00
patchback[bot]
5c85b2d891
proxmox_kvm: add win11 to ostype (#4191) (#4193)
* proxmox_kvm: add win11 to ostype

* add changelog fragment

* Update changelogs/fragments/4191-proxmox-add-win11.yml

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

Co-authored-by: Andrea Ghensi <andrea.ghensi@gmail.com>
2022-02-12 18:32:12 +01:00
patchback[bot]
0a8aa03425
opentelemetry: enrich services for jenkins, hetzner or jira (#4105) (#4190)
* opentelemetry: enrich services for jenkins, hetzner, jira, zypper, chocolatey

* remove source and name for the time being

Those arguments can be later on in the future added, maybe with some opt-in feature, so let's only focus in the ones which are fully http based for now

* changelog fragment

* Update changelogs/fragments/4105-opentelemetry_plugin-enrich_jira_hetzner_jenkins_services.yaml

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

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

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
2022-02-12 09:17:26 +00:00
patchback[bot]
fa689ffadc
[modules/cloud/misc/proxmox_kvm] Update docs for storage format option (#4186) (#4189)
* Updated storage format documentation to point to PVE docs to show possible values

* Fixed trailing space

(cherry picked from commit 14b8cd9c64)

Co-authored-by: thuttinpasseron <87776406+thuttinpasseron@users.noreply.github.com>
2022-02-12 09:30:11 +01:00
patchback[bot]
7d2332626e
dconf: Skip processes that disappeared while we inspected them (#4153) (#4182)
* dconf: Skip processes that disappeared while we inspected them

Fixes #4151

* Update changelogs/fragments/4151-dconf-catch-psutil-nosuchprocess.yaml

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

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

Co-authored-by: Pavol Babinčák‏ <scroolik@gmail.com>
2022-02-10 07:47:47 +01:00
patchback[bot]
bdc7e48779
request for comments - pacman: speed up most operations when working with a package list (#3907) (#4176)
* pacman: rewrite with a cache to speed up execution

- Use a cache (or inventory) to speed up lookups of:
  - installed packages and groups
  - available packages and groups
  - upgradable packages
- Call pacman with the list of pkgs instead of one call per package (for
  installations, upgrades and removals)
- Use pacman [--sync|--upgrade] --print-format [...] to gather list of
  changes. Parsing that instead of the regular output of pacman, which
  is error prone and can be changed by user configuration.
  This can introduce a TOCTOU problem but unless something else calls
  pacman between the invocations, it shouldn't be a concern.
- Given the above, "check mode" code is within the function that would
  carry out the actual operation. This should make it harder for the
  check code and the "real code" to diverge.
- Support for specifying alternate package name formats is a bit more
  robust. pacman is used to extract the name of the package when the
  specified package is a file or a URL.
  The "<repo>/<pkgname>" format is also supported.

For "state: latest" with a list of ~35 pkgs, this module is about 5
times faster than the original.

* Let fail() actually work

* all unhappy paths now end up calling fail()

* Update copyright

* Argument changes

update_cache_extra_args handled as a list like the others
moved the module setup to its own function for easier testing
update and upgrade have no defaults (None) to let required_one_of() do
its job properly

* update_cache exit path

Shift successful exit without name or upgrade under "update_cache".

It is an error if name or upgrade isn't specified and update_cache wasn't specified
either. (Caught by ansiblemodule required_one_of but still)

* Add pkgs to output on success only

Also align both format, only pkg name for now

* Multiple fixes

Move VersionTuple to top level for import from tests
Add removed pkgs to the exit json when removing packages
fixup list of upgraded pkgs reported on upgrades (was tuple of list for
no reason)
use list idiom for upgrades, like the rest
drop unused expand_package_groups function
skip empty lines when building inventory

* pacman: add tests

* python 2.x compat + pep8

* python 2.x some more

* Fix failure when pacman emits warnings

Add tests covering that failure case

* typo

* Whitespace

black failed me...

* Adjust documentation to fit implicit defaults

* fix test failures on older pythons

* remove file not intended for commit

* Test exception str with e.match

* Build inventory after cache update + adjust tests

* Apply suggestions from code review

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

* Update plugins/modules/packaging/os/pacman.py

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

* changelog

* bump copyright year and add my name to authors

* Update changelogs/fragments/3907-pacman-speedup.yml

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

* maintainer entry

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

Co-authored-by: Jean Raby <jean@raby.sh>
2022-02-09 12:35:26 +01:00
patchback[bot]
815638f2ec
vdo: Remove unused variable (#4163) (#4170)
* fix vdo error #3916

* add changelog fragment

(cherry picked from commit acd8853242)

Co-authored-by: Joseph Torcasso <87090265+jatorcasso@users.noreply.github.com>
2022-02-07 20:49:16 +01:00
patchback[bot]
a678029bd2
Refactor all Proxmox modules to use shared module_utils. (#4029) (#4164)
* Refactor Proxmox modules to use `module_utils`.

* Fix tests.

* Rename `node_check`.

* Add `ignore_missing` to `get_vm`.

* Refactor `proxmox` module.

* Add changelog entry.

* Add `choose_first_if_multiple` parameter for deprecation.

(cherry picked from commit a61bdbadd5)

Co-authored-by: Markus Reiter <me@reitermark.us>
2022-02-07 17:48:11 +01:00
patchback[bot]
fab30c5e55
Update Proxmox Inventory Documentation with additional examples (#4148) (#4159)
* Update Documentation with additional example

* Added an example to have the plugin return an IP address for a Proxmox guest, instead of the name of the guest (default behavior)
* Added an example to include a string literal to every guest (to support a playbook being able to check for variable presence to identify inventory in use)

* Update for line length readability

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

* Changed to cleaner static value

* Changed text for clarity

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

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

Co-authored-by: IronTooch <27360514+IronTooch@users.noreply.github.com>
2022-02-05 21:57:13 +01:00
patchback[bot]
3e25c692d7
Update docs helper. Automate generation of 'Merging lists of dictiona… (#4125) (#4160)
* Update docs helper. Automate generation of 'Merging lists of dictionaries'.

* Updated helper/lists_mergeby/playbook.yml, list of examples and
  templates. See playbook.yml on how to create *.out files, test
  examples and generate the REST file
  filter_guide_abstract_informations_merging_lists_of_dictionaries.rst
* Generated REST file copied to directory rst
* Simplified examples. The common lists are published only once. Only
  the expressions are published instead of the whole tasks.
* To change the content of the section 'Merging lists of dictionaries'
  update template
  filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2
  and run the playbook.
* Deleted rst/examples/lists_mergeby. Not needed anymore.

* Update docs/docsite/helper/lists_mergeby/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2

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

* Update docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst

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

Co-authored-by: Vladimir Botka <vbotka@gmail.com>
2022-02-05 21:33:15 +01:00
patchback[bot]
e1a4b50074
gitlab_project_variable: Allow delete without value (#4150) (#4157)
* value is not required when state is absent

* fix integration test. missing value

* fix condition

* add changelog fragment

* fail fast

* try required_if on suboptions

* revert

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* fix naming in doc

* typo in name

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

Co-authored-by: Markus Bergholz <git@osuv.de>
2022-02-05 21:20:41 +01:00
patchback[bot]
3a270cea95
Fix return value documentation to use a valid value for 'type'. (#4142) (#4147)
(cherry picked from commit 9322809b3a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-02 22:16:18 +01:00
patchback[bot]
41672c20d3
homebrew_cask: reinstall when force is install option (#4090) (#4145)
* homebrew_cask: reinstall when force is install option

* add changelog entry

* Fix OSX CI runs - run as non-root

* test with cask that has no macos dependencies

* use `brooklyn` cask to test

(cherry picked from commit 8b95c56030)

Co-authored-by: Joseph Torcasso <87090265+jatorcasso@users.noreply.github.com>
2022-02-02 21:54:52 +01:00
Felix Fontein
57f5ceece8 The next expected release is 4.5.0. 2022-02-01 13:11:06 +01:00