Module: Vagabond::Actions::Up
- Defined in:
- lib/vagabond/actions/up.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/vagabond/actions/up.rb', line 5 def included(klass) klass.class_eval do class << self def [[:auto_provision, :type => :boolean, :default => true]] end end end end |
Instance Method Details
#_up ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/vagabond/actions/up.rb', line 16 def _up name_required! if(lxc.exists?) if(lxc.running?) ui.error "Node already exists and is running: #{name}" else ui.info "#{ui.color('Vagabond:', :bold)} Starting node: #{ui.color(name, :green)}" lxc.start ui.info ui.color(' -> STARTED', :green) end else _create end do_provision if [:auto_provision] end |