1
0
mirror of https://github.com/ansible-collections/community.general.git synced 2025-04-17 09:57:05 +03:00

3525 Commits

Author SHA1 Message Date
Stein van Broekhoven
1243846c3a
improve ansible_host in proxmox inventory plugin (#9952)
* improve ansible_host in proxmox inventory plugin

I had this issue myself and found out there was already an issue thread:

https://github.com/ansible-collections/community.general/issues/5906

this fixes the issue for hope we can all benefit after this gets merged

* f string styling

* add log line for the successful address selection

* remove white space

* add changelog: 9952-proxmox-inventory-plugin-improve-ansible_host.yml

* Update changelogs/fragments/9952-proxmox-inventory-plugin-improve-ansible_host.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-16 20:52:53 +02:00
Emanuele Bernardi
42a161abf5
param pkcs12_alias and cert_alias to be optional in java_cert module (#9970)
* changed pkcs12_alias and cert_alias to be optional when importing pkcs12 certificate in keystore

* Add changelog fragment

* Update changelogs/fragments/9970-pkcs12_alias_cert_alias_optional.yml

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

* Update changelogs/fragments/9970-pkcs12_alias_cert_alias_optional.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-16 20:52:11 +02:00
Jeffrey Borcean
216e7dc06b
Fix typo in rpm_ostree_pkg documentation example (#9999)
Fix typo in rpm_ostree_pkg examples

The example showing use of a delay to improve resiliency misspelled 'delay'
2025-04-15 20:35:53 +02:00
Benoît Leveugle
a7ab7e9247
Feat: Add infiniband mac address support in nmcli module (#9962)
* Feat: Add infiniband mac address support in nmcli module

* Add changelog fragment

* Tentative to fix the error

* Update changelogs/fragments/9962-nmcli-add-infiniband-mac-support.yml

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

* Update plugins/modules/nmcli.py

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

* Fix: fix test_bond_connection_unchanged module check

* Update plugins/modules/nmcli.py

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

* Update changelogs/fragments/9962-nmcli-add-infiniband-mac-support.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-04-14 22:36:40 +02:00
gruenbauer@b1-systems.de
0413774641
keycloak_client: fix idempotency regression (#9976)
* add function to normalize kc responses

* add changelog fragment

* Update changelogs/fragments/9976-keycloak_client-fix-idempotency-regression.yml

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

* add newline to changelog fragment

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-14 22:35:50 +02:00
David Phillips
ab6e18b6cf
gitlab_project: add build_timeout option (#9960)
* gitlab_project: add `build_timeout` option

* gitlab_project: document unspecified build_timeout on creation
2025-04-14 22:34:47 +02:00
Felix Fontein
8525e420bc
Avoid deprecated AnsibleFilterTypeError (#9992)
Avoid deprecated AnsibleFilterTypeError.
2025-04-14 20:48:42 +02:00
Felix Fontein
04cfce78ea
Make ready for data tagging (#9833)
* Fix dependent lookup.

* Fix ansible_type plugin utils and adjust documentation of reveal_ansible_type filter and ansible_type test.

* Fix diy callback plugin.

* Adjust to Data Tagging.

* Vendor and use internal code from ansible-core to fix YAML callback.

Ref: https://github.com/ansible/ansible/issues/84781
2025-04-14 19:04:26 +02:00
Felix Fontein
1375cb65d6
Unify TLS/SSL config for Redfish modules with new common argument spec and docs fragment; add validate_certs and ca_path options (#9964)
Unify TLS/SSL config for Redfish modules with new common argument spec and docs fragment.
2025-04-10 07:08:04 +02:00
Ryan Badaï
d7edd34ba4
hpilo_boot: fix module failing when trying to power on an already powered-on server (#9646)
* fix: fix hpilo_boot.py module failing when trying to power on an already powered-on server

For this module to be idempotent, it should be successful when trying to reach a power state which is already there.

It was already the case for "poweroff", however when running the module with "boot_once" state, it was failing if the server was already powered_on, which is not an idempotent behavior

* doc: Add changelog fragment

* fix: add flag to run boot_once idempotently without breaking the previous behavior and add deprecation warning

* doc: fix documentation fragment description

* fix unwanted format changes

seems like I had an older version of this module formatted differently or that I had a formatter that automatically ran on this file

* fix linting errors

Removed trailing whitespace line 164

* add missing dash in idempotent_boot_once parameter description

* fix doc issue

* Update changelogs/fragments/9646-hpilo-fix-idempotency.yml

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

* Update plugins/modules/hpilo_boot.py

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

* Update changelogs/fragments/9646-hpilo-fix-idempotency.yml

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

* comment out module deprecation and change idempotent boot_once parameter description

* Update plugins/modules/hpilo_boot.py

* Update plugins/modules/hpilo_boot.py

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ryan BADAÏ <ryan.badai@dbi-services.com>
2025-04-10 07:05:35 +02:00
morco
1157b7102f
allow gitlab-project-members module to handle user level "owner" (#9953)
* fix(modules/gitlab-project-members): fix ...

... module not being able to handle owner access level

* add changelog fragment for this pr

* fix and extend integration tests

* extend parameter docu as requested by review

* also add docu for other parameters

* remove pip install break-packages flag from ...

... integration tests

---------

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
2025-04-10 07:05:01 +02:00
simonLeary42
02ffb6e7e3
update PHP apache module workaround (#9951)
* update php apache module workaround

* Update apache2_module.py

* Update apache2_module.py

* Update apache2_module.py

* add changelog fragment

* Update changelogs/fragments/9951-mod-php-identifier.yml

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

* Update 9951-mod-php-identifier.yml

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-04-10 07:04:14 +02:00
pandrieux
d923e326f6
fix duplicate json conversion for rocketchat pre740 (#9965)
* fix duplicate json conversion for rocketchat pre740

* add changelog

* Update changelogs/fragments/9965-fix-duplicate-jsonify-payload-for-rocketchat-pre740.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-06 14:26:26 +02:00
Felix Fontein
34b6fb74eb
proxmox_disk: fail gracefully if storage hasn't been provided by the user (#9963)
Fail gracefully if storage hasn't been provided by the user.
2025-04-06 14:16:36 +02:00
Felix Fontein
70b5e362f9 Migrate .reuse/dep5 to REUSE.toml. 2025-03-29 12:17:36 +01:00
Felix Fontein
e5e335348a
Simplify YAML callback tests (#9945)
Simplify YAML callback tests.
2025-03-29 10:47:53 +01:00
Felix Fontein
bc64982259 Next expected release will be 10.6.0. 2025-03-24 21:01:58 +01:00
florianfischer91
1fbf5d8eb4
proxmox_vm_info: don't expect key 'template' exists in dictionary (#9910)
* don't expect key 'template' exists

* add changelog fragment

* Update changelogs/fragments/9875-proxmox-dont-expect-key-template-to-exist.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-24 05:45:56 +01:00
X
c3b0354da0
Fix payload to match Rocket Chat 7.4.1 API (#9882)
* Fix payload to match Rocket Chat 7.4 API

* Add a fallback to send payload argument in case the user still interacts with a Rocket Chat version < 7.4.0

* Fix sanity checks

* Add changelog fragment of PR #9882

* Add argument option_is_pre740 to keep backward compatibility of the payload

* Add new argument doc

* Rename new parameter, add missing pieces of information in parameter doc

* Use appropriate change label and fix change description. Description about future plans for the parameter is now set at the parameter doc level

* Fix missing punctuation in the new parameter doc block

* Improve documentation.

* Fix line length.

---------

Co-authored-by: ludovic <ludovic.petetin@aleph-networks.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-24 05:45:01 +01:00
Abhijeet Kasurde
ec38a82ef1
tests: enable copr tests (#9867)
[WIP] tests: enable copr tests

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-23 14:51:21 +01:00
Felix Fontein
cb776e7cd5
The yarn module is Yarn Classic only at the moment (#9926)
The yarn module is Yarn Classic only.
2025-03-23 14:47:28 +01:00
Felix Fontein
410cf72aec
Unit tests: replace mock and compat with code from community.internal_test_tools (#9921)
* Replace compat with equivalent from community.internal_test_tools.

* Replace mock with equivalent from community.internal_test_tools.
2025-03-22 14:12:56 +01:00
Felix Fontein
8ab8010b6d
Use more unit test utils from community.internal_test_tools (#9918)
* Make conftest's patch_ansible_module use the context manager from .utils.

* Fix test dependencies.

* Use module mock utils from community.internal_test_tools.

* Use DataDictLoader from community.internal_test_tools.

* Use trust util from community.internal_test_tools.
2025-03-22 13:12:31 +01:00
Alexei Znamensky
9286b60182
cmd_runner_fmt.as_fixed() now accepts list of args (#9893)
* cmd_runner_fmt.as_fixed() now accepts list of args

* update CmdRunner guide

* add changelog frag

* Update changelogs/fragments/9893-cmdrunner-as-fixed-args.yml

* fix overdoing in as_fixed()
2025-03-21 21:04:59 +01:00
Elijah Lopez
e3d92491a3
Add caddy example to copr module (#9904)
Add caddy example to copr.py
2025-03-21 21:04:52 +01:00
stratacast
579f369ef3
vmadm - Add new options (#9892)
* Add flexible_disk_size and owner_uuid options

* vmadm - add changelog fragment

* Improve descriptions for options
2025-03-21 21:04:41 +01:00
ashleyghooper
3922b82a57
nmcli: fix reordering of DNS nameservers and search suffixes (#9880)
* nmcli: fix reordering of DNS nameservers and search suffixes

- Fixes #8724

* Update changelog fragment index in line with PR number

- Now I understand what that number is for

* Use correct changelog format for nmcli PR #9880
2025-03-21 21:04:30 +01:00
Felix Fontein
6a2d9ccd99
sysrc: extend the list of FreeBSD releases where the jail test fails (#9900)
Extend the list of FreeBSD releases where the jail test fails.
2025-03-18 21:58:43 +01:00
Nocchia
4a2cc71141
systemd_info - extend support to timer unit (#9891)
* systemd_info - extend support to timer unit

* systemd_info - add changelogs fragments

* systemd_info - fix description and base_props
2025-03-16 21:21:07 +01:00
Abhijeet Kasurde
e5eac9fed1
homebrew_cask: Handle unusual brew version strings (#9881)
* Use regex to parse unusual brew version strings

Fixes: #8432

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-15 08:04:06 +01:00
Croko-fr
96b003f9af
Adding Audio device support to proxmox_kvm (#9847)
* Add Audio device support to proxmox_kvm.py

Audio device was unsupported with message :
`FAILED! => {"changed": false, "msg": "Unsupported parameters for (community.general.proxmox_kvm) module: audio. Supported parameters include: acpi, agent, api_host, api_password, api_port, api_token_id, api_token_secret, api_user, archive, args, autostart, balloon, bios, boot, bootdisk, cicustom, cipassword, citype, ciupgrade, ciuser, clone, cores, cpu, cpulimit, cpuunits, delete, description, digest, efidisk0, force, format, freeze, full, hookscript, hostpci, hotplug, hugepages, ide, ipconfig, keyboard, kvm, localtime, lock, machine, memory, migrate, migrate_downtime, migrate_speed, name, nameservers, net, newid, node, numa, numa_enabled, onboot, ostype, parallel, pool, protection, reboot, revert, sata, scsi, scsihw, searchdomains, serial, shares, skiplock, smbios, snapname, sockets, sshkeys, startdate, startup, state, storage, tablet, tags, target, tdf, template, timeout, tpmstate0, update, update_unsafe, usb, validate_certs, vcpus, vga, virtio, vmid, watchdog."}`

With this patch it is possible to update proxmox VM config with an audio device.

```yaml
- name: Add Spice compatible audio device
  community.general.proxmox_kvm:
    api_user: "{{ api_user }}"
    api_password: "{{ api_password }}"
    api_host: "{{ api_host }}"
    node: "{{ node_name }}"
    vmid: "{{ proxmox_vmid }}"
    audio: '{"audio0":"device=ich9-intel-hda,driver=spice"}'
    update: true
  delegate_to: localhost
```

* Update plugins/modules/proxmox_kvm.py

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

* Update plugins/modules/proxmox_kvm.py

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

* Update plugins/modules/proxmox_kvm.py

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

* Create changelog fragment 9847-Adding_audio_device-support_to_proxmox_kvm.yml

* Update 9847-Adding_audio_device-support_to_proxmox_kvm.yml

Update following recommandations, thanks

* Update changelogs/fragments/9847-Adding_audio_device-support_to_proxmox_kvm.yml

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-15 07:46:44 +01:00
Jim Anderson
add892aa45
NMAP Inventory Plugin: Added option for specifying DNS servers for name resolution (#9849)
* Added option for specifying DNS servers for name resolution in NMAP inventory plugin.

* Added option for specifying DNS servers for name resolution in NMAP inventory plugin.

* NMAP Inventory Plugin: Added option for specifying DNS servers for name resolution.

* Update plugins/inventory/nmap.py

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

* NMAP Inventory Plugin: Added option for specifying DNS servers for name resolution.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-15 07:37:31 +01:00
Abhijeet Kasurde
dd0a2cbff9
sudoers: display stderr raised while validation (#9871)
* sudoers: display stderr raised while validation

* Print stdout and stderr raised from sudoers validation

Fixes: #9674

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>
2025-03-15 07:36:54 +01:00
Nocchia
3bd0ab4a49
systemd_info - add wildcards support (#9821)
* systemd_info - add wildcards support

* systemd_info - add wildcards fragments

* systemd_info - improved dedicated functions

* systemd_info - improved code and functions for better maintenance and timing

* fix unitname description

* removed redundancies and keys() in lists, replaced fnmatch with filter and run_command with cmdrunner

* systemd_info - add new cmdrunner

* systemd_info - fix runner

* systemd_info - fix env in runner

* systemd_info - rename runner and get_version

* systemd_info - change args runner, fix fragment, add botmeta

* systemd_info - merge type args
2025-03-15 07:36:16 +01:00
Paul Fertser
abe4e5ce95
Redfish: implement setting PowerRestorePolicy (#9837)
This property ("The desired power state of the system when power is
restored after a power loss.") was added in ComputerSystem.v1_6_0 which
became part of 2018.3 Redfish release.

Tested against an OpenBMC system running bmcweb Redfish server making sure the
policy is updated only when needed and that errors and messages are propogated
properly.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2025-03-12 19:59:01 +01:00
Felix Fontein
fdbc06c714
CI: Add FreeBSD 13.5 (#9872)
Add FreeBSD 13.5.
2025-03-12 07:28:25 +01:00
Alexei Znamensky
710dc5df86
pacemaker unit test: passing null with UTHelper (#9858) 2025-03-11 16:14:41 +13:00
Anwesha Das
941df094ca
Adds option for http agent for user in slack callback (#9836)
* Adds option for http agent for user in slack callback

* Adds changelog fragment for 9836 issue

* Apply suggestions from code review

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

* Fix typo.

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-10 06:33:09 +01:00
Abhijeet Kasurde
86dea88cb6
dnf_versionlock: add support for Fedora 41 and dnf5 (#9846)
Fixes: #9556

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-09 17:23:40 +01:00
Florian Apolloner
7d5357d74c
Fix roles/policies normalization in consul_token. (#9845)
* Fix roles/policies normalization in consul_token.

* Update changelogs/fragments/9845-consul_token_idempotency.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-09 17:22:50 +01:00
Felix Fontein
eff25c8a6e
Fix/improve tests (#9859)
* Fix tests.

* Improve callback tests.
2025-03-09 16:48:36 +01:00
Felix Fontein
4727fb77b3
cmd_runner tests: fix reliance on unspecified behavior (#9853)
Fix reliance on unspecified behavior.
2025-03-09 08:49:23 +01:00
Felix Fontein
9df8465476
Improve/fix unit tests (#9850)
* Improve/fix tests.

* Fix cargo test.
2025-03-08 16:26:09 +01:00
Felix Fontein
c46575cf06
Simplify module_utils unit tests (#9842)
Simplify module_utils unit tests.
2025-03-07 18:25:24 +01:00
Felix Fontein
a1781d09dd
Unit tests: make set_module_args() a context manager, and remove copies of it in some tests (#9838)
Make set_module_args() a context manager, and remove copies of set_module_args().

Prepares for Data Tagging.
2025-03-07 07:21:03 +01:00
Dexter
402f725424
add pacemaker_resource plugin (#9531)
* Add initial pacemaker resource

* Additional fixes on pacemaker_resource

* Fix up module parameters

* fix doc and lint

* fix group command build

* Apply suggestions for removing status and improve descriptions

* fix cmd builder list

* Apply suggestions and add initial unit tests

* Fix unit tests expected output

* Initial refactor on pacemaker resource

Refactorization on pacemaker_resource to utilize module helpers.

* Apply suggestions and fix up initial unit test

* Apply suggestions from code review

* Fix pep8 format for utils

* Fix unit tests for pacemaker resource

* Add botmeta maintainers for new moduules

* Apply suggestions from code review

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

* Apply unit test suggestion

* Add disable and enable states for pacemaker_resource

* Fix state names and add cli_action for runner

* Remove unnecessary variables

* Fix documentation example playbook

* Fix IP Address for resource_option

* Refactor and remove unnecessary facts

* Apply suggestions from code review

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-03-05 21:08:42 +01:00
brad2014
c43289b8f1
homebrew: Do not crash when package names include tap prefix. (#9803)
* homebrew:  Do not crash when package names include tap prefix.

Fixes #9777

* homebrew: PR #9803 minor update: removed trailing whitespace

* Update changelogs/fragments/9777-homebrew-fix-crash-when-packages-include-tap.yml

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

* Apply suggestions from code review

Co-authored-by: Thibaut Decombe <68703331+UnknownPlatypus@users.noreply.github.com>

* Update plugins/modules/homebrew.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Thibaut Decombe <68703331+UnknownPlatypus@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-03-05 21:07:08 +01:00
Felix Fontein
77dc086896
homebrew_services: skip tests on macOS 13.2 and 14.3 (#9828)
Skip tests on macOS 13.2 and 14.3.
2025-03-03 21:22:31 +01:00
Ernie Hershey
5f48f2ca0d
Example typo in homebrew_services.py (#9819)
Maybe this was mixed up with the _brew_service_state() function? I get this error as-written:
```
fatal: [eahmm3]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (community.general.homebrew_services) module: service
_state. Supported parameters include: name, path, state (formula)."}
```
2025-03-03 21:04:14 +01:00
Paul Fertser
129f51cf9d
Redfish: implement obtaining PowerRestorePolicy (#9824) (#9824)
This property ("The desired power state of the system when power is
restored after a power loss.") was added in ComputerSystem.v1_6_0 which
became part of 2018.3 Redfish release.

Example result from querying OpenBMC's bmcweb Redfish server:
```
    entries:
    -   -   system_uri: /redfish/v1/Systems/system
        - AlwaysOff
    ret: true
```

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2025-03-03 21:00:56 +01:00