Sha256: 32311e5fa8fd15df85b861f281a2065483ef829fe7dcde496b4162de7b744558
Contents?: true
Size: 898 Bytes
Versions: 6
Compression:
Stored size: 898 Bytes
Contents
class TestLab class Provisioner # Shell Provisioner Error Class class ShellError < ProvisionerError; end # Shell Provisioner Class # # @author Zachary Patten <zachary AT jovelabs DOT com> class Shell require 'tempfile' def initialize(config={}, ui=nil) @config = (config || Hash.new) @ui = (ui || TestLab.ui) end # Shell Provisioner Container Setup # # Renders the defined script to a temporary file on the target container # and proceeds to execute said script as root via *lxc-attach*. # # @param [TestLab::Container] container The container which we want to # provision. # @return [Boolean] True if successful. def setup(container) if !@config[:script].nil? container.bootstrap(@config[:script]) end true end end end end
Version data entries
6 entries across 6 versions & 1 rubygems