Class: Bard::Provision::MasterKey

Inherits:
Bard::Provision show all
Defined in:
lib/bard/new/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/new/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.file "config/master.key", from: config[:local], to: provision_server
    end
  end

  puts ""
end