Sha256: 6df1db18942b04ac705bfcbb8bfb624a6bda74d685b63d632cb164c9453b51bc
Contents?: true
Size: 581 Bytes
Versions: 5
Compression:
Stored size: 581 Bytes
Contents
module Vagrant module LXC module Action class Create def initialize(app, env) @app = app end def call(env) container_name = env[:root_path].basename.to_s container_name.gsub!(/[^-a-z0-9_]/i, "") container_name << "-#{Time.now.to_i}" env[:machine].provider.driver.create( container_name, env[:lxc_template_src], env[:lxc_template_opts] ) env[:machine].id = container_name @app.call env end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems