Sha256: 206e437a1b8110bbcb710ffa38d3bf1468fb4f8f30f860eb6943e21f40480deb

Contents?: true

Size: 723 Bytes

Versions: 2

Compression:

Stored size: 723 Bytes

Contents

require 'vagrant-boxen/base_module'

module Vagrant::Boxen::Modules
  class Redis
    module Config
      def redis(options = nil, &options_block)
        enable_module Redis.new(options, &options_block)
      end
    end

    include Vagrant::Boxen::BaseModule

    def initialize(options = nil, &options_block)
      options = build_options([:memory, :port], options, &options_block)
      @options = {
        :redis_max_memory => options.fetch(:memory, '5mb'),
        :redis_port       => options[:port]
      }
    end

    def build_manifest
      "class { 'redis': #{puppet_options}}"
    end
  end
end

Vagrant::Boxen::Provisioner.config_class.instance_eval do
  include Vagrant::Boxen::Modules::Redis::Config
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-boxen-0.0.4 lib/vagrant-boxen/modules/redis.rb
vagrant-boxen-0.0.3 lib/vagrant-boxen/modules/redis.rb