Skip to content

Commit

Permalink
Merge pull request #81 from vulk/master
Browse files Browse the repository at this point in the history
Limit hostnames to 15 characters (for windows)
  • Loading branch information
mattray committed Sep 19, 2014
2 parents ddf28f0 + be9f6ff commit 834385e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/chef/knife/cloud/server/create_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def set_default_config
#generate a random name if chef_node_name is empty
def get_node_name(chef_node_name, prefix)
return chef_node_name unless chef_node_name.nil?
#lazy uuids
chef_node_name = "#{prefix}-"+rand.to_s.split('.')[1]
#lazy uuids, 15 chars cause windows has limits
chef_node_name = ("#{prefix}-"+rand.to_s.split('.')[1]).slice(0,14)
end

def post_connection_validations
Expand Down

0 comments on commit 834385e

Please sign in to comment.