Allow an external Redis server to be specified

This commit is contained in:
Scott Schneider 2014-02-12 10:46:14 -08:00
parent ac52d0df3e
commit b6f4b735e8
2 changed files with 17 additions and 11 deletions

View file

@ -18,6 +18,7 @@ $config = YAML.load_file(config_file)
pools = $config[:pools]
vsphere = $config[:vsphere]
redis = $config[:redis]
# Load logger library
$logger = Logger.new $config[:config]['logfile']
@ -31,9 +32,10 @@ end
# Set some defaults
$config[:config]['task_limit'] ||= 10
$config[:config]['vm_lifetime'] ||= 24
$config[:redis]['server'] ||= 'localhost'
# Connect to Redis
$redis = Redis.new
$redis = Redis.new(:host => $config[:redis]['server'])
# vSphere object
$vsphere = {}