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

add new spec param #2275 #2276

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/2275-vm-ou-customization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- vmware_guest - Add new cutomization spec param `domainOU`.
(https://github.com/ansible-collections/community.vmware/issues/2275)
10 changes: 10 additions & 0 deletions plugins/modules/vmware_guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,12 @@
description:
- List of commands to run at first user logon.
- Specific to Windows customization.
domain_ou:
type: str
description:
- The full LDAP path name of the OU to which the computer belongs.
- Specific to Windows customization.
- Work for vSphere 8.0U2 and above
type: dict
default: {}
vapp_properties:
Expand Down Expand Up @@ -2359,6 +2365,9 @@ def customize_vm(self, vm_obj):
ident.identification.domainAdminPassword.value = self.params['customization']['domainadminpassword']
ident.identification.domainAdminPassword.plainText = True

# Add new spec param for vSphere 8.0U2
ident.identification.domainOU = self.params['customization']['domain_ou']

elif self.params['customization']['joinworkgroup'] is not None:
ident.identification.joinWorkgroup = self.params['customization']['joinworkgroup']

Expand Down Expand Up @@ -3521,6 +3530,7 @@ def main():
domain=dict(type='str'),
domainadmin=dict(type='str'),
domainadminpassword=dict(type='str', no_log=True),
domain_ou=dict(type='str'),
existing_vm=dict(type='bool'),
fullname=dict(type='str'),
hostname=dict(type='str'),
Expand Down
Loading