Truncation of Windows host name
I know this has already been asked but can the hostname length be increased? We are seeing truncation at 12 characters. Can the >= 12 at least be changed to > 12?
# Truncates the length of `:vm_hostname` to 12 characters for
# Windows-based operating systems.
#
# @api private
def finalize_vm_hostname!
string = config[:vm_hostname]
if windows_os? && string.is_a?(String) && string.size >= 12
config[:vm_hostname] = "#{string[0...10]}-#{string[-1]}"
end
end
Thanks
Matt
As https://github.com/test-kitchen/kitchen-vagrant/issues/333 the max is still 15, happy to review a PR for this one but at best anyone is only ever getting 15 cause that's all that is supported.
Thank you. I may open a PR for this. My 12 character hostname always ends up like this
hostname12-4 (where - should be 3)
We're happy to look at it but the deeper question might be "why does it matter?" Probably just use a shorter hostname.
We base a lot of builds off of the hostname. I know that isn't the best idea but at the moment, its what we got. Each character specifies where and what it is. All lower level environment boxes are exactly 12 characters.