mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 02:18:41 -05:00
Added prefix parameter to the vmpooler configuration
This commit is contained in:
parent
ad4e760f56
commit
10e507c262
3 changed files with 6 additions and 1 deletions
|
|
@ -189,7 +189,7 @@ module Vmpooler
|
|||
|
||||
# Generate a randomized hostname
|
||||
o = [('a'..'z'), ('0'..'9')].map(&:to_a).flatten
|
||||
vm['hostname'] = o[rand(25)] + (0...14).map { o[rand(o.length)] }.join
|
||||
vm['hostname'] = $config[:config]['prefix'] + o[rand(25)] + (0...14).map { o[rand(o.length)] }.join
|
||||
|
||||
# Add VM to Redis inventory ('pending' pool)
|
||||
$redis.sadd('vmpooler__pending__' + vm['template'], vm['hostname'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue