Skip to content

vmware_object_role_permission: Parameter object_name also accepts paths#2315

Open
Fleege wants to merge 8 commits into
ansible-collections:mainfrom
Fleege:main
Open

vmware_object_role_permission: Parameter object_name also accepts paths#2315
Fleege wants to merge 8 commits into
ansible-collections:mainfrom
Fleege:main

Conversation

@Fleege

@Fleege Fleege commented Feb 13, 2025

Copy link
Copy Markdown
SUMMARY

You can now pass a path as object_name to identify an object where the name is not unique

Fixes #1217 #2421

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

vmware_object_role_permission

ADDITIONAL INFORMATION

This is required if you want to use this module for objects where the name is not unique. This happened to me in a folder structure where we first had the environment type (prod/test/dev) and below this structure the service type (web/database etc.).
In this structure we had multiple folders with eg. the name database (/dev/database and /prod/database) and those folders could not be identified by their name.

@softwarefactory-project-zuul

Copy link
Copy Markdown

@Fleege Fleege marked this pull request as ready for review February 13, 2025 11:40
@mariolenz

Copy link
Copy Markdown
Collaborator

@Fleege Do you think you could come up with a good test case and add it to tests/integration/targets/vmware_object_role_permission/tasks? This would help us to avoid breaking things accidentally by future code changes.

@softwarefactory-project-zuul

Copy link
Copy Markdown

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/community.vmware for 2315,e53f67c2615efd09396b0756f993b01c6eea7042

@Fleege

Fleege commented Jun 10, 2025

Copy link
Copy Markdown
Author

Hi @mariolenz,
sorry that I forgot the checks.
I added some checks with a full path to a vm (copied the existing vm checks) hope this is enough.

The ansible/check workflow seems to fail because of an error outside of my code (Something about an already existing portgroup).

@mariolenz

Copy link
Copy Markdown
Collaborator

ERROR: changelogs/fragments/2315-vmware_object_role_permission-path-as-object_name.yml:0:0: use "\n" for line endings instead of "\r\n"

@Fleege

Fleege commented Jun 25, 2025

Copy link
Copy Markdown
Author

ERROR: changelogs/fragments/2315-vmware_object_role_permission-path-as-object_name.yml:0:0: use "\n" for line endings instead of "\r\n"

@mariolenz Sorry for this stupid mistake. This should be fixed now, but the check pipeline still fails

@Festrat1

Festrat1 commented Aug 6, 2025

Copy link
Copy Markdown

Any update on this ? Really useful feature

@Fleege

Fleege commented Aug 18, 2025

Copy link
Copy Markdown
Author

Any update on this ? Really useful feature

Sorry for the late reply, I was on vacation. I have not been looking at this PR for a while as we have a local copy of the affected module in our own collection.

I Updated my Fork the new main branch of this project, but the zuul-build still fails (now with a license error).

I think we have to wait for ansible/ansible-zuul-jobs#1916 in the zuul jobs to get the check running and afterwards this PR hopefully can get merged (@mariolenz: correct me if I am wrong).

…re seems to be related to something outside the code
@softwarefactory-project-zuul

Copy link
Copy Markdown

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/10021df6f95d4346b8d2e61ef04aaece

✔️ ansible-tox-linters SUCCESS in 5m 21s
✔️ ansible-galaxy-importer SUCCESS in 3m 27s (non-voting)
✔️ build-ansible-collection SUCCESS in 6m 39s

@willt

willt commented Oct 20, 2025

Copy link
Copy Markdown

Is there any reason why this can't get merged?

@AefflePferdle

AefflePferdle commented Apr 27, 2026

Copy link
Copy Markdown

Any updates on this? Same folder names are very common.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to use vmware_object_role_permission on multiple VM folders of the same name

6 participants