Skip to content

Commit

Permalink
Try to set hostname and domain customizations by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyr committed Jul 27, 2018
1 parent 5c69e38 commit 13a05b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tasks/vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@
annotation: "{{ vm.annotation | default(vmware_vm_provisioning_annotation | default(omit)) }}"
cdrom: "{{ vm.cdrom | default(vmware_vm_provisioning_cdrom | default(omit)) }}"
cluster: "{{ vm.cluster | default(vmware_vm_provisioning_cluster | default(omit)) }}"
customization: "{{ vm.customization | default(vmware_vm_provisioning_customization | default(omit)) }}"
customization: "{{
{
'hostname': vm.name.split('.')[0],
'domain': vm.name.split('.')[1:] | join('.')
} | combine(
vm.customization | default(vmware_vm_provisioning_customization | default({}))
) }}"
customization_spec: "{{ vm.customization_spec | default(vmware_vm_provisioning_customization_spec | default(omit)) }}"
customvalues: "{{ vm.customvalues | default(vmware_vm_provisioning_customvalues | default(omit)) }}"
datacenter: "{{ vm.datacenter | default(vmware_vm_provisioning_datacenter | default(omit)) }}"
Expand Down

0 comments on commit 13a05b2

Please sign in to comment.