gitlab_project_members: fail when multiple projects match by name (#11851)

* gitlab_project_members: fail when multiple projects match by name

When the project parameter is a bare name (not a full path), and the
search returns more than one match, the module now fails with a clear
error asking the user to provide the full path (group/project) to
disambiguate, instead of silently operating on the first result.

Fixes #2767

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* gitlab_project_members: improve code formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* gitlab_project_members: add changelog fragment for #11851

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexei Znamensky
2026-04-17 23:48:49 +12:00
committed by GitHub
parent dad84dd36d
commit 1db3d4f441
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
bugfixes:
- gitlab_project_members - fail with a clear error when multiple projects match the given name, instead of silently operating on the first result
(https://github.com/ansible-collections/community.general/issues/2767,
https://github.com/ansible-collections/community.general/pull/11851).