class TestLab class Provisioner # APT Provisioner Error Class class AptError < ProvisionerError; end # APT Provisioner Class # # @author Zachary Patten class Apt def initialize(config={}, ui=nil) @config = (config || Hash.new) @ui = (ui || TestLab.ui) @config[:apt] ||= Hash.new @config[:apt][:install] ||= Array.new @config[:apt][:remove] ||= Array.new @ui.logger.debug { "config(#{@config.inspect})" } end # APT: Container Provision # # @param [TestLab::Container] container The container which we want to # provision. # @return [Boolean] True if successful. def on_container_provision(container) @ui.logger.debug { "APT Provisioner: Container #{container.id}" } bootstrap_template = File.join(TestLab::Provisioner.template_dir, "apt", "bootstrap.erb") container.ssh.bootstrap(ZTK::Template.render(bootstrap_template, @config)) end end end end