Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.8] VMware: Warn user about dvswitch permissions #58758

Merged
merged 1 commit into from
Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/58579-vmware_object_role_perm_fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Warn user about Distributed vSwitch permission in vmware_object_role_permission (https://github.com/ansible/ansible/issues/55248).
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
- Joseph Andreatta (@vmwjoseph)
notes:
- Tested on ESXi 6.5, vSphere 6.7
- Be sure that the ESXi user used for login, has the appropriate rights to administer permissions
- The ESXi login user must have the appropriate rights to administer permissions.
- Permissions for a distributed switch must be defined and managed on either the datacenter or a folder containing the switch.
requirements:
- "python >= 2.7"
- PyVmomi
Expand Down Expand Up @@ -220,6 +221,12 @@ def get_object(self):
msg="Specified object %s of type %s was not found."
% (self.params['object_name'], self.params['object_type'])
)
if self.params['object_type'] == 'DistributedVirtualSwitch':
msg = "You are applying permissions to a Distributed vSwitch. " \
"This will probably fail, since Distributed vSwitches inherits permissions " \
"from the datacenter or a folder level. " \
"Define permissions on the datacenter or the folder containing the switch."
self.module.warn(msg)


def main():
Expand Down