Commit Graph

403 Commits (main)

Author SHA1 Message Date
Nocchia 8425464c0a
Add new systemd_info module (#9764)
* add systemd_info module

* fix object results

* apply review changes

* apply module change and add doc_fragments

* removed use_unsafe_shell and doc_fragments/systemd

* fix unitname description doc

* fixed doc, replaced systemctl show syntax, added base prop result doc

* fix documentation

* fix RV values in description

* fix RV() description values

* add get_bin_path try/fail and remove list()

* fix doc, removed try block

* add Archlinux in integration test
2025-02-23 17:39:52 +01:00
Alexei Znamensky 9d0bd1d4d9
Test helper guide (#9676) 2025-02-15 22:55:15 +13:00
Felix Fontein ffae71a0d9 Remove comments. 2025-02-11 22:52:00 +01:00
raoufnezhad 96f465ddf8
Add module proxmox_backup_info (#9437)
* Create proxmox_backup_info.py

The `proxmox_backup_info` module displays information such as backup times, VM name, VM ID, mode, backup type, and backup schedule using the Proxmox Server API.

* Create test_proxmox_backup_info.py

create test for proxmox_backup_info.py module

* Update plugins/modules/proxmox_backup_info.py

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

* check tests proxmox_backup_info.py

* check tests test_proxmox_backup_info.py

* Update check tests test_proxmox_backup_info.py

* Update check tests proxmox_backup_info.py

* Update authors proxmox_backup_info.py

* Update active maintainers for proxmox_backup_info module

* Update add proxmox_backup_info module in proxmox group

* edit timestamp to UTC test_proxmox_backup_info.py

* Update vm name or vmid to VM name or VM id proxmox_backup_info.py

* update  documentation in proxmox_backup_info.py

* Update backup_section decription in proxmox_backup_info.py

* Update plugins/modules/proxmox_backup_info.py

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

* change backup_section to backup_jobs

* change backup_section to backup_jobs

* remove whitespace in line 35 and 36

* improve descriptions

* check again proxmox_backup_info.py module

* change vmid type and some descriptions proxmox_backup_info.py

* delete comment #if ...

* solve trailing whitespace error

* Update the name of the functions

* Update proxmox_backup_info.py

* Update proxmox_backup_info.py

* Update tests/unit/plugins/modules/test_proxmox_backup_info.py

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

* Update test_proxmox_backup_info.py

* Update runtime.yml

* add proxmox_backup_schedule module in runtime.yml

* add proxmox_backup_schedule.py module in BOTMETA.yml

* remove proxmox_backup_schedule module runtime.yml

* remove proxmox_backup_schedule.py module in BOTMETA.yml

* change some id to ID proxmox_backup_info.py

* Update proxmox_backup_info.py

* remove required: falsefrom documentations

* change vimd values to str format

* add samples to output documentations

* the exact output of vimd in endpoint of proxmox resoures is like int

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: mmayabi <137920552+mmayabi@users.noreply.github.com>
2025-01-26 20:55:56 +01:00
Mohammed Babelly 25a262bdcf
Create `onepassword_ssh_key` plugin (#9580)
* add 1password_ssh_key lookup

* refactor

* Delete onepassword_ssh_key.py

* Revert "Delete onepassword_ssh_key.py"

This reverts commit e17ff7e232.

* Delete onepassword_ssh_key.py

* add tests

* add test license

* cleanup

* refactor

* Apply suggestions from code review

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

* fix indentation

* fix RETURN indentation

* use get_option to get ssh_format

* linting

* update project year in copyright

* add plugin to BOTMETA.yml

* use OnePassCLIv2's get_raw and use OnePass's token

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-26 15:24:17 +01:00
Stanislav Meduna f5c1b9c70f
add json_patch, json_patch_recipe and json_diff filters (#9565)
* add json_patch, json_patch_recipe and json_diff filters

* fix copyright notices

* fix documentation

* fix docs, add maintainer

* fix review remarks

* add integration test

* fix docs (positional)

* add input validation

* formatting fixes

* more typing tweaks

* documentation fix

* fix review comments

* simplicfy input checking

* accept bytes and bytearray input

* add the fail_test argument

* fix docs format

* fix typing hints

* remove unneeded __future__ imports
2025-01-21 20:51:21 +01:00
Nils cee62a4069
Proxmox remote pct connection (#8424)
* First Revision (squashed)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Second Revision (squashed)

* implement data_in

* Removed quot()
There is no need for quoting, exec_command gets the command already quoted with shell from Ansible

* Use shell from self._shell

* Improved error handling

* updated docs

* Use Int for Container ID

* Updated docs to include detailed description for non root usage

* Fix ansible_user var in example

* Fix become method
We need to differentiate between become method used in Proxmox and the one inside the container.

* Implement review findings
- f-Strings
- lower() when input
- yaml indent
- consistent quotes
- use to_text()
- Enhanced examples
- Ansibullbot findings

* remove ssh cache

* Ensure we delete the tempfile

* use octal mode

* Use FileLock().lock_file

* ansibullbot findings

* refactor _connect()

* Update plugins/connection/pct_remote.py

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

* Apply suggestions from code review

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

* renamed plugin to proxmox_pct_remote

* Use ansible.builtin.ping as example

* added unit tests

* fixed bugs in close()

* catch invalid host key

* test invalid host key

* Added integration test

* cleanup

* setup test via ansible

* Revised notes based on review feedback

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

* gather_facts hint in example

* Update tests/integration/targets/connection_proxmox_pct_remote/aliases

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

* Fix FreeBSD, deactivate macOS

* Test and Fix: Hang on copy with empty content

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-18 16:27:06 +01:00
Hagai Kariti 81ea9f69bf
Add hkariti to notifications ignore list (#9542)
* Add hkariti to notifications ignore list

* Update .github/BOTMETA.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-07 19:00:58 +01:00
Stephan Schwarz d7da0ae7f6
remove stearz as maintainer (#9518)
* remove stearz as maintainer

As I do not work with Sophos UTMs anymore I am no longer able to test/maintain. - I added team_e_spirit as maintainer as I think they are still using and willing to support the modules.

* added ignore lines to remove stearz as maintainer
2025-01-03 19:59:56 +01:00
Alexei Znamensky 39deb81514
clc_*: create doc fragment (#9497)
* clc_*: create doc fragment

* add BOTMETA entry

* add doc frag itself

* add empty options dict to doc frag

* fix BOTMETA entry

* fix BOTMETA entry

* move author back to module
2025-01-01 09:14:44 +01:00
Philippe Duveau adb4b3c8a5
Add module ldap inc (#9275)
* Add module ldap_inc

This module adds the ‘modify-increment’ capability corresponding to the extension implemented by OpenLdap described in RFC-4525. It can be used to increment an integer attribute and read it atomically. It is an help for posix userId definition while relying only on the directory server.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/ldap_inc.py

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

Update plugins/modules/ldap_inc.py

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

Update plugins/modules/ldap_inc.py

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

Fix the check mode support

Check mode documentation fix

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-30 21:19:10 +01:00
Thomas Sjögren 482a90e8b4
add support for systemd creds encrypt/decrypt (#9383)
* add support for systemd creds encrypt/decrypt

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

* add __metaclass__

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

* Python 2.7 issues

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

* update version_added and ci test aliases

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

* switch to container

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

* run tests in docker as well

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

* move tasks into tasks/

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

* no need to call echo

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

* lint and add become:

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

* dont append a newline

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

* don't clean newlines

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

* only use module name

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

* clean

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

* change msg to value

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

* add return values

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

* update attributes and description

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

* Update plugins/modules/systemd_creds_decrypt.py

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

* set newline default

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

* Update plugins/modules/systemd_creds_encrypt.py

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

* Update plugins/modules/systemd_creds_encrypt.py

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

* Update plugins/modules/systemd_creds_encrypt.py

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

* update required and spelling

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

* use single backslash

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

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-29 21:15:57 +01:00
Vladimir Botka 23d97fa4b0
Add inventory plugin iocage (#9262)
* Add inventory plugin iocage #9261

* inventory/iocage.py BOTMETA entry added.

* Remove missing methods from the test.

* Avoid shell mode.

* Parameter host is optional default=localhost

* Fix AnsibleError calls.

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

* iocage_data removed. Not necessarily defined at this point.

* Description mentions that remote hosts are contacted via SSH.

* test inventory iocage

* Create get_jails and get_properties in iocage plugin to simplify testing.
* Update test_iocage.py
* Add fixtures iocage_*

* Update documentation.

* Update documentation.

* Update documentation.

* Fix localhost environment.

* Update plugins/inventory/iocage.py

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

* Update plugins/inventory/iocage.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-25 21:41:40 +01:00
Stanislav Shamilov 2b2872f0ef
Add android sdk module (#9236)
* adds simple implementation of adding and removing android sdk packages

* adds package update

* adds simple installed packages parsing

* moves parsing logic to a separate class

* adds absent state for sdkmanager packages and setup for tests

* adds output for installing and removing packages

* removes version from Package object since it is not possible to specify version for a package while using sdkmanager

* adds 'latest' state

* adds tests

* fixes crash when sdkmanager is invoked from python with LC_ALL=C

* fixes latest state

* adds sdk_root parameter

* adds channel parameter

* simplifies regexps, removes unused named groups

* minor refactoring of sdkmanager parsing

* adds java dependency variable for different distributions

* adds RETURN documentation

* adds check for nonexisting package

* adds check for non-accepted licenses

* removes excessive methods from sdkmanager

* removes unused 'update' module parameter, packages may be updated using 'latest' state

* minor refactoring

* adds EXAMPLES doc section

* adds DOCUMENTATION section and license headers

* fixes formatting issues

* removes diff_params

* adds maintainer

* fixes sanity check issues in sdkmanager

* adds java dependency for macos and moves some tests to a separate FreeBSD configuration

* fixes dependencies setup for OSX

* fixes dependencies setup for OSX (2)

* fixes dependencies setup for OSX (3)

* Apply minor suggestions from code review

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

* applies code review suggestions

* changes force_lang from C.UTF-8 to auto in sdkmanager (as per discussion https://github.com/ansible-collections/community.general/pull/9236#discussion_r1881114326)

* Revert "changes force_lang from C.UTF-8 to auto in sdkmanager (as per discussion https://github.com/ansible-collections/community.general/pull/9236#discussion_r1881114326)"

This reverts commit 619f28dd58.

* fixes some more comments from review

* minor sanity issue fix

* uses the 'changed' test instead of checking the 'changed' attribute

* adds 'accept_licenses' parameter. Installation is now performed independently for each package specified.

* removes "Accept licenses" task from examples

* fixes docs sanity issues

* applies minor suggestions from code review

* fixes regexps. The previous version didn't match versions like "32.1.0 rc1". Also, this allows to simplify the parsing logic as there is no need to skip table headers anymore.

* renamed sdkmanager.py to android_sdkmanager.py

* applies minor suggestions from code review

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

* updates BOTMETA

* reordered BOTMETA

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-20 22:55:12 +01:00
Thomas Bechtold 65827bdc96
Drop myself from team_suse (#9259)
I no longer work with ansible and/or SUSE so drop me from the team.
2024-12-16 20:51:38 +01:00
Felix Fontein f6dae1fc4d
CI: Fix some issues pointed out by zizmor (#9250)
Fix some issues pointed out by zizmor.
2024-12-14 14:56:05 +01:00
Max Gautier a789bd128f
Add the accumulate filter (#9133)
* Add the accumulate filter

- Add myself as a maintainer for it.
- Some integration tests.

* accumulate: fix documentation and add test aliases

The aliases file was copied over from
tests/integrations/targets/filter_dict/aliases as the documentation[1]
suggests to use the same group as existing similar tests.

[1]: https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/integration-aliases.html

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

* accumulate: documentation: markup consistency with other plugins

Suggested-by: Felix Fontein <felix@fontein.de>
Suggested-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* filter/accumulate: Validate input is a Sequence

Accepting arbitrary iterables might lead to surprising behavior so we
are stricter on what we accept in the filter.
Relaxing those requirements is easier than retrofitting them, in terms
of backwards compatibility.

Suggested-by: Felix Fontein <felix@fontein.de>
Signed-off-by: Max Gautier <mg@max.gautier.name>

* filter/accumulate: Document the behavior with a string

Signed-off-by: Max Gautier <mg@max.gautier.name>

---------

Signed-off-by: Max Gautier <mg@max.gautier.name>
2024-12-02 20:20:13 +01:00
Stanislav Shamilov 41b6a281e1
Add decompress module (#9175)
* adds simple implementation of `decompress` module

* adds simple test, fixes src and dest arg types

* minor refactoring

* adds support for common file operations
adds integration test for gz decompressing

* makes tests parametrized to test all supported compression formats

* checks that target file exists

* writes to decompressed file now uses atomic_move

* adds idempotency for decompression

* refactoring, removed classes

* adds support for check mode

* adds check for destination file. If it exists and it is a directory, the module returns error

* refactoring, moves code to a class. Also, simplifies tests (now only tests related to the module core functionality run as parametrized, tests for idempotency and check mode run only for one format)

* adds 'remove' parameter that deletes original compressed file after decompression

* adds documentation

* fixes bug with 'remove' parameter in check mode

* makes dest argument not required. Dest filename now can be produced from the src filename

* adds dest to output

* updates the documentation, adds "RETURN" block

* fixes test

* adds support for python2

* removes some of the test files that can be generated during testing. Adds copyright header to test files

* adds maintainer

* apply minor suggestions from code review

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

* fixes code review comments (idempotency issue with non existing src, existing dest and remove=true; fixes the issue and adds test)

* refactors the module to use ModuleHelper

* refactors lzma dependency manual check to use 'deps.validate'

* minor fix

* removes registered handlers check

* minor refactoring

* adds aliases

* changes setup for tests

* tests: ignores macos and fixes tests for FreeBSD

* tests: reverts ignore for macos and fixes issue with centos7

* tests: adds liblzma dependency for python2

* tests: adds backports.lzma

* fixes bz2 decompression for python2

* tests: install xz for osx

* tests: install xz for osx (2)

* fixes code review comments

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-02 20:16:00 +01:00
IamLunchbox c38b474982
Add backup module for proxmox (#9197)
* Defined configuration variables, main backup function todo

* Defined configuration variables, main backup function todo

* wip

* permission checks and basic flow done, final request missing

* ansible-test and unit test open

* Improve documentation

* fix pep8 errors

* remove f-string and fix bugs through manual testing

* longer full example

* improve docs

* error message for fail + timeout

* move sleep location

* remove residual debugger

* include newline for better readability

* more linting errors fixed

* Include UPIDs as return value

* Output logs as comma separated value, move exception and create new abstraction for api calls

* pretter logs

* Update project to final version

* Remove accidential placeholder for integration test

* Fix missing explizit string in docstring

* Reorder imports below docstrings

* remove type annotations and fix indendation of options dict

* prettier idendation and aplhabetic ordering of options dict

* aplhabetic ordering of docstring options

* Remove the rest of type hinting as well :(

* fix version

* improve documentation

* add change detection mode

* refactor list comprehension to filter function

* remove storage availability check for node

* refactor to quotation marks

* Fix trailing newline and incorrect RV usage

* rollback filter plugin

* Remove action_group reference and add proxmox_backup to meta/runtime.yml

* Include note about missing idempotency

---------

Co-authored-by: IamLunchbox <r.grieger@hotmail.com>
2024-12-02 20:06:08 +01:00
dependabot[bot] 2a66ac719a
build(deps): bump fsfe/reuse-action from 4 to 5 (#9143)
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 4 to 5.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 19:36:38 +01:00
Björn Bösel 9fb686fe35
add plugin for generic keycloak component (#8826)
* add plugin for generic keycloak component

* add changelog fragment

* fix import in test

* Update plugins/modules/keycloak_component.py

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

* Update plugins/modules/keycloak_component.py

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

* Update plugins/modules/keycloak_component.py

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

* Update plugins/modules/keycloak_component.py

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

* set correct supported diff_mode

* fix line lenght

* Update docblock

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

* Update changelogs/fragments/8826-keycloak-component.yml

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

* Update plugins/modules/keycloak_component.py

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

* Update plugins/modules/keycloak_component.py

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

* update docblocks

* add entry to BOTMETA.yml

* update copyright

* Set Version number

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

* remove changelog fragment

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-10-21 20:52:28 +02:00
Connor Newton 064f76c27b
New module: Jenkins node management (#9016)
* New module: Jenkins node management

* Fix sanity errors

* (Try to) fix mock import for Python 2.7

* Remove encoding from XML tostring in hopes of appeasing py27

Default encoding is probably always good enough.

* Turns out that encoding parameter was important for python3...

It's not super obvious how to resolve in a 2 + 3 compatible way,
so branch and omit encoding for 2.

* Implement review fixes and suggestions
2024-10-19 12:51:50 +02:00
Felix Fontein 5874711c6e Fix reuse workflow branches. 2024-10-19 12:35:13 +02:00
TobiasZeuch181 410288401b
Add zypper_repository_info module (#8778)
* Adding the list-option for reading the registered repodata

* adding a parameter list
* if the parameter is set, return the output (as a dictionary)
* adjusting the documentation for the new parameter

* Adding changelot-fragment

and link to the issue in the issue-tracker https://github.com/ansible-collections/community.general/issues/8777

* Adding description and example for the new list parameter

* Adding type for new parameter list to argument_spec

* Revert "Adding type for new parameter list to argument_spec"

This reverts commit 6b86e8ba447a9b53e434c79d33c7fe260485b342.

* Revert "Adding description and example for the new list parameter"

This reverts commit db06dafb958f6aeffa38adeee85623904b26bbb1.

* Adding a new module for reading the list of regiestered repositories

I created a new module for reading the repositories based on a sub-procedure from the existing zypper_repository

* Removing the changes to module zypper_repository

because the list-option is not supposed to go into this module

* removing the last change from the zypper_repository module

* Fixing linter errors

Adding extra lines before definitions
adding the missing dash in the documentation
removing the unused imports

* Adding maintainer under BOTMETA, adding test and fixing suggestions

I added the maintainer to BOTMETA
I applied the suggestions on the code form the review
I added a test for the new module to the existing zypper_repository-tests

* Adding maintainer under BOTMETA, adding test and fixing suggestions

I added the maintainer to BOTMETA
I applied the suggestions on the code form the review
I added a test for the new module to the existing zypper_repository-tests

* Deleting the fragment because this will be created automatically

I deleted the fragment because this will be created automatically based on the short_description and version_added

* removing foreign commits from history that accidentily sneaked in with the last rebase

* Update plugins/modules/zypper_repository_info.py

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

* Update .github/BOTMETA.yml

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

* Update plugins/modules/zypper_repository_info.py

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

* Update plugins/modules/zypper_repository_info.py

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

* Update plugins/modules/zypper_repository_info.py

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

* Update plugins/modules/zypper_repository_info.py

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

* removing irrelevant return fields from the sample

* Quoting the line with the colon

* fixing syntax errors in sam

* removing duplicate Note section

* Removing newline on sample-code

* Update version_added to 9.5.0

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

* Update description (notespelling)

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

* Update .github/BOTMETA.yml

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

* Update descriptino (notespelling URL)

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

* use module_utils.deps to include the parseString/parseXML module

* clean up module and botmeta

cleanup:
* remove duplicate entry from botmeta
* move imports below DOCUMENTATION
* remove unused imports
* add required key 'returned'

* moving import and fixing syntax

In this documentation example the return type is dict instead of dictionary: https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#return-block
Also the from __future__ import should be at the beginning of the file, according to lint

* Enabling check-mode

because the module doesn't change anything anyways

* indicate empty dictionary

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

* Update version_added

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-10-12 10:05:34 +02:00
alexander 3de4682193
krb_ticket: Create module (#8953)
* Add kutils module

* PR Fixes

* PR Fixes 2

* PR Fixes

* Fix executables

* Fix comment

* Fix functions

* PR Fix

* PR Fix 2

* Fix list name

* Fix list name 2

* Rever check_for_none func

* Rever check_for_none func 2

* Update tests

* Update tests 2

* Fix principal

* Fix cmdrunner args

* Fix multiline

* Fix backslash

* Fix tests

* Fix elif

* Fix bool arg

* Update doc

* Fix doc

* Add man reference

* Fix doc YAML-quoting

* PR Fixes

* Fix indent

* Fix version_added and name

* Fix units name

* Fix module name
2024-10-10 22:03:30 +02:00
Felix Fontein ec6496024f
Prepare 10.0.0 release (#8921)
* Bump version to 10.0.0, remove deprecated modules and plugins.

* Remove redhat module utils.

* Drop support for ansible-core 2.13 and ansible-core 2.14.
2024-10-07 23:37:44 +02:00
alexander 1d86d49688
ipa_getkeytab: Create module (#8938)
* Add ipa_getkeytab

* Parameters fix

* PR fixes

* PR fixes 2

* Fix unit tests

* Fix doc and unit tests

* Fix doc

* Fix doc 2

* Fix doc 3

* PR fixes

* PR fixes 2

* Fix name

* Fix description typo

* Fix variable names

* Update tests

* Add man reference
2024-10-07 22:12:06 +02:00
Alexei Znamensky c4e2b73193
cmd_runner_fmt: refactor out to its own file (#8964)
* cmd_runner_fmt: refactor out to its own file

* add new file to BOTMETA.yml

* add changelog frag
2024-10-02 21:24:24 +03:00
Felix Fontein bc6ae849b3
Move ansible-core 2.15 tests to EOL tests (#8933)
Move ansible-core 2.15 tests to EOL tests.
2024-09-26 12:14:09 +03:00
Alexei Znamensky e4472b322b
pipx/pipx_info: refactor doc fragment (#8859)
* pipx/pipx_info: refactor doc fragment

* pipx/pipx_info: refactor common options to module_utils
2024-09-14 09:27:12 +02:00
Eike Waldt 529af4984c
keycloak_userprofile: new module (#8651)
keycloak_userprofile: new keycloak module to manage user profiles (#8651)
2024-09-09 13:51:07 +02:00
alexander d9b0c42f5f
Add one_vnet module (#8769)
* Add one_vnet module

* Add one_vnet integration tests

* Update BOTMETA.yml

* Update aliases

---------

Co-authored-by: Александр Бакановский <abakanovskii@astralinux.ru>
2024-09-08 14:24:33 +02:00
Alexei Znamensky e3a3c6d58f
ModuleHelper guide (#8771)
* initial commit

* fix initial version

* add quickstart and high-level outline

* MH guide progress

* MH guide progress (up to params,vars,output)

* adjustments

* MH guide progress (up to handling changes)

* MH guide progress (up to Exceptions)

* typo

* change section from note to important

* MH guide progress (added StateModuleHelper)

* minor improvement

* MH guide progress (added decorators)

* typo

* minor adjustments

* remove line

* complete MH guide

* adjustments

* adjustments

* change paragraph into seealso

* rearrange sections, plus wordsmithing

* adjustments

* wordsmithing

* fix references
2024-08-21 17:52:30 +02:00
Kit Ham 2963004991
homebrew: Add support for services functions (#8329)
* Homebrew: Add support for services functions

Fixes #8286.
Add a homebrew.services module for starting and stopping services
that are attached to homebrew packages.

* Address python version compatibility

* Addressing reviewer comments

* Addressing sanity logs

* Address str format issues

* Fixing Python 2.7 syntax issues

* Test alias, BOTMETA, grammar

* Attempt to fix brew in tests

* Address comments by russoz

* Fixing more dumb typos

* Actually uninstall black

* Update version_added in plugins/modules/homebrew_services.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-08-01 17:11:23 +02:00
Thomas Bach 229ed6dad9
Add a keycloak module to query keys metadata (#8605)
* feat(keycloak): module to query keys metadata

* chore: add thomasbach-dev as maintainer in team_keycloak

* test: adding a unit test for keycloak_real_keys_metadata_info module

* fixup! feat(keycloak): module to query keys metadata
2024-08-01 17:10:11 +02:00
Ryan Cook 1a8f172186
Introduce bootc functionality (#8606)
* introduce bootc functionality

Signed-off-by: Ryan Cook <rcook@redhat.com>

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

* fix of test

Signed-off-by: Ryan Cook <rcook@redhat.com>

* switch stdout var

Signed-off-by: Ryan Cook <rcook@redhat.com>

* Feedback on NOTE format

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

* addition of trailing comma

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

* addition of trailing comma

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

* incorporating feedback from russoz

Signed-off-by: Ryan Cook <rcook@redhat.com>

* error in stdout

Signed-off-by: Ryan Cook <rcook@redhat.com>

* proper rc checking and status

Signed-off-by: Ryan Cook <rcook@redhat.com>

* linting

Signed-off-by: Ryan Cook <rcook@redhat.com>

* Update version

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

---------

Signed-off-by: Ryan Cook <rcook@redhat.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-07-27 09:37:14 +02:00
Vladimir Botka 8990f97b45
New Plugins #8594 (#8595)
* Implement #8594

* Fix lint and BOTMETA entries.

* Fix BOTMETA

* Consolidate argument check, code simplification, and formatting. Remove test vars.

* Fix lint.

* retrigger checks

* Update plugins/plugin_utils/ansible_type.py

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

* Update plugins/test/ansible_type.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-07-13 13:32:36 +02:00
Alexei Znamensky b0797d329c
CmdRunner guide (#8592)
* initial commit

* wip

* WIP

* progressing

* remove copied part

* progressing

* document as_func()

* complete docs about arg formatting

* add PythonRunner documentation

* fix markup

* improve markup

* multiple changes

- revamp the cmd_runner_fmt doc
- add CmdRunner instance and context parameters
- changed formatting of other blocks

* fix typo + reduce tables sizes

* improve text

* fixes and adjustments

* fix sanity

* fix version added
2024-07-08 09:45:24 +02:00
dependabot[bot] 45972c23d4
Bump fsfe/reuse-action from 3 to 4 (#8596)
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 3 to 4.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 09:11:18 +02:00
Vladimir Botka caecb2297f
Feature. Add chapter 'Lists of dictionaries' to docsite (#8482)
* Feature. Add chapter 'Lists of dictionaries'

* Fix copyright and licensing.

* Add maintainers for docsite chapter 'Lists of dictionaries'.

* Generate docs keep_keys and remove_keys

* Update integration tests of keep_keys and remove_keys
* Update docs helpers of keep_keys and remove_keys

* Fix copyright and licensing.

* Fix remove license from templates. Cleanup.

* Add docs helper replace_keys

* Update integration test filter_replace_keys
* Generate and update:
  filter_guide-abstract_informations-lists_of_dictionaries-replace_keys.rst

* Formatting improved.

* Fix results Jinja quotation marks.

* Update docs/docsite/helper/keep_keys/filter_guide-abstract_informations-lists_of_dictionaries-keep_keys.rst.j2

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

* Update docs/docsite/helper/keep_keys/filter_guide-abstract_informations-lists_of_dictionaries-keep_keys.rst.j2

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

* Fix references.

* Updated helpers.

* Fix licenses. Simplified templates.

* Fix licenses.

* Fix README.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-07-05 08:42:35 +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
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
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
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
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
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
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
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
kurokobo bb73f28bf5
feat: implement timestamp callback plugin to show simple timestamp for each header (#8308)
* feat: add community.general.timestamp callback plugin

* feat: add minimal integration tests for timestamp callback plugin

* feat: add maintainers for timestamp callback plugin

* fix: correct license

* fix: remove type annotation for the older python environment

* fix: remove unnecessary comment

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

* fix: add trailing period

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

* fix: split long description into list

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

* fix: remove default and add type

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

* fix; add type

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

* fix: split long description into list

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

* fix: improve description for format_string to describe usable format codes

* fix: clarify the original codes and add copyright from that

* fix: shorten long lines

* fix: correct link format

* fix: add seealso section

* fix: add ignore entries for EOL CI

* fix: update seealso to correctly associate with related plugin

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-18 15:41:34 +02:00
Alexei Znamensky 1ac94b5f44
Initial commit for django modutils and django_command module (#8349)
* Initial commit for django modutils and django_command module

* Fixed sanity, param settings required

* add stdout, stderr and cmd to django module output

* add examples and return docs to djando_command module

* multiple minor adjustments

* fix typo

* Update plugins/modules/django_command.py

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

* Update plugins/modules/django_command.py

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

* Update plugins/modules/django_command.py

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

* move note to seealso

* add xfailing test

* Update plugins/doc_fragments/django.py

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

* Update plugins/doc_fragments/django.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-15 18:51:42 +02:00