mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
new format for rakefile (preparing to support having multiple configured accounts)
This commit is contained in:
parent
0f77090963
commit
cc1e573bdb
2 changed files with 13 additions and 7 deletions
18
Rakefile
18
Rakefile
|
@ -102,12 +102,18 @@ namespace :fog do
|
|||
desc 'Provide a sample yaml file for credentials'
|
||||
task :yml do
|
||||
puts('Copy the following sample to ~/.fog and fill in with your credentials as needed:')
|
||||
print("\n")
|
||||
print(":aws_access_key_id: INTENTIONALLY_LEFT_BLANK\n")
|
||||
print(":aws_secret_access_key: INTENTIONALLY_LEFT_BLANK\n")
|
||||
print(":rackspace_api_key: INTENTIONALLY_LEFT_BLANK\n")
|
||||
print(":rackspace_username: INTENTIONALLY_LEFT_BLANK\n")
|
||||
print("\n")
|
||||
yml = <<YML
|
||||
|
||||
:default:
|
||||
:aws:
|
||||
:aws_access_key_id: INTENTIONALLY_LEFT_BLANK
|
||||
:aws_secret_access_key: INTENTIONALLY_LEFT_BLANK
|
||||
:rackspace:
|
||||
:rackspace_api_key: INTENTIONALLY_LEFT_BLANK
|
||||
:rackspace_username: INTENTIONALLY_LEFT_BLANK
|
||||
|
||||
YML
|
||||
print(yml)
|
||||
end
|
||||
|
||||
end
|
|
@ -41,7 +41,7 @@ module Fog
|
|||
@credentials ||= begin
|
||||
credentials = {}
|
||||
File.open(path) do |file|
|
||||
credentials = YAML.load(file.read)
|
||||
credentials = YAML.load(file.read)[:default]
|
||||
end
|
||||
credentials
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue