Sha256: 1fc5e695cd7c5d44c2866c03c81b5dcf184cc266b086fcab0260503cf95fa5fb

Contents?: true

Size: 817 Bytes

Versions: 1

Compression:

Stored size: 817 Bytes

Contents

module VagrantPlugins::OpsWorks::Loader
  class Stack

    def initialize(app, opsworks)
      @app = app
      @opsworks = opsworks
    end

    def call(env)
      return @app.pass(env) unless @opsworks.enabled

      VagrantPlugins::OpsWorks::Loader.select_vmbox(env[:config], env[:client].stack.default_os)

      env[:config].vm.provision :shell do |s|
        s.inline = File.read(VagrantPlugins::OpsWorks.source_root.join('provisioning/install-agent.sh'))
        s.args   = [@opsworks.agent_version, @opsworks.agent_bucket, @opsworks.asset_bucket]
      end

      env[:config].vm.provision :shell do |s|
        s.inline = "DEBIAN_FRONTEND=noninteractive apt-get -qq install acl &&setfacl -m o:rw $SSH_AUTH_SOCK && setfacl -m o:x $(dirname $SSH_AUTH_SOCK)"
      end

      @app.pass(env)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-opsworks-0.0.5 lib/vagrant-opsworks/loader/stack.rb