mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Don't YAML.load_file() twice
This commit is contained in:
parent
c17637c8b1
commit
1464981d9b
1 changed files with 3 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue