Don't YAML.load_file() twice

This commit is contained in:
Scott Schneider 2013-10-04 10:23:07 -07:00
parent c17637c8b1
commit 1464981d9b

View file

@ -16,9 +16,10 @@ Dir.chdir(File.dirname(__FILE__))
# Load the configuration file
config_file = File.expand_path('vmware-host-pooler.yaml')
config = YAML.load_file(config_file)
pools = YAML.load_file(config_file)[:pools]
vsphere = YAML.load_file(config_file)[:vsphere]
pools = config[:pools]
vsphere = config[:vsphere]
# Connect to vSphere
$vim = RbVmomi::VIM.connect(