class MotherBrain::Bootstrap::Routine::CleanRoom

@api private

Public Instance Methods

async(&block) click to toggle source

Add an array of Bootstrap::Routine::Task(s) to be executed asyncronously to the {Routine}

@example

Routine.new(...) do
  async do
    bootstrap("mysql::master")
    bootstrap("myapp::webserver")
  end
end
# File lib/mb/bootstrap/routine.rb, line 183
def async(&block)
  room = self.class.new(real_model)
  room.instance_eval(&block)

  self.task_procs.push room.task_procs
end
bootstrap(group_path) click to toggle source

Add a Bootstrap::Routine::Task for bootstrapping nodes in the given node group to the {Routine}

@example

Routine.new(...) do
  bootstrap("mysql::master")
end

@param [String] group_path

a group path
# File lib/mb/bootstrap/routine.rb, line 170
def bootstrap(group_path)
  self.task_procs.push -> { Task.from_group_path(real_model.plugin, group_path) }
end

Protected Instance Methods

task_procs() click to toggle source

@return [Array<Proc>]

# File lib/mb/bootstrap/routine.rb, line 193
def task_procs
  @task_procs ||= Array.new
end