mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
pick a name for bootstrap even if not using credentials
This commit is contained in:
parent
ab4dbcb5f7
commit
2080509ef7
1 changed files with 2 additions and 1 deletions
|
@ -33,8 +33,9 @@ module Fog
|
||||||
|
|
||||||
# first or create fog_#{credential} keypair
|
# first or create fog_#{credential} keypair
|
||||||
unless server.key_pair = connection.key_pairs.get("fog_#{Fog.credential}")
|
unless server.key_pair = connection.key_pairs.get("fog_#{Fog.credential}")
|
||||||
|
name = Fog.respond_to?(:credential) && Fog.credential || :default
|
||||||
server.key_pair = connection.key_pairs.create(
|
server.key_pair = connection.key_pairs.create(
|
||||||
:name => "fog_#{Fog.credential}",
|
:name => "fog_#{name}",
|
||||||
:public_key => server.public_key
|
:public_key => server.public_key
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue