Method: TestLab::Provisioner::Shell#on_container_provision

Defined in:
lib/testlab/provisioners/shell.rb

#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.

Parameters:

Returns:

  • (Boolean)

    True if successful.



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