Module: Toquen::Bootstrapper
- Defined in:
- lib/toquen/bootstrapper.rb
Class Method Summary collapse
Class Method Details
.generate_script(host) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/toquen/bootstrapper.rb', line 5 def self.generate_script(host) # host is available via the binding hosttype = fetch(:hosttype, 'ubuntu') path = File.("../templates/#{hosttype}_bootstrap.erb", __FILE__) raise "Bootstrap process for #{hosttype} does not exist!" unless File.exists?(path) user = fetch(:ssh_options)[:user] StringIO.new ERB.new(File.read(path)).result(binding) end |