mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 02:18:41 -05:00
(maint) Add VMPOOLER_CONFIG environment variable to change config file
Previously there was no way to use a different configuration file when using the `./vmpooler` ruby file. This commit will use the content of the `VMPOOLER_CONFIG` environment variable, or default to `vmpooler.yaml` when loading the vmpooler configuration.
This commit is contained in:
parent
380d4bd39d
commit
48ed24a0de
1 changed files with 1 additions and 1 deletions
2
vmpooler
2
vmpooler
|
|
@ -5,7 +5,7 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
|
||||||
require 'rubygems' unless defined?(Gem)
|
require 'rubygems' unless defined?(Gem)
|
||||||
require 'lib/vmpooler'
|
require 'lib/vmpooler'
|
||||||
|
|
||||||
config = Vmpooler.config
|
config = Vmpooler.config(ENV['VMPOOLER_CONFIG'] || 'vmpooler.yaml')
|
||||||
redis_host = config[:redis]['server']
|
redis_host = config[:redis]['server']
|
||||||
logger_file = config[:config]['logfile']
|
logger_file = config[:config]['logfile']
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue