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

17 commits

Author SHA1 Message Date
Felix Fontein
b463571902
gitlab modules: do not crash if python-gitlab isn't there (#8158)
Do not crash if python-gitlab isn't there.
2024-03-29 19:10:42 +01:00
Mike Wadsten
787fa46217
fix(modules/gitlab_runner): Use correct argument to list all runners (#7790)
* fix(modules/gitlab_runner): Use correct argument to list all runners

python-gitlab 4.0.0 removed support for the `as_list=False` parameter.
This functionality is now available as `iterator=True`.

Without this change, the module actually only retrieves the first
20 results, which can lead to non-idempotent behavior, such as
registering a runner again.

* Add changelog entry (#7790)

* gitlab_runner: Check python-gitlab version when listing runners

* gitlab: Add list_all_kwargs variable to module_utils

* refactor(gitlab modules): use list_all_kwargs where it helps (#7790)

I did not change every instance of all=True or all=False, only those
which could obviously benefit from simplifying:

  * Code using `all=True` but then searching for any items that match a
    condition (no need to collect the full list).
  * Code that basically reimplements `all=True` with manual pagination.
    (These could be changed to `all=True`, but `list_all_kwargs` also
    sets per_page to 100, to gather data faster.)

* gitlab_instance_variable: Use list_all_kwargs

* Add new changelog entry for gitlab module changes (#7790)
2024-02-25 19:45:30 +01:00
Gabriele Pongelli
5c72ab34bf
New module: gitlab_label (#7657)
* gitlab project label first commit

* fixes from CI run

* fixing some sanity test

* sanity checks, removing typing

* remove default for required field

* fix indentation

* improving test set

* fixes to pass test set

* reuse compliancy

* fix sanity checks

* fix: method returns group, not project

* refactor: start adding group, test still pass

* updated module and tests to handle group labels

* update name to remove 'project'

* removing default

* typo

* generic name for returned dict

* returns also label object from library invocation

* remove unused var, updated doc

* fix output object name

* version_added

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

* Remove python 2.7

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

* Missing dot

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

* Remove version_added

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

* Remove useless doc

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

* Color is a string

* Fixes from recent PR comments.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-01-26 23:31:22 +01:00
Léo GATELLIER
4a74f46e56
refactor(gitlab modules): remove duplicate gitlab package check (#7486) 2023-11-11 12:20:12 +01:00
Léo GATELLIER
567c7d1839
feature(gitlab): add 'ca_path' option (#7472) 2023-11-05 12:20:36 +01:00
MaxBidlingmaier
fc2e6c4b45
Fixed gitlab_*_variable when using purge (#7251)
* Fixed gitlab_*_variable when using purge, see issue #7250

* Update changelogs/fragments/7251-gitlab-variables-deleteing-all-variables.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-09-20 19:37:27 +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
febe7a2fb4
gitlab modules: minor refactor (#6384)
* gitlab modules: minor refactor

* add changelog frag

* Update plugins/module_utils/gitlab.py

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

* Update plugins/module_utils/gitlab.py

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

* update changelog frag

* remove extraneous bracket

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-08 19:40:52 +02:00
Markus Bergholz
c3bc172bf6
respect new variable property in gitlab_group_variable and gitlab_project_variable (#5667)
* draft

* add changelog fragment

* rework

* rework group variables

* add new line at end of file

* Update plugins/module_utils/gitlab.py

Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>

* rename

* revert

* return a copy

* Update plugins/modules/gitlab_project_variable.py

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

Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-10 21:40:36 +01:00
Alexei Znamensky
6b463e6fa6
gitlab modules: improved imports (#5259)
* gitlab modules: improved imports

* add changelog fragment

* refactored the import check to its sole function
2022-09-12 20:30:02 +02:00
Felix Fontein
123c7efe5e
Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065)
* Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt.

* Replace 'Copyright:' with 'Copyright'

sed -i 's|Copyright:\(.*\)|Copyright\1|' $(rg -l 'Copyright:')

Co-authored-by: Maxwell G <gotmax@e.email>
2022-08-05 12:28:29 +02:00
Felix Fontein
a2f72be6c8
Prepare for distutils.version being removed in Python 3.12 (#3936)
* Prepare for distutils.version being removed in Python 2.12.

* Fix copy'n'paste error.

* Re-add Loose prefix.

* Fix Python version typos.

* Improve formulation.

* Move message into own line.

* Fix casing, now that the object is no longer called Version.
2021-12-24 17:34:48 +00:00
Josh
52ad0a5fbb
Add additional auth support to Gitlab (#705) (#3918)
* Add additional auth support to Gitlab (#705)

- removed unused imports from module_utils.gitlab
- fix bug in gitlab_project to check if avatar_path is provided

* add doc_fragment and argument_spec for gitlab auth

* doc fixes and remove avatar_path bug fix

* small doc changes, pass validate_certs to requests call

* update changelog
2021-12-20 21:59:12 +01:00
Nejc Habjan
d29aecad26
gitlab: clean up modules and utils (#3694)
* gitlab: remove dead code in module_utils

* gitlab: use snake_case consistently in methods and functions

* gitlab: use snake_case consistently in variables

* gitlab: fix pep8 indentation issues

* gitlab: add changelog fragment

* gitlab: apply suggestions from code review

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Chris Frage <git@sh0shin.org>

* gitlab: use consistent indentation

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Chris Frage <git@sh0shin.org>
2021-11-16 13:01:32 +01:00
Felix Fontein
fafabed9e6
Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877)
* Replace ansible.module_utils._text by ansible.module_utils.common.text.converters.

* Also adjust tests.
2021-06-26 23:59:11 +02:00
Abhijeet Kasurde
832dd55144
sanity: Add future boilerplate (#573)
* sanity: Add future boilerplate

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

* Module Utils

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

* Scripts

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

* sanity: Add future boilerplate

* Tests

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

* CI failure

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-06-24 21:50:36 +02:00
Ansible Core Team
aebc1b03fd Initial commit 2020-03-09 09:11:07 +00:00