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

2045 commits

Author SHA1 Message Date
Juan Manuel Casanova González
afeeb89af6
Improvements to the jenkins_build module and new jenkins_build_info module (#7204)
* Add detach option so the task doesn't wait until the Jenkins job is finished

* Add new time_between_checks to be able to configure the sleep time between requests

* New jenkins_build_info to get information about a specific build

* Add version_added to the new module

* Add changelog fragment for jenkins_build changes

* Fix tests that required the python-jenkins module

* Remove tests that failed

Doesn't really make sense to test that with a mock

* Fix pep8 error

* Update maintainers for the jenkins_build and jenkins_build_info modules

* Improve format and add link to PR

* Move version_added documentation to the right file

* Fix incorrect examples

* Improve text format

* Fix incorrect code style

* Fix incorrect YAML for documentation

* Add version_added documentation to the new options
2023-09-10 21:28:55 +02:00
Alexei Znamensky
517e2d48eb
cpanm: using yaml-specified unit tests (#7231)
* cpanm: using yaml-specified unit tests

* add quote around URLs to appease pyaml@py26

* add changelog frag
2023-09-10 21:24:59 +02:00
xshen1
6012d2623e
feat: pagerduty_alert: Adds in use of v2 api provided (#7183)
* feat: pagerduty_alert: Adds in use of v2 api provided

* doc: Adds xishen1 to maintainer

* Pagerduty_alert: documentation change

* pagerduty_alert: update documentation

* pagerduty_alert: update periods

* pagerduty_alert: update documentation
2023-09-10 07:41:55 +02:00
Alexei Znamensky
8fa667eeb7
CmdRunner bugfix (#7200)
* cmd_runner module utils: fix bug when passing absolute path not in standard search paths

* improved tests

* changed /usr/bin/echo to /bin/echo for the sake of alpine

* fixed error messaging for last testcase

* add condition to test cases, and remove macos from troubling ones

* fix templating

* fix templating

* exclude centos 6 from testcases copying echo to tmp dir

* try different way of specifying version

* trying trick for old jinjas

* use os.path.isabs() to determine if path is absolute

* add changelog frag

* Update plugins/module_utils/cmd_runner.py

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

* Update changelogs/fragments/7200-cmd-runner-abs-path.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-09-10 07:41:04 +02:00
Aritra Sen
568814fc3e
New module: pnpm package manager (#6741)
* (feat) New module pnpm added

A new module for pnpm is added. Necessary entries were written to
BOTMETA.yml.

* (feat) Basic tests added

* (feat) reduced nesting of ifs

* (fix) trying to fix up CI pipelines

* (fix) incorrect indentation of alias fixed

* (feat) fixed further indentations

* Apply suggestions from code review

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

* (fix) various linting and CI errors fixed/ignored

* (feat) reduced restriction, new install method

Some restrictions on OS are reduced. New installation method, similar to
the official installation method, is provided.

* (fix) ignoring CentOS 6 for CI.

* retrigger checks

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-09-08 13:15:34 +02:00
Андрей Неустроев
58d89ce442
smbios option description (#7205)
* smbios option description

More detailed description smbios option

* Update plugins/modules/proxmox_kvm.py

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

* Change map to string

* Update proxmox_kvm.py

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-09-08 13:02:23 +02:00
Андрей Неустроев
12708c3848
fix typo (#7212) 2023-09-08 13:01:56 +02:00
snail59
9021e7416d
community.general.make: (#7180)
* community.general.make:

  allows parameters without value

  closes #7178

* add changelog fragment for community.general.make

* correction: v != none -> v is not None

* update fragment changelog as per developer request

* add an example

* document the modification

* update example with comments as per maintainer request
2023-09-06 19:11:43 +02:00
Léo GATELLIER
6b17ac1f30
feat: gitlab_project module - Allow to update project default branch (#7158) 2023-09-06 19:11:11 +02:00
dsmackie
0862511e82
Ensure pritunl validate_certs is honoured in all methods (#7156)
* Ensure pritunl validate_certs is honoured in all methods

* Create changelog fragment

* Rename 7156-ensure-validate-certs-parameter-is-honoured to 7156-ensure-validate-certs-parameter-is-honoured.yml

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-09-06 19:10:49 +02:00
dsmackie
a23cd6c1d5
Update incorrect path for pritunl organization post (#7161)
* Update incorrect path for organization post

* Create changelog fragment

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-09-06 19:10:26 +02:00
Célestin Matte
9f1a9e306c
plugins/modules/apache2_module: fix typo (#7209) 2023-09-06 13:30:05 +02:00
Orion Poplawski
0c03f34f54
plugins/inventory/cobbler: Add exclude/include_mgmt_classes (#7184) 2023-09-05 18:36:12 +00:00
akatch
631d215fe8
Add unixy support for check_mode_markers (#7179)
* Add unixy support for check_mode_markers

Modifies output on playbook start, task start, and handler start when
playbook runs in check mode.

* changelog fragment

* Address feedback

* Oops
2023-09-03 17:38:46 +02:00
Léo GATELLIER
e7d8ef4cf9
gitlab_project_variable/gitlab_group_variable: Add support for 'raw' option (#7132)
feat(gitlab_project_variable): Add support for 'raw' option
2023-08-29 07:08:11 +02:00
Alexei Znamensky
4c8c25bc93
keycloak_clientscope_type: fixed example (#7162) 2023-08-29 07:02:00 +02:00
smiller248
5fcb98cd3f
redfish_info: Report Id in GetManagerInventory output (#7140) 2023-08-25 20:50:28 +02:00
Munawar
7721420388
Fix inappropriate comparison on the length of a Collection (#7125)
* Comment: Fixed inappropriate comparison on the length of a Collection. Added changlelog fragment file.

* Comment: Updated the scope of the changelog fragment based on feedback.

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-22 21:05:58 +02:00
Damien TOURDE
d1d9895eb6
minor typo on proxmox_kvm module documentation (#7135)
chore(docs): minor typo
2023-08-21 21:26:29 +02:00
TSKushal
17dce5a288
Adding 'Links' to the parameter list for data retrieved from get_disk_inventory (#6819)
* Adding 'Links' parameter to be retrieved from get_disk_inventory

* Adding changelog fragment

* Updating as per PR suggestions

* Updating to return volumes as a list of strings

* Updating code to retrieve only volumes under the Links parameter

* Updating changelog fragment

* Update changelogs/fragments/6819-redfish-utils-add-links-parameter-for-get_disk_inventory.yml

Agreed

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

---------

Co-authored-by: Kushal <t-s.kushal@hpe.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-21 21:19:53 +02:00
Brian Coca
eaf3926c2c
nmap inventory plugin, add use_arp_ping option (#7119)
* nmap inventory plugin, add use_arp_ping option

* Apply suggestions from code review

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

* Update plugins/inventory/nmap.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-20 14:21:51 +02:00
Alexei Znamensky
33998a5b70
snap: fix case when snap list is empty (#7124)
* fix case when snap list is empty

* add changelog frag
2023-08-18 07:36:06 +02:00
Scott Seekamp
6a558734f7
Add support for Redfish PowerCycle reset type (#7113)
* Add support for Redfish PowerCycle reset type

* Add changelog frament
2023-08-14 21:59:24 +02:00
Derek Schrock
55cfd27be9
freebsd: shutdown -p ... on freebsd to power off machine (#7102)
* freebsd: shutdown -p ... on freebsd to power off machine

* Use shutdown -p ... on FreeBSD such that the machine is halted and
  powered off (-p) otherwise the machine is halted (-h) but remains on.

* Update changelogs/fragments/7102-freebsd-shutdown-p.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-14 19:41:47 +02:00
Сашка724ая
bf728aadfb
chroot: add disable_root_check option (#7099)
* Initial commit

* Update plugins/connection/chroot.py

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

* Add changelog fragment

* Update changelogs/fragments/7099-chroot-disable-root-check-option.yml

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

---------

Co-authored-by: Сашка724ая <git@sashok724.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-14 19:41:33 +02:00
Alexei Znamensky
f9f5c45c94
ejabberd_user: use CmdRunner (#7075)
* ejabberd_user: use CmdRunner

* add changelog frag

* regain sanity
2023-08-13 20:55:59 +02:00
Corubba
eafdf87b1b
lxc: fix remote_addr default to inventory_hostname (#7104)
* lxc: fix remote_addr default to inventory_hostname

* Update changelogs/fragments/7104_fix_lxc_remoteaddr_default.yml

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-13 20:55:18 +02:00
Przemysław Sztoch
7496466f9d
Update chroot.py - better documentation (#7010)
* Update chroot.py

Better informations about sudo and env.

* Update plugins/connection/chroot.py

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-12 18:03:56 +02:00
Bob Mader
a0c67a8894
lvol: Fix pct of origin (#7053)
* add support for percentage of origin size for creating snapshot volumes

* add changelog fragment

* add pull request link

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

* fix what's not idempotent

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-12 09:58:12 +02:00
Alexei Znamensky
5988b9acea
npm: changed to cmdrunner (#6989)
* npm: refactor to use CmdRunner

- initial commit, not working

* better handling of parameter "production"

* add changelog frag

* fixed command call and tests

* removed extraneous commented debug code
2023-08-12 09:57:49 +02:00
Vlad Glagolev
f7176df480
sorcery: update only specified grimoires (#7091)
* sorcery: update only specified grimoires

* Update plugins/modules/sorcery.py

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

* Add a flag to omit listing new repositories before add/remove

* No need to append an empty string

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-12 09:56:56 +02:00
Pierre-yves Fontaniere
fe3eec0122
Follow DMTF redfish deprecation on StorageControllers (#7081)
* Get controller information from "Controllers" field instead of "StorageControllers" which is deprecated

* Add changelog fragment

* Changelog fragment writing guide formatting

* For consistency, get_disk_inventory and get_volume_inventory use Controllers key instead of StorageControllers to obtain controller name

---------

Co-authored-by: Pierre-yves FONTANIERE <pyf@cc.in2p3.fr>
2023-08-11 19:18:44 +02:00
simonLeary42
e75dc74613
bitwarden lookup fix get_field (#7061)
* bitwarden lookup rewrite `get_field`

* add changelog fragment

* PEP8 add newline

* Update changelogs/fragments/7061-fix-bitwarden-get_field.yml

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

---------

Co-authored-by: Simon <simonleary@umass.edu>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-11 13:22:26 +02:00
Loric Vandentempel
e7a6412ec4
Fix KeycloakAPI's missing http_agent, timeout, and validate_certs open_url() parameters (#7067)
* Fix KeycloakAPI's missing http_agent, timeout, and validate_certs open_url() parameters

* Add changelog fragment

* Update changelogs/fragments/7067-keycloak-api-paramerter-fix.yml

Following suggestion

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-11 13:21:41 +02:00
Felix Fontein
a8809401ee
Avoid direct type comparisons (#7085)
Avoid direct type comparisons.
2023-08-11 09:00:54 +02:00
Sergei Antipov
2089769ccc
[proxmox_vm_info] Return empty list when requested VM doesn't exist (#7049)
* [proxmox_vm_info] Return empty list when requested VM doesn't exist

* Update documentation

* Add changelog fragment

* Address review comments

* Allow to filter by empty name

* Update plugins/modules/proxmox_vm_info.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-09 16:12:31 +02:00
Vlad Glagolev
d74425580b
Add grimoire management to sorcery module (#7012)
* Add grimoire management to sorcery module

* Add changelog fragment

* Bump copyright year

* Separate update_cache and latest state

* Apply suggestions from code review

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

* Add note on latest state and cache_update link

* Unblock execution of multiple stages

* Update plugins/modules/sorcery.py

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

* Update Codex logic to match Sorcery

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-09 16:11:46 +02:00
desand01
91152cb123
Keycloak client secret (#6931)
* fixe missing secret at creation

* Update doc

* changelogs

* Default protocol only when creation

* Fix sanity test

* Add documentation

* Update plugins/modules/keycloak_client.py

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

---------

Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-08 13:46:01 +02:00
Christer Warén
c6393cb2ac
ipa_config: add idp choice to ipauserauthtype (#7051)
* ipa_config: add idp choice to ipauserauthtype

* ipa_config: edit ipauserauthtype description

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

* Changelog Fragment - 7051

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-07 22:01:19 +02:00
Dmitriy Usachev
4fda040e9e
ipa_config: add user and group ojectclasses parameters (#7019)
* ipa_config: add user and group ojectclasses parameters

* fix typo

* add changelog fragments and fix version_added

* fix changelog fragment permissions

* Update changelogs/fragments/7019-ipa_config-user-and-group-objectclasses.yml

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

---------

Co-authored-by: Dmitriy Usachev <dmitrii.usachev@hyperus.team>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-07 22:00:14 +02:00
Alexei Znamensky
c1f2f126cf
ejabberd_user: bug fixes + tests (#7033)
* ejabberd_user: bug fixes + tests

* fix changed property

* add license to handler file

* adjustments to test

* add needs/target/setup_epel to aliases

* further adjustments to integration tests

* add target to integration tests

* add some skips to test

* skip centos as it has no ejabberd

* skip fedora as it has no ejabberd

* discard unused epel setup

* add changelog frag

* remove ejabberd before tests

* fix typo
2023-08-07 21:59:32 +02:00
Jonathan Lung
d08924d759
Documentation to reflect newer Proxmox VE boot string format (#7036)
Co-authored-by: jonathan lung <lungj@heresjono.com>
2023-08-07 21:58:33 +02:00
TSKushal
478652843f
Adding DeleteVolumes functionality (#6814)
* Adding DeleteAllVolumes functionality

* Adding changelog fragment and sanity fix

* Sanity Fix

* Updating as per PR suggestions

* Sanity fix

* Adjust version_added.

---------

Co-authored-by: Kushal <t-s.kushal@hpe.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-05 20:16:57 +02:00
Jonathan Kamens
c7fa11d576
snap: Only treat --- as an info separator when it's preceded by newline (#7046)
* Only treat `---` as an info separator when it's preceded by newline

The code for splitting the output of `snap info` for multiple snaps
can't assume that `---` separates snaps any time it appears in the
output; it needs to treat that as the separator only when it's at the
start of a line. Otherwise it breaks if any snap uses `---` in its
description text, which, e.g., the `bw` snap does as of the date of
this commit.

Fixes #7045.

* Add changelog fragment

* Add a comment explaining why \n is necessary before ---

* Update changelogs/fragments/7046-snap-newline-before-separator.yml

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

---------

Co-authored-by: Jonathan Kamens <jik@jik5.kamens.us>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-04 07:40:40 +02:00
Alexei Znamensky
d17ec06d2a
ejabberd_user: deprecate parameter logging (#7043)
* ejabberd_user: deprecate parameter logging

* add changelog frag

* Update plugins/modules/ejabberd_user.py
2023-08-02 10:43:29 +02:00
Vincent CHARLES
a942545dd2
Rundeck - fix TypeError on 404 api response (#6983)
* fix TypeError on 404 api response

* add changelog fragment

* Update changelogs/fragments/6983-rundeck-fix-typerrror-on-404-api-response.yml

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

---------

Co-authored-by: Vincent CHARLES <vincent.charles@swatchgroup.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-31 08:37:32 +02:00
Alexei Znamensky
3a7044e2b8
ejabberd_user: better error when command not installed (#7028)
* ejabberd_user: better error when command not installed

* add changelog frag
2023-07-29 21:24:41 +02:00
Scott Seekamp
b46d5d8197
redfish_utils: Add support for "nextLink" property tag pagination (#7020)
* Add support for Redfish "nextLink" property tag pagination for
FirmwareInventory

* Add changelog fragment

* Fix indention

* Updated fragment per suggestion

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-28 21:01:10 +02:00
TeekWan
00bfc3e131
Add example for ECS Fargate/EFS Jenkins authentication (#6991)
* Add example for ECS Fargate/EFS Jenkins authentication

Since ECS Fargate is serverless, one cannot access its jenkins_home other than from a machine (EC2 for example) that actually mounts and owns its EFS storage.

That way we provide user/group of a defatul local user which has the same uid/gid 1000 as the default jenkins user inside the container and also can authenticate at Jenkins URL.

I feel this is not as straightforward from the docs and someone might benefit from such an example being present

* Added an empty line

* Float value now in single quotes

* Use UID/GID instead user/group name
2023-07-27 09:56:59 +02:00
Jeff Turner
17b4219b8b
proxmox_kvm: enable 'force' restart of vm (as documented) (#6914)
* enable 'force' restart of vm

* added changelog fragment

* Update changelogs/fragments/6914-proxmox_kvm-enable-force-restart.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-23 22:29:51 +02:00
Sergei Antipov
d7c1a814ea
[proxmox_vm_info] Re-use cluster resources API to use module without requiring node param (#6976)
* [proxmox_vm_info] Re-use cluster resources API to use module without requiring node param

* More consife if

* Fix use case when requesting all vms from specific node

* Add changelog fragment
2023-07-23 21:32:34 +02:00
Sergei Antipov
f9448574bd
[proxmox_kvm] Don't create VM if name is used without vmid (#6981)
* [proxmox_kvm] Don't create VM if name is used without vmid

* Add changelog and unit tests
2023-07-23 21:31:57 +02:00
Sergei Antipov
796ad3565e
[proxmox] Use proxmoxer_version instead of server API version (#6980)
* Use proxmoxer_version instead of server API version

* Add changelog fragment
2023-07-20 08:40:02 +02:00
Alexei Znamensky
f6714edabb
cmd_runner module utils: fix bug when argument spec has implicit type (#6968)
* cmd_runner module utils: fix bug when argument spec has implicit type

* add changelog frag
2023-07-19 22:22:54 +02:00
Felix Fontein
3ce4fe8dd8
keycloak_authz_permission*: adjust to semantic markup (#6964)
Adjust to semantic markup.
2023-07-16 14:25:10 +02:00
Samuli Seppänen
528216fd7e
Add keycloak_authz_permission module (#6321)
* Add keycloak_authz_permission module

* keycloak_authz_permission: add version_added metadata

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

* keycloak_authz_permission: assume changed=True on update operations

* keycloak_authz_permission: implement check_mode

* keycloak_authz_permission: move state queries into a dedicated  _info module

* keycloak_authz_permission: bump version_added to 7.2.0

* keycloak_authz_permission: final fixes

Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>

* Update plugins/modules/keycloak_authz_permission_info.py

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

---------

Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-16 13:55:53 +02:00
Dov Benyomin Sohacheski
8a344ea036
📝 Add missing commas to documentation (#6955) 2023-07-16 12:51:21 +02:00
Algirdas
7020b27b0a
cobbler inventory plugin: Convert unicode to str (#6923)
* plugins/inventory/cobbler: Convert unicode to str

* plugins/inventory/cobbler: Use text_type instead
2023-07-16 10:58:30 +02:00
irozet12
b818afd464
Fix key error for reverse zone (#6905) (#6906)
* Fix key error for reverse zone (#6905)

* Add changelog fragment for #6905

* Fix changelog (6905)

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-16 10:57:45 +02:00
TSKushal
c70edfa84b
Fix for get_volume_inventory (#6883)
* Fix for get_volume_inventory

* Adding changelog fragment

* Update changelogs/fragments/6883-redfish-utils-changing-variable-names-in-get-volume-inventory.yml

---------

Co-authored-by: Kushal <t-s.kushal@hpe.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-15 16:28:27 +02:00
Pino Toscano
e0324cdc90
rhsm_repository: refactor parsing of "subscription-manager repos" output (#6837)
Simplify a bit (and possibly speed it up a little) the parsing of the
output of `subscription-manager repos --list`:
- simplify skipping the lines that are not interesting: check the first
  character only, as it is enough to determine whether it contains
  repository data or not
- check the start of each line manually, rather than with regexp: a
  simple slice + lstrip() gives the same result
2023-07-15 12:57:54 +02:00
Alexei Znamensky
3a6955cbd7
locale_gen: refactor (#6903)
* locale_gen: refactor

* fix sanity

* add changelog frag
2023-07-15 12:54:53 +02:00
Alexei Znamensky
ea6fb9da8f
snap: add param "dangerous" (#6908)
* snap: add param "dangerous"

* adjusted run_command out for simple test case

* add changelog frag
2023-07-15 12:54:39 +02:00
Alexei Znamensky
70503411ee
remove noqa exceptions (#6928)
* remove noqa exceptions

* add changelog frag

* review from PR
2023-07-15 12:54:28 +02:00
Felix Fontein
24feb1dd10
machinectl become plugin: mark as require_tty (#6935)
Mark machinectl become plugin as require_tty.
2023-07-15 12:53:59 +02:00
Orion Poplawski
1c4e2d51b2
cobbler: Properly determine cobbler_ip_address (#6925)
cobbler: Properly determine cobbler_ipv4/6_address
2023-07-15 12:53:21 +02:00
Alexei Znamensky
680f3f8970
flowdock module: deprecation (#6930)
* flowdock module: deprecation

* add changelog frag
2023-07-14 20:04:02 +02:00
delinea-sagar
3e56da5371
tss lookup plugin - Fetch secret by path (#6881)
* Added support to fetch secret by path

* Fixed linting issue

* Fixed PR comments

* Chnaged description of secret path
2023-07-14 19:43:14 +02:00
Alexei Znamensky
4b382ed1df
remove pylint exceptions (#6927)
* remove pylint exceptions

* add changelog frag
2023-07-14 07:03:34 +02:00
Chih-Hsuan Yen
cc8e2d676a
Added support in nmcli for ipv4.dns-options (#6902)
* Added support for ipv4.dns_options in nmcli module

* added support for dns6-options

* Added version added

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

* added version_added: 4.6.0 for dns6 options

* added changelog fragment

* Rename 4308-added-support-in-nmcli-for-ipvx-dns-options to 4308-added-support-in-nmcli-for-ipvx-dns-options.yml

* Update changelogs/fragments/4308-added-support-in-nmcli-for-ipvx-dns-options.yml

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

* Fix and add tests

* Update PR number and version_added

---------

Co-authored-by: Matteo Caruso <m.caruso425@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-13 22:26:42 +02:00
Alexei Znamensky
065ce3a134
stackdriver: deprecate module (#6887)
* stackdriver: deprecate module

* add changelog frag

* Update changelogs/fragments/6887-deprecate-stackdrive.yml

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

* fix removal version

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-13 12:50:43 +02:00
Florian
2bf85cca51
feature(yum_versionlock): add support to pin specific package versions (#6861)
feature(yum_versionlock): add support to pin specific package versions instead of only the package itself
2023-07-12 22:23:44 +02:00
Mike Raineri
9adc82d5d1
Redfish: Added support for displaying and setting account types (#6871)
* Redfish: Added support for displaying and setting account types

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

* Update 6823-redfish-add-account-type-management.yml

* CI fixes

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

---------

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
2023-07-12 19:48:29 +02:00
Alexei Znamensky
0ae8f9d631
make: allow multiple targets to be specified (#6882)
* make: allow multiple targets to be specified

* add changelog frag

* Update changelogs/fragments/6882-make-multiple-targets.yml

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

* change to extra param

* adjust changelog frag

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-12 19:37:37 +02:00
Alexei Znamensky
7609cebae9
htpasswd: refactor (#6901)
* htpasswd: refactor

* fix variable name

* add changelog frag

* apply suggestions from PR
2023-07-12 19:37:10 +02:00
Valerio Poggi
33af903b24
Add consul_policy module from dormant PR (#6715)
Squash commits to make rebasing easier

Co-authored-by: Valerio Poggi <vrpoggigmail.com>
2023-07-12 19:27:23 +02:00
Alexei Znamensky
43dee97e43
webfaction modules: deprecation (#6909)
* webfaction modules: deprecation

* add changelog frag
2023-07-12 19:21:21 +02:00
Alexei Znamensky
d074af8d09
minor quoting fix in doc (#6904) 2023-07-11 18:28:34 +12:00
Abhijeet Kasurde
59479b4abd
chroot: added an example (#6824)
* chroot: added an example

Added a simple example of chroot connection plugin

Fixes: #6365

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

* Apply suggestions from code review

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

---------

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

* Address review comments

* Fix seealso fragment

* Update plugins/modules/proxmox_vm_info.py

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

---------

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

* make pylint happy

* minor adjustments

* rollback some test actions

* removal of user and pkgs in handlers

* add comment to note

* add changelog frag

* fix doc

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

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

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

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

* simplify pkg install in int. tests

---------

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

* refac: provider id choice

* refac: default

* fix: missing docs

* fix: ident

* fix: yaml formatting

* chore: bugfix changelog fragment

* fix: remove minor changes form current PR

* fix: missing yml extension

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

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

---------

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

* Update plugins/modules/openbsd_pkg.py

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

---------

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

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

* fix pep8 and yamllint complaints

* fix version_added, add maintainer and copyright notice

* document BWS_ACCESS_TOKEN env var and declare as required

* avoid returning nested list

* update 'value of a secret' example after f6c4492c

* update copyright notice in bitwarden_secrets_manager plugin

thx felixfontein

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

* rename classes to distinguish from existing bw plugin

* use AnsibleLookupError, formatting

* bump version_added to 7.0.0

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

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

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

* first attempt at unit tests for bws lookup

* ci fix: remove trailing newline

* attempt to fix tests object not callable error

* address formatting, tests and pyright suggestions

* reduce scope of mocked code for more real test coverage

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

* fix undefined variable 'expected_rc'

* fix mocked _run method to return correct data types

* keep list of one element for test case comparison

* bump version_added to 7.2.0

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

---------

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

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

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

* Add changelog fragment

* Changelog fragment writing guide formatting

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

---------

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

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

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

* Refactor test, add author to inactive maintainers

* Add changelog fragment and correct requirements section on module documentation

* Add changelog fragment and correct requirements section on module documentation

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

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

---------

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

* add changelog frag

* Update plugins/modules/opkg.py

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

---------

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

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

* Add changelog fragment

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

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

---------

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

* Update plugins/modules/github_key.py

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

---------

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

* add changelog frag

* fixed chglog frag

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

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

* add changelog frag

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

* add changelog frag

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

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

* Fix pep8 test

* Add changelog fragment

* Add notes about requests_toolbelt

* Check versions and file size

* Fix typo in notes

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

* Fix sanity tests

* Add proxmoxer in requirements file

* Update integration tests

* Add proxmoxer into constraints.txt

* Address review comments

* Don't run tests on 2.6 python

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

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

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

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

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

* test working with C.UTF-8

* working with locale eo

* handle C.UTF-8 edge cases

* grammatic pedantism

* add changelog frag

* add doc about specific OS support

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

* feat: minor changes fragment

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

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

---------

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

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

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

* Fix typo

* Add link to PR

* Chanel log fragment formatting changes

* Move try/catch to `restart_vm` function

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

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

---------

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

* Add changelog fragment 6770

* Update changelogs/fragments/6770-proxmox_disk_create_cdrom.yml

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

---------

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

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

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

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

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

---------

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

* Adding changelog fragment

* sanity fix

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

Agreed

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

* Updating changelog fragment

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

Agreed

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

* Updating changes as per PR comments

* PR comment changes

---------

Co-authored-by: Kushal <t-s.kushal@hpe.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-26 23:29:18 +02:00
Felix Fontein
fd63f583ef
Improve seealso (#6766)
* Improve seealso.

* Update ignore files.
2023-06-22 13:16:22 +02:00
Skrekulko
cd48e818ae
Keycloak: Authentication required actions management (#6732)
* feat: keycloak required actions

* Update plugins/modules/keycloak_authentication_required_actions.py

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

* Update plugins/modules/keycloak_authentication_required_actions.py

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

* fix: dedent

* fix: unnecessary defaults

* fix: sanity checks

* Update plugins/modules/keycloak_authentication_required_actions.py

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

* fix: ident

---------

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

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

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

* icinga2_host: fix a key error when updating a host

* Changelog fragment.

* Update changelog fragment with correct PR number.

---------

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

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

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

* Always return the original secret content

* Add changelog

* Fix changelog

* Update changelog

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

* Revert "Always return the original secret content"

This reverts commit a9fb96e165.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-20 18:23:16 +02:00
Felix Fontein
13e9e4b196
Add more semantic markup (#6744)
Add more semantic markup.
2023-06-20 08:14:02 +02:00
Pino Toscano
ffb9b6ff96
rhsm_repository: update returned "repositories" when using "purge=true" (#6676)
In case the "purge" option was enabled, the "repositories" element in
the returned JSON was not updated with the repositories disabled by that
option.
2023-06-20 07:13:47 +02:00
Pedro Dias
9642be8b19
Update Datadog downtime URL (#6735) 2023-06-19 18:01:16 +02:00
Laszlo Szomor
4871140696
lvg_rename: New module to support VG renaming (#6721)
* lvg_rename: New module to support VG renaming

* Remove vg option aliases

Fix YAML boolean case-formatting

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-19 13:11:03 +02:00
Laszlo Szomor
5d9eb8be95
filesystem: add UUID change feature (#6680)
* filesystem: add UUID change feature

* Add changelog fragment for 6680

* Do not test XFS filesystem UUID reset on FreeBSD

FreeBSD error: xfs_admin: only 'rewrite' supported on V5 fs

* Apply suggestions from code review #1

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

* Set filesystem UUID on FS creation

* Fix tests - switch to ansible.builtion.to_uuid

* Fix tests - Refactor to avoid FS remove tasks

* Fail if uuid option not yet supported for fstype

* Set resizefs and uuid options mutually exclusive

* Apply suggestions from code review no 2.

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-19 08:59:34 +02:00
Laszlo Szomor
24aeedbc15
lvg: add UUID reset and active state management feature (#6682)
* lvg: add UUID reset, rename, active switch feature

* Add changelog fragment for 6682

* Fix Sanity 2.15,devel tests

* Fix issue with LVM autoactivation

* Remove rename implementation

Add active/inactive states
Fix errors when a PV is missing

Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/lvg.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-19 08:59:02 +02:00
Sergei Antipov
fb04dc3db2
proxmox_kvm - Allow creation of VM with existing name but new vmid (#6709)
* proxmox_kvm - Allow creation of VM with existing name but new vmid

* Fix pylint and pep8 errors

* Add changelog fragment

* Move status variable outside of try block

* Add assertion for calling get_vm_node function

* Use try/catch for module_utils functions

* Update changelogs/fragments/6709-proxmox-create-vm-with-existing-name.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-19 07:01:58 +02:00
Orion Poplawski
24f27a0bdf
plugins/inventory/cobbler: Collect IP addresses for hosts and add opt… (#6711)
plugins/inventory/cobbler: Collect IP addresses for hosts and add option to collect all DNS name to IP address mappings
2023-06-19 06:53:46 +02:00
njutn95
f710a10f25
ini_file: try using inactive option before creating a new one (#6575)
* ini_file: make inactive options as active if they exist, instead of creating a new option entry

Add changelog fragment

* Update changelogs/fragments/ini_file-use-inactive-options-when-possible.yml

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

* Fix test

* Update tests

* Fix spelling

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-19 06:53:33 +02:00
Intellium
e85b008036
gitlab_group => Make most options optional (#6712)
* Make most options optional as they should be

* Add filter to create_group instead

* Remove whitespace

* Add changelog fragment

* Added description and extension to fragment

* Update changelogs/fragments/6712-gitlab_group-filtered-for-none-values.yml

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

* Update plugins/modules/gitlab_group.py

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

* Make Python 2.6 compatible.

* Another shot at compatibility.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-18 21:02:21 +02:00
Mikhail Putilov
e06a0e22f7
keycloak_client_rolemapping.py: add support for subgroups (#6687)
* keycloak_client_rolemapping.py: add support for subgroups

* Add PR number after creating a PR to 6687-support-subgroups-for-keycloak-client-rolemapping.yml

* Update changelogs/fragments/6687-support-subgroups-for-keycloak-client-rolemapping.yml

Add missing URL

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

* Update plugins/modules/keycloak_client_rolemapping.py

Set a correct version_added (previously it was a copy-paste)

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

* Update plugins/modules/keycloak_client_rolemapping.py

Fix typo after copy-paste

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

---------

Co-authored-by: Mikhail Putilov <Mikhail.Putilov@dimoco.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-18 19:49:00 +02:00
Felix Fontein
ccdcf70d69
Use semantic markup (modules t-z) (#6698)
* Use semantic markup.

* Fix escaping.
2023-06-18 19:48:01 +02:00
Dominik Haßelkuss
473e557c2f
Onepassword lookup add service accounts (#6660)
* add service account token and bypass required fields when service account token is set

* add token to base class

* add Info

* add service_account_token

* add service_account_token

* add documentation

* add service_account_token

* fix E111: indentation is not a multiple of 4

* fix lint problems

* Update plugins/lookup/onepassword_raw.py

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

* Update plugins/modules/onepassword_info.py

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

* Update plugins/lookup/onepassword.py

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

* add changelog fragment

* change type service_account_token to align to domain option

* add fragment value

* Update changelogs/fragments/6660-onepassword-lookup-service-account.yaml

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

* Update plugins/lookup/onepassword.py

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

* remove service_account_token from onepassword_info.py

* adjust V1 to raise error if service_account_token is set

* adjust V1 to raise error if service_account_token is set

* adjust V1 to raise error if service_account_token is set

* adjust if assert_logged_in

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* remove double return

* remove new line

* remove new line

* remove new line

* remove spaces

* remove new line

* remove spaces

* Update plugins/lookup/onepassword_raw.py

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

* add _check_required_params

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* remove _check_required_params

* remove spaces

* Update plugins/lookup/onepassword.py

Co-authored-by: Sam Doran <github@samdoran.com>

* remove code

---------

Co-authored-by: Jan Sagurna <jan.sagurna@sag-solutions.com>
Co-authored-by: Jan Sagurna <58932831+jansagurna@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sam Doran <github@samdoran.com>
2023-06-15 19:18:12 +02:00
Felix Fontein
eff0cb0ed9
Use semantic markup (modules r-s) (#6683)
* Use semantic markup.

* Use 'ignore:' for alias reference.

* Ignore sanity errors for older ansible-core versions.

* Improve markup for RHSM modules.

Co-authored-by: Pino Toscano <ptoscano@redhat.com>

* 'ignore:' is no longer needed.

* E() now works better.

---------

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-06-15 15:48:51 +02:00
Felix Fontein
45eb1e3915
Use semantic markup (modules o-p) (#6681)
* Use semantic markup.

* Use real option, not alias.

* E() now works better.
2023-06-15 15:48:17 +02:00
Felix Fontein
b271dba4bf
Use semantic markup (modules m-n) (#6679)
* Use semantic markup.

* Use option instead of alias.

* Simplify.

* Fix/improve nagios docs.
2023-06-15 15:47:40 +02:00
Felix Fontein
c694abbdf9
Use semantic markup (modules k-l) (#6678)
* Use semantic markup.

* Use option instead of alias.
2023-06-15 15:47:13 +02:00
Felix Fontein
3e0d84bdda
Use semantic markup (modules h-j) (#6677)
* Use semantic markup.

* Use 'ignore:' until a new version of antsibull-docs is released.

* 'ignore:' is no longer needed.

* E() now works better.
2023-06-15 15:47:00 +02:00
Felix Fontein
2ed82e0318
Use semantic markup (modules d-g) (#6672)
* Use semantic markup.

* 'ignore:' is no longer needed.

* E() now works better.
2023-06-15 15:46:44 +02:00
Felix Fontein
6fc1df9b83
Use semantic markup (modules a-c) (#6671)
* Use semantic markup.

* E() now works better.
2023-06-15 15:46:33 +02:00
Felix Fontein
7ae8cc9902
Semantic markup: use E() in more places (#6699)
Use semantic markup.
2023-06-15 09:29:30 +02:00
Gnonthgol
8801463575
plugins/modules/ldap_search: Add support for multipage searches (#6648)
* Add more integration tests for ldap_search

* Add new page_size option to ldap_search

* Add changelog fragment

* Apply suggestions from code review

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

* Simplify if statement to reduce negatives

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-15 07:19:55 +02:00
Gnonthgol
f3ecf4c7f8
ldap: Add client certificate support (#6668)
* Set up secure ldap server

* ldap: Added client cert options

Shamelessly copied from https://github.com/andrewshulgin/ldap_search

* Added tests for ldap client authentication

* Add changelog fragment

* Make sure the openssl commands work on older versions of openssl

* Apply suggestions from code review

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

* Remove aliases for new arguments

* Add required_together to ldap module declerations

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-15 07:19:29 +02:00
Alexei Znamensky
bb2169340d
csv module utils: detect unicode BOM in content (#6662)
* csv module utils: detect unicode BOM in content

* fix handling of py2

* fix comment

* add changelog frag

* add missing link

* simplification
2023-06-15 07:19:16 +02:00
Philippe Gauthier
9395df1c6f
Inspq keycloak role composites (#6469)
* Add composites to keycloak_role module

* Add composites support for realm role in keycloak module_utils

* Clean f.write from keycloak_role module

* keycloak_role support state for realm role composites

* Add support for composites in client role for keycloak_role module

* Add changelog fragment for keycloak role composites PR

* Fix pep8 and validate-modules tests errors

* Update changelogs/fragments/6469-add-composites-support-for-keycloak-role.yml

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

I will try it

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

* Fix test_keycloak_role assertion

* Fix role composite compare before update in keycloak_role module

* Fix realm problem with update_role_composites in keycloak.py module_utils

* Add units tests for composites and client roles in keycloak_role module

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Change try in is_struct_included and add unit tests for keycloak.py module_utils

* Add integration tests for composites roles and fix bug with non master roles in keycloak_role module

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/modules/keycloak_role.py

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

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* is_struct_included refactor

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-15 06:57:30 +02:00
Ondrej Zvara
9f47cdde32
New module: gitlab_merge_request.py (#6605)
* feat(gitlab_merge_request): initial module version

* feat(gitlab_merge_request): adding assignees & reviewers

* fix(gitlab_merge_request): sanity fixes

* chore(gitlab_merge_request): adding BOTMETA record

* chore(gitlab_merge_request): integration tests

* docs(gitlab_merge_request): updating modules documentation

* fix(gitlab_merge_request): proper module return values

* fix(gitlab_merge_request): remove duplicate target_branch query

* docs(gitlab_merge_request): apply improvements suggested from code review

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

* docs(gitlab_merge_request): updates to description and minor fixes based on code review

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

* chore(gitlab_merge_request): add aliases file for integration tests

* fix(gitlab_merge_request): use with syntax for IOErrors handling

Co-authored-by: Léo GATELLIER <26511053+lgatellier@users.noreply.github.com>

* fix(gitlab_merge_request): inverted message parameters

* refactor(gitlab_merge_request): use shared find_project method

* refactor(gitlab_merge_request): use username filter for user retrieval

* fix(gitlab_merge_request): handling of empty user search result

* test(gitlab_merge_request): extends integration tests suite for merge request changes

* chore(gitlab_merge_request): sanity validation & licensing fixes

* docs(gitlab_merge_request): formatting changes to documentation

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

* chore(gitlab_merge_request): licensing of test files fixed

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

* docs(gitlab_merge_request): extends description & adds code comments

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Léo GATELLIER <26511053+lgatellier@users.noreply.github.com>
2023-06-15 06:55:49 +02:00
Philippe Gauthier
032996e005
Fix composites comparison for role in is_struct_included keycloak.py … (#6688)
* Fix composites comparison for role in is_struct_included keycloak.py function

* Add changelog fragment and unit tests

* Update changelogs/fragments/6688-is-struct-included-bug-in-keycloak-py.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-14 22:34:45 +02:00
Paul Levytskyi
1f6d404deb
Proxmox inventory plugin: support composite variables (#6641)
* Added composite var support for proxmox inventory plugin

* Composite variables support for Proxmox nodes in dynamic inventory plugin
Fixes #6640

* Composite variables support for Proxmox nodes in dynamic inventory plugin
Fixes #6640

* Added composite var support for proxmox inventory plugin

* Added composite var support for proxmox inventory plugin

* Update changelogs/fragments/6640-proxmox-composite-variables-support.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-12 21:44:26 +02:00
Pino Toscano
2dbe529a90
rhsm_repository: deprecate "state=present" and "state=absent" (#6673)
"state=present" is broken, and acts like "disabled"; also, the
subscription repositories cannot be really "added" or "removed", which
is what "present" and "absent" would imply, but only enabled or
disabled. Hence, deprecate both these states, slating them for removal
in community.general 10.0.0.
2023-06-11 10:38:09 +02:00
Pino Toscano
74ffb29573
rhsm_release: improve the execution of subscription-manager (#6669)
- pass the arguments to run_command() directly as list, rather than
  joining the arguments to string, which run_command() will need to
  split again
- disable the expansions of variables, as there are none

Adapt the unit test to the different way run_command() is called,
factorizing the kwargs for run_command() so there is less repetition.

There should be no behaviour changes.
2023-06-11 08:34:25 +00:00
Alexei Znamensky
2bd8469a92
VarDict: convenience methods (#6647)
* vardict module util: add methods as_dict and get_meta

* add test for get_meta()

* update reserved named in VarDict

* add changelog frag

* add breaking change to changelog frag
2023-06-11 08:34:06 +00:00
Pino Toscano
42f7531f21
redhat_subscription: refactor of internal Rhsm class (#6658)
The two RegistrationBase & Rhsm classes were copied from the ones in the
shared module_utils.redhat module; that said:
- the versions here got improvements over the years
- the RegistrationBase in module_utils.redhat is used only by the RHN
  modules, which are deprecated and slated for removal

Hence, the classes here can be kept and simplified a bit:
- fold the non-dummy content of RegistrationBase into Rhsm: there is no
  more need for the separate RegistrationBase base class
- drop the init arguments "username", "password", and "token": the
  instance variables of them are not used anywhere, as the needed
  credentials (together with other variables) are passed to the
  register() method
- create the Rhsm object later in main(), after the AnsibleModule
  creation and the uid check: this avoids the creation of Rhsm with a
  null module variable, changing it later

There should be no behaviour change.
2023-06-10 15:03:34 +02:00
Pino Toscano
78c42def04
Deprecate module_utils.redhat (#6663)
This module contains bits that are either unused (the Rhsm* classes), or
used only by deprecated modules (the RegistrationBase class).
Considering that the bits here have not seen updates in years, it is
unlikely that anyone is actually using them as "library".

Hence, deprecate the whole module altogether:
- the Rhsm* classes, as not used by anything, are slated for removal in
  9.0.0
- the RegistrationBase class is slated for removal in 10.0.0, together
  with its only user (i.e. the rhn_register module)
2023-06-10 13:26:14 +02:00
Felix Fontein
011b2f8bdc
Start using semantic markup (#6627)
* Start using semantic markup.

* Forgot some places.

* Fix typo.

* Use 'ignore:' prefix until https://github.com/ansible-community/antsibull-docs/pull/155 is out.

* Break too long line.
2023-06-10 09:28:40 +02:00
delinea-sagar
eddd1ba4f2
Fetch secret id's which are in folder by folder id (#6652)
Added function to fetch secret id's by folder id
2023-06-09 17:14:05 +02:00