Unable to use vmware_object_role_permission on multiple VM folders of the same name #1217
Labels
bug
This issue/PR relates to a bug
needs_triage
Needs a first human triage before being processed.
python3
SUMMARY
ISSUE TYPE
COMPONENT NAME
vmware_object_role_permission
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
OS: macOS Monterey 12.2 / Linux Ubuntu 20.04.3 LTS (Focal Fossa)
VMware vCenter Server version: 7.0.2.00100 (Update 3b, build number 18901211)
STEPS TO REPRODUCE
I have multiple VM folders of the same names, in multiple locations in the vSphere inventory tree.
For example:
I need to assign a user/role to all
nsx_alb_service_engines
folders (in the above example, I have them under different environments, e.g.dev
andtest
), and I'm using thevmware_object_role_permission
module.Here is a minimal test-case to reproduce this issue:
You can set the
vars
for your environment, then runansible-playbook playbook.yml
to execute it.EXPECTED RESULTS
The
vmware_object_role_permission
module has theobject_name
parameter, which seems to only accept object names, and doesn't support object paths.I have also tried specifying the full paths of the folders (e.g.
/example-datacenter/vm/environments/dev/nsx_alb_service_engines
) because I know that the Terraform provider does support it, but this Ansible module doesn't seem to accept it. I got the following error message:So I tried to just specify the folder name (e.g.
nsx_alb_service_engines
) and the playbook run was successful, but the user/role was applied only to one of thensx_alb_service_engines
folders.ACTUAL RESULTS
When specifying the full paths of the folder and ran
ansible-playbook playbook.yml -vvvv
, I got:And without verbose:
When specifying the folder name (e.g.
nsx_alb_service_engines
) and runningansible-playbook playbook.yml -vvvv
, I got:And without verbose:
However, as I mentioned, using the object name, the module only handles one of those folders... I can't seem to figure out how to apply it on multiple folders.
The text was updated successfully, but these errors were encountered: