Skip to content

Commit

Permalink
Moved #compact to a sesparate line to make it a little more obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Light committed Dec 20, 2013
1 parent ec64ed4 commit db9e55e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/fog/rackspace/models/compute_v2/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -522,13 +522,16 @@ def change_admin_password(password)
# @see Servers#bootstrap
def setup(credentials = {})
requires :public_ip_address, :identity, :public_key, :username

commands = [
%{mkdir .ssh},
%{echo "#{public_key}" >> ~/.ssh/authorized_keys},
password_lock,
%{echo "#{Fog::JSON.encode(attributes)}" >> ~/attributes.json},
%{echo "#{Fog::JSON.encode(metadata)}" >> ~/metadata.json}
].compact
]
commands.compact

Fog::SSH.new(public_ip_address, username, credentials).run(commands)
rescue Errno::ECONNREFUSED
sleep(1)
Expand Down

0 comments on commit db9e55e

Please sign in to comment.