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

3032 commits

Author SHA1 Message Date
Felix Fontein
df7fe19bbe
pacman: do not fail if there is nothing to do (#8514)
Do not fail if there is nothing to do.
2024-06-17 07:06:31 +02:00
Eike Waldt
fd2cd5f28c
keycloak_clientscope: add normalizations for attributes and protocol_mappers (#8496)
Signed-off-by: Eike Waldt <waldt@b1-systems.de>
2024-06-16 22:14:31 +02:00
Tom Paine
3716187fc3
Fix OpenNebula inventory crash when NIC does not have IP (#8489)
* Fix OpenNebula inventory crash when NIC does not have IP

Match IPv6 behaviour.

When a NIC does not have an IP:
  File "ansible/inventory/manager.py", line 292, in parse_source
    plugin.parse(self._inventory, self._loader, source, cache=cache)
  File "ansible-cm/plugins/inventory/opennebula.py", line 263, in parse
    self._populate()
  File "ansible-cm/plugins/inventory/opennebula.py", line 226, in _populate
    servers = self._retrieve_servers(filter_by_label)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "ansible-cm/plugins/inventory/opennebula.py", line 210, in _retrieve_servers
    server['v4_first_ip'] = self._get_vm_ipv4(vm)
                            ^^^^^^^^^^^^^^^^^^^^^
  File "ansible-cm/plugins/inventory/opennebula.py", line 154, in _get_vm_ipv4
    return net['IP']

* Update to call to match IPv6 and add changelog fragment

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-16 22:14:18 +02:00
Alexei Znamensky
ec4cf55566
simplify cmd_runner_fmt.as_bool_not() (#8512)
* simplify cmd_runner_fmt.as_bool_not()

* add changelog frag
2024-06-16 09:46:03 +02:00
Ilgmi
03966624ba
Consul implement agent service and check (#7989)
* Implement agent service and check (#7987)

* implement update of service and check

* update tests
update documentation

* update documentation

* add consul_agent_check/service to action_groups

check if unique_identifier of name is in params to get object

add suggested improvements

* update sanity

* fix sanity issues
update documentation

* fix naming

* fix naming

check if response_data has data

* fix sanity extra-docs

* add as ignore maintainer in BOTMETA.yml
update version_added to 8.4

* fix sanity

* add to maintainers

* Update plugins/modules/consul_agent_check.py

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

* Update plugins/modules/consul_agent_check.py

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

* Update plugins/modules/consul_agent_check.py

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

* update version_added

* if create and update return no object as result we read the object again

* get_first_appearing_identifier check the params for the given identifier and return it to simplify id vs name

* add unique_identifiers as a new property and a method to decide which identifier should be used

* fix sanity

* add self to team consul
remove params with no values
add operational_attributes that inherited classes can set them
get identifier value from object

* fix sanity
fix test

* remove the possibility to add checks with consul_agent_check.
check if service has changed

* remove tests for idempotency check because for checks it is not possible

* remove unique_identifier from consul.py
change unique_identifier to unique_identifiers

* get id from params

* Revert "remove unique_identifier from consul.py"

This reverts commit a4f0d0220dd23e95871914b152c25ff352097a2c.

* update version to 8.5

* Revert "Revert "remove unique_identifier from consul.py""

This reverts commit d2c35cf04c8aaf5f0175d772f862a796e22e35d4.

* update description
update test

* fix sanity tests

* fix sanity tests

* update documentation for agent_check

* fix line length

* add documentation

* fix sanity

* simplified check for Tcp

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

* check duration with regex

* fix

* update documentation

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-06-16 09:32:55 +02:00
Alexei Znamensky
d95f4d68a3
fix version vardict was introduced (#8509) 2024-06-15 11:43:26 +02:00
Vladimir Botka
1d61541951
Feature filter replace_keys (#8446)
* Add filter replace_keys.

* Update examples and integration tests.

* Fix examples and copyright.

* Update documentation, examples and integration tests.

* Implement #8445. Add filter replace_keys

* Fix documentation formatting.

* Fix documentation.

* Fix type(target). Formatting improved.

* Instead of a dictionary, _keys_filter_target_dict returns a list

* No target testing in _keys_filter_params
* Interface changed _keys_filter_params(data, matching_parameter)
* If there are items with equal C(before) the B(first) one will be used.

* Update remove_keys. Interface changed _keys_filter_params(data, matching_parameter)

* The target can't be empty also in _keys_filter_target_dict

* Update plugins/filter/replace_keys.py

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

* Update plugins/filter/replace_keys.py

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

* Update plugins/filter/replace_keys.py

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

* Test attributes before and after are strings in the iteration of target.

* Update plugins/filter/replace_keys.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-14 21:54:58 +02:00
Jan Wenzel
2574cb0dea
feat: proxmox_vm_info - add network information for guests (#8471)
* feat: add network information for guests

- Uses agent information for qemu-vms
- Uses network information for lxc container

* chore: add changelog fragment

* fix: change default, add doc

* chore: clarify doc

* chore: add optional ,

* chore: fix pep8 indentation warning

* Update plugins/modules/proxmox_vm_info.py

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

* Update plugins/modules/proxmox_vm_info.py

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

---------

Co-authored-by: Jan Wenzel <jan.wenzel@gonicus.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-14 07:47:28 +02:00
Alexei Znamensky
71f9674835
cmd_runner mod util: improvements (#8479)
* deprecate ignore_none in context

* add changelog frag

* raise deprecation notice when passing ignore_value_none to context

* simplify deprecation logic
2024-06-14 07:46:56 +02:00
Felix Fontein
49e2a8633e
Add Python 3.13 to CI (#8500)
Add Python 3.13 to CI.
2024-06-13 20:37:33 +00:00
Felix Fontein
f0940d82dc
homectl, udm_user: guard crypt imports (#8497)
Guard crypt import.
2024-06-13 21:54:42 +02:00
Vladimir Botka
8f60f3aef9
Update docs lists_mergeby (#8475)
* Fix #8474. Complete examples and documentation of lists_mergeby

* Fix docs syntax O(_input)

* Update docs.

* Update plugins/filter/lists_mergeby.py

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

* Update plugins/filter/lists_mergeby.py

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

* Update plugins/filter/lists_mergeby.py

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

* Update plugins/filter/lists_mergeby.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-13 07:35:32 +02:00
joris
800bc01112
feat(redis_info): add option to fetch cluster info (#8464)
* feat(redis_info): add option to fetch cluster info

* add changelog fragment

* update description

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

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-12 19:47:50 +02:00
Vladimir Botka
ac3c04357c
Update docsite chapter "Merging lists of dictionaries" (#8477)
* Update docs 'Merging lists of dictionaries'

* Adding links to module and plugin options in
  docs/docsite/helper/lists_mergeby
* Add subsections and improve formatting.
* Add example-009 'Merge single list'

* Fix licenses.

* Fix variables.

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-12 19:47:18 +02:00
Alexei Znamensky
c31499a411
django_check: new module (#8454)
* django_check: new module

* sanity fix

* working version

* remove unused import

* add note about the module output

* add note on module failing when rc!=0
2024-06-12 19:46:54 +02:00
Felix Fontein
1ae6c82558
CI: Bump Azure test container to 6.0.0 (#8483)
Bump Azure test container to 6.0.0.
2024-06-10 20:26:38 +02:00
Thomas Gouverneur
d2d7deb4ec
#8440 Allow for API Port to be specified when using proxmox_kvm (#8441)
* added api_port

* added changelog fragments for #8440

* api_port minor changes

- Added documentation on api_port
- Fixed multiple spaces after operator
- Switched from str to int

* Update changelogs/fragments/8440-allow-api-port-specification.yaml

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

* Update changelogs/fragments/8440-allow-api-port-specification.yaml

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

* Update plugins/doc_fragments/proxmox.py

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

* Update plugins/doc_fragments/proxmox.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-08 14:04:59 +02:00
Vladimir Botka
06f13e79b1
Feature filter remove_keys (#8443)
* Add filter remove_keys.

* Add filter remove_keys integration test, fragment, and maintainer.

* Update with plugins/plugin_utils/keys_filter.py

* Update according PR #8456

* Update maintainers.

* Fix typo in return doc.

* Remove local keys_filter.py. Then rebase.

* Add local keys_filter.py

* Update plugins/filter/remove_keys.py

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

* Update plugins/filter/remove_keys.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-06 23:34:31 +02:00
Daniel
1c4ab7fafc
Add support for SSHFP records to ipa_dnsrecord module (#8404)
* Add support for SSHFP records to ipa_dnsrecord module

* Create 8404-ipa_dnsrecord_sshfp.yml

* Apply suggestions from code review

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

* Fix a typo in the example for ipa_dnsrecord with type SSHFP

* Update plugins/modules/ipa_dnsrecord.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-06 07:37:08 +02:00
Alexei Znamensky
a0ad2d5849
add docs for the vardict module utils (#8460)
* add docs for the vardict module utils

* fix var name

* add entry to BOTMETA

* rollback adjustment in deps guide

* Update docs/docsite/rst/guide_vardict.rst

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

* adjustments

* Update docs/docsite/rst/guide_vardict.rst

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-06 07:36:39 +02:00
Felix Fontein
2a3819a696
git_config: fix state=absent if value is present (#8452)
* Fix state=absent if value is present.

* Update changelog fragment.
2024-06-06 07:35:54 +02:00
Felix Fontein
0129346eda
git_config: deprecate reading values (#8453)
Deprecate reading values.
2024-06-04 06:27:50 +02:00
Vladimir Botka
6f8f12f762
Feature filter keep_keys (#8456)
* Add filter keep_keys. Implement feature request #8438

* Fix comment indentation.

* Fix regex reference.

* Fix indentation.

* Fix isinstance list.

* Update plugins/plugin_utils/keys_filter.py

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

* Update plugins/plugin_utils/keys_filter.py

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

* Update plugins/plugin_utils/keys_filter.py

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

* Update plugins/plugin_utils/keys_filter.py

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

* Update plugins/filter/keep_keys.py

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

* Update documentation, examples, and integration tests.

* _keys_filter_target_str returns tuple of unique target strings if
target is list. Update documentation, function comments, and error
messages.

* Sort maintainers.

* Update plugins/filter/keep_keys.py

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

* Update examples with explicit collection.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-04 06:01:25 +02:00
Victor Martinez
5041ebe5b2
fix(opentelemetry): remove request from the logs (#8430)
* fix(opentelemetry): remove request from the logs

* add changelog

* filter by task

* add new bugfix

* rename

* support legacy and shortcat ansible tasks

* Update plugins/callback/opentelemetry.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-03 06:50:55 +02:00
Mike Raineri
961767e2dd
Redfish: Add options to check the availability of the service (#8434)
* Redfish: Add options to check the availability of the service

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

* Updates based on review feedback

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

* Updated comment to reflect changed behavior

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

* Added changelog fragments

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

* Update changelogs/fragments/8051-Redfish-Wait-For-Service.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/modules/redfish_command.py

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

* Update plugins/modules/redfish_command.py

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

* Update plugins/modules/redfish_command.py

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>
2024-06-03 06:49:40 +02:00
Alexei Znamensky
d46e12e280
ansible_galaxy_install: add upgrade feature (#8431)
* add upgrade feature

* add changelog frag

* Update plugins/modules/ansible_galaxy_install.py

* Update plugins/modules/ansible_galaxy_install.py
2024-06-02 00:17:26 +02:00
Alexei Znamensky
5a5188a453
deps module_utils: add docs (#8417)
* add docs for the deps module utils

* wordsmithing

* fix reference and filename

* add entries to BOTMETA.yml

* Update docs/docsite/rst/moddev_guide_deps.rst

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

* adjust docs organisation

* adjust docs organisation II

* PR adjustments

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-02 00:16:53 +02:00
Léo GATELLIER
58ce19d2c2
feat(gitlab modules): remove basic auth (#8405)
BREAKING CHANGE : Remove basic auth against GitLab API
2024-06-01 22:45:51 +02:00
Alexei Znamensky
54df0c9b3a
django_createcachetable: new module (#8412)
* django_createcachetabe: new module

* add --noinput arg to testcase

* add module to BOTMETA

* rename module class name

* fix examples documentation

* remove unused config

* adjust version_added
2024-06-01 22:45:17 +02:00
Alexei Znamensky
7d72300c36
add cmd_runner_fmt.stack decorator (#8415)
* add cmd_runner_fmt.stack decorator

* fix sanity

* fix typo

* add changelog frag
2024-06-01 22:44:50 +02:00
Allen Smith
e690317e3a
Add partial diff support, not in check mode to openbsd_pkg (#8402)
* Add partial diff support, not in check mode

* Add changelog fragment

* Fix PEP8. Want to run Black against this so badly.

* Update changelogs/fragments/8402-add-diif-mode-openbsd-pkg.yml

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

* Update plugins/modules/openbsd_pkg.py

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

* Update plugins/modules/openbsd_pkg.py

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

* Remove unneeded comment

---------

Co-authored-by: Allen Smith <allsmith@allsmith.users.ipa.redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-01 21:33:29 +02:00
Thomas Bach
572caeaa39
keycloak_client: avoid TypeError if result["attributes"] is a list (#8403)
* fix(keycloak_client): avoid TypeError if attributes is a list

As sanitize_cr might be executed after normalise_cr, result['attributes'] can be of type list and we
run into:

TypeError: list indices must be integers or slices, not str

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-26 21:07:48 +02:00
Strahinja Kustudic
43cb5a0d54
Fix the homebrew module failing because of warnings (#8406)
Instead of checking if there is an error message, which can also be a
warning, we now check the return code.

This commit fixes #8229 #7044

Co-authored-by: Strahinja Kustudic <strahinjak@nordeus.com>
2024-05-26 21:07:09 +02:00
Herschdorfer
d96b2642bc
Update lxd_container.py documentation. (#8309)
remove dead link from debian example
2024-05-26 13:59:05 +02:00
Alexei Znamensky
e7ee90a937
ansible_galaxy_install: minor refactor (#8413)
* minor refactor

* add changelog frag

* remove commented code

* set use_old_vardict to false
2024-05-26 13:57:24 +02:00
Alexei Znamensky
ec886203fc
multiple modules: use new vardict in module (#8411)
* use new vardict in module

* add changelog frag

* Update changelogs/fragments/8411-locale-gen-vardict.yml

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

* set use_old_vardict to false in snap

* set use_old_vardict to false in cpanm

* set use_old_vardict to false in django mod helper

* set use_old_vardict to false in gconftool2_info

* set use_old_vardict to false in kernel_blacklist

* set use_old_vardict to false in mksysb

* set use_old_vardict to false in pipx_info

* set use_old_vardict to false in snap_alias

* update chglog frag

* fix typo

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-26 13:56:49 +02:00
Alexei Znamensky
da2c87ce0d
fix test helper handling of rc (#8387)
* fix test helper handling of rc

* fix side_effect logic for rc != 0

* fix side_effect func + sanity tests

* fix ignore files

* fix code

* revamp the generator for run_command calls returns in testcase

* remove unused import

* Update tests/sanity/ignore-2.18.txt

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

* Update tests/sanity/ignore-2.17.txt

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-24 21:59:00 +02:00
kurokobo
4792e21416
docs: add seealso and notes for yaml callback plugin (#8396)
* docs: add seealso and notes for yaml callback plugin

* docs: correct links to parameters

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

* docs: shorten the long lines

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-20 15:40:05 +02:00
Felix Fontein
95e509753e Update CI cron schedules. 2024-05-20 12:36:02 +02:00
Felix Fontein
22ed5048a2 Clean up main branch, next expected release will be 9.1.0. 2024-05-20 12:35:31 +02:00
Felix Fontein
9b0c983860
Move 'docker' homebrew tests into homebrew tests (#8395)
Move 'docker' homebrew tests into homebrew tests.
2024-05-20 09:31:23 +02:00
Felix Fontein
704a5acc63
From now on automatically add period to new plugins in changelog, and use FQCNs (#8392)
From now on automatically add period to new plugins in changelog, and use FQCNs.
2024-05-20 08:43:52 +02:00
rippleFCL
861f55eb04
added usb support to proxmox module (#8199)
* added usb support to proxmox module

* forgot docs

* fixed net refrances

* changed usb to USB

* added changelog fragment

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

* added changelog fragment

* corrected spelling and punctuation

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

* Another one.

---------

Co-authored-by: ripplefcl <ripple@ripplefcl.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-20 08:30:59 +02:00
Kevin Wise
bebe162a22
Add toggle for verbose logging to pkg5.py (#8382)
* Add toggle for verbose logging

Updated params with 'verbose' mode (defaults to False, which is existing behavior) to allow users to toggle verbose to True, which disables the '-q' flag that was hardcoded in the original module

* Create 8379-verbose-mode-pkg5.yml

* update pkg5.py to conform to PEP8 length requirements

The new verbosity argument on line 172 broke the 160 character length PEP8 requirement - split the line in two to conform to PEP8

* Add PR link to changelog fragement yml

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

* Add version_added and make the description of the verbose param clearer

* Update pkg5.py verbose description to conform to ansible documentation for semantic markup

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-20 08:17:08 +02:00
Thomas Sjögren
f82e7a7b83
lint and fix polkit examples (#8381)
* lint and fix polkit examples

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add changelog fragment

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* remove changelog fragment

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
2024-05-19 20:50:41 +02:00
Victor Martinez
03240ad7dc
fix(opentelemetry): close span even if no logs are sent (#8367)
* fix(opentelemetry): close span even if no logs are sent

* changelog
2024-05-19 20:50:03 +02:00
Victor Martinez
d87b9fe0dc
fix(opentelemetry): avoid storing inmemory if logs are disabled (#8373)
* fix(opentelemetry): avoid storing inmemory if logs are disabled

* changelog

* fix syntax

* refactor

* chore

* chore

* chore

* fix
2024-05-19 20:49:10 +02:00
Victor Martinez
5f481939d4
feat(opentelemetry): support flag to export spans in a given file (#8363)
* opentelemetry: support flag to create output file

this is only to help with adding unit tests

* refactor and rename

* changelog

* rename

* fix linting
2024-05-19 20:48:49 +02:00
Léo GATELLIER
70c78c1d71
gitlab modules: deprecate basic auth method (#8383) 2024-05-19 20:47:54 +02:00
Felix Fontein
0350a631de Prepare 9.0.0 release. 2024-05-18 16:35:31 +02:00