mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
fix PR#39410
if opts['name'] doesn't contain a .DOMAIN.TLD, this will fail to unpack 2 values
This commit is contained in:
parent
6faa03431b
commit
cd1cf1fb02
@ -2570,8 +2570,8 @@ def create(vm_):
|
||||
global_ip = vim.vm.customization.GlobalIPSettings()
|
||||
if 'dns_servers' in list(vm_.keys()):
|
||||
global_ip.dnsServerList = vm_['dns_servers']
|
||||
hostName, domainName = split(r'[^\w-]', vm_name, maxsplit=1)
|
||||
domainName = domainName.split('.', maxsplit=1)[-1]
|
||||
hostName = split(r'[^\w-]', vm_name, maxsplit=1)[0]
|
||||
domainName = vm_name.split('.', maxsplit=1)[-1]
|
||||
if 'Windows' not in object_ref.config.guestFullName:
|
||||
identity = vim.vm.customization.LinuxPrep()
|
||||
identity.hostName = vim.vm.customization.FixedName(name=hostName)
|
||||
|
Loading…
Reference in New Issue
Block a user