Class: Bard::Provision::MasterKey

Inherits:
Bard::Provision show all
Defined in:
lib/bard/provision/masterkey.rb

Overview

copy master key if missing

Instance Attribute Summary

Attributes inherited from Bard::Provision

#config, #ssh_url

Instance Method Summary collapse

Methods inherited from Bard::Provision

call

Instance Method Details

#callObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/bard/provision/masterkey.rb', line 6

def call
  print "Master Key:"
  if File.exist?("config/master.key")
    if !provision_server.run "[ -f config/master.key ]", quiet: true
      print " Uploading config/master.key,"
      Bard::Copy.new("config/master.key").scp_using_local(:to, provision_server)
    end
  end

  puts ""
end