mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Don't use .fog for vSphere credentials
This commit is contained in:
parent
5838315609
commit
882fc36521
1 changed files with 7 additions and 5 deletions
|
|
@ -9,12 +9,14 @@ class VsphereHelper
|
||||||
raise "Unable to load RbVmomi, please ensure its installed"
|
raise "Unable to load RbVmomi, please ensure its installed"
|
||||||
end
|
end
|
||||||
|
|
||||||
fog_file = File.expand_path("~/.fog")
|
Dir.chdir(File.dirname(__FILE__))
|
||||||
fog_data = YAML.load_file(fog_file)[:default]
|
|
||||||
|
|
||||||
@connection = RbVmomi::VIM.connect :host => fog_data[:vsphere_server],
|
config_file = File.expand_path('../vmware-host-pooler.yaml')
|
||||||
:user => fog_data[:vsphere_username],
|
vsphere = YAML.load_file(config_file)[:vsphere]
|
||||||
:password => fog_data[:vsphere_password],
|
|
||||||
|
@connection = RbVmomi::VIM.connect :host => vsphere['server'],
|
||||||
|
:user => vsphere['username'],
|
||||||
|
:password => vsphere['password'],
|
||||||
:insecure => true
|
:insecure => true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue