Skip to content

Commit

Permalink
add new spec param #2275 (#2276)
Browse files Browse the repository at this point in the history
SUMMARY
Add new customization spec param
https://dp-downloads.broadcom.com/api-content/apis/API_VWSA_001/8.0U3/html/ReferenceGuides/vim.vm.customization.Identification.html
Fixes #2275
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
vmware_guest

Reviewed-by: Mario Lenz <[email protected]>
  • Loading branch information
ihumster authored Jan 12, 2025
1 parent 569d77c commit 9b138fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
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 @@ -2360,6 +2366,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 @@ -3522,6 +3531,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

0 comments on commit 9b138fe

Please sign in to comment.