Open bucklo opened 3 years ago
Files identified in the description:
plugins/modules/vmware_object_role_permission.py
](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/vmware_object_role_permission.py)If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @Akasurde @Tomorrow9 @goneri @kryptsi @lparkes @pgbidkar @vmwjoseph @warthog9 click here for bot help
@bucklo Thanks for reporting this. vmware_object_role_permission
module does not have logic to search subfolder / nested folders.
There are two ways to solve this
@mariolenz @goneri @sky-joker @Tomorrow9 What do you think is a good strategy over here?
@Akasurde
umm...
I wonder if No1 is better easy for people to understand?
If No2, will you feel like adding a moid parameter to the module?
- name: example
vmware_object_role_permission:
(snip)
object_moid: "{{ moid }}"
(snip)
Finding a folder bit cumbersome in my opinion (no 1). I like the idea of using vmware_folder_info
to get moid and applying that in vmware_object_role_permission.
Finding a folder bit cumbersome in my opinion (no 1). I like the idea of using vmware_folder_info to get moid and applying that in vmware_object_role_permission.
Okay, I agree with you.
I just ran into this same issue. I have 3 folders with the same name buried in various subfolders and with the current module I can't control which one it modified permissions on.
I see a PR to add in a moid parameter which would work, or if we could add a folder path that would be more readable, such as: object_name: Windows_Servers\Site1\AD
SUMMARY
vmware_object_role_permission is unable to find specified VM subfolders. I have a VM catalog structure similar to the following:
The parent folders prod and test works as expected but I am unable to apply permissions to the subfolders. I have tried using a similar syntax to the parent_folder parameter in the vcenter_folder module.
ISSUE TYPE
COMPONENT NAME
vmware_object_role_permission
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
VMware vCenter 7.0.1 RHEL 7.9
STEPS TO REPRODUCE
When specifying the folders prod or test as following the module works as expected.
But when specifying a subfolder as following, we're unable to find the folder in question.
Output:
If I specify the subfolder name directly, for example
linux
, the result will be successfully applied to one of the subfolders, but not the other.EXPECTED RESULTS
The permissions to be applied to the specified subfolder.
ACTUAL RESULTS