Class: TestLab::Provisioner::Shell
- Inherits:
-
Object
- Object
- TestLab::Provisioner::Shell
- Defined in:
- lib/testlab/provisioners/shell.rb
Overview
Shell Provisioner Class
Instance Method Summary collapse
-
#initialize(config = {}, ui = nil) ⇒ Shell
constructor
A new instance of Shell.
-
#on_container_provision(container) ⇒ Boolean
Shell: Container Provision.
Constructor Details
Instance Method Details
#on_container_provision(container) ⇒ Boolean
Shell: Container Provision
Renders the defined script to a temporary file on the target container and proceeds to execute said script as root via lxc-attach.
27 28 29 30 31 32 33 |
# File 'lib/testlab/provisioners/shell.rb', line 27 def on_container_provision(container) @config[:script].nil? and raise ShellError, "You must supply a script to bootstrap!" container.bootstrap(@config[:script]) true end |