Sha256: 727e3661fc93421ad7b404922a4a682948b91ec80232ef29910c60f60b0c02aa
Contents?: true
Size: 647 Bytes
Versions: 6
Compression:
Stored size: 647 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}_#{env[:machine].name}" 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_config], env[:lxc_template_opts] ) env[:machine].id = container_name @app.call env end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems