Sha256: c864ed4a6edc7dc40ba98b6316ab16f06fac6634f46a9807129308d1b24fc7c5

Contents?: true

Size: 703 Bytes

Versions: 10

Compression:

Stored size: 703 Bytes

Contents

module ChefLxc
  module Resource

    def container(arg=nil)
      set_or_return(:container, arg, :kind_of => [String], :required => true)
    end

    def lxc
      @lxc ||= Lxc.new(
        @container,
        :base_dir => node[:lxc][:container_directory]
      )
    end

    def path(arg=nil)
      arg ? super(arg) : lxc.expand_path(super(arg))
    end

    def self.included(base)
      base.class_eval do
        def initialize(*args)
          super
          @container = nil
        end
      end
    end
  end
end

class Chef
  class Resource
    class LxcTemplate < Template
      include ChefLxc::Resource
    end

    class LxcFile < File
      include ChefLxc::Resource
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
vagabond-0.2.8 lib/vagabond/cookbooks/lxc/libraries/lxc_expanded_resources.rb
vagabond-0.2.6 lib/vagabond/cookbooks/lxc/libraries/lxc_expanded_resources.rb
vagabond-0.2.4 lib/vagabond/cookbooks/lxc/libraries/lxc_expanded_resources.rb
vagabond-0.2.2 lib/vagabond/cookbooks/lxc/libraries/lxc_expanded_resources.rb
elecksee-1.0.2 lib/elecksee/vendor/lxc/libraries/lxc_expanded_resources.rb
elecksee-1.0.0 lib/elecksee/vendor/lxc/libraries/lxc_expanded_resources.rb
vagabond-0.2.0 lib/vagabond/cookbooks/lxc/libraries/lxc_expanded_resources.rb
vagabond-0.1.4 lib/vagabond/cookbooks/lxc/libraries/lxc_expanded_resources.rb
vagabond-0.1.2 lib/vagabond/cookbooks/lxc/libraries/lxc_expanded_resources.rb
vagabond-0.1.0 lib/vagabond/cookbooks/lxc/libraries/lxc_expanded_resources.rb