Sha256: 4821a6a8331ca1b5c4b33ee9568cb0fa3d7f8632192c9a0f5f88c74fa829cf08

Contents?: true

Size: 1.53 KB

Versions: 18

Compression:

Stored size: 1.53 KB

Contents

# -*- mode: ruby -*-
# vi: set ft=ruby :
<%if(options['provider'].eql?('openstack')) -%>
require 'vagrant-openstack-provider'
<%end -%>

Vagrant.configure("2") do |config|

  config.vm.define :<%=name%> do |node|
<%if(options['provider'].eql?('virtualbox')) -%>
    bridge = ENV['VAGRANT_BRIDGE']
    bridge ||= 'eth0'
<%end -%>

    env  = ENV['PUPPET_ENV']
    env ||= 'dev'

<%if(options['box_url']) -%>
    <%="node.vm.box_url = '#{options['box_url']}'" -%> 
<%end -%>
<%if(options['provider'].eql?('virtualbox')) -%>
    node.vm.box = '<%=box%>' 
    node.vm.network :public_network, :bridge => bridge
    node.vm.hostname = '<%=name%>.local'
  
    node.vm.provider :virtualbox do |vb|
      vb.customize ['modifyvm', :id, '--memory', 2048, '--cpus', 2]
    end
<%elsif(options['provider'].eql?('openstack')) -%>
    node.vm.box       = 'openstack'
    node.ssh.username = 'ubuntu'

    node.vm.provider :openstack do |os|
      os.openstack_auth_url = 'http://hostname/tokens'
      os.username           = config.configuration.os_username
      os.password           = config.configuration.os_password
      os.tenant_name        = ''
      os.flavor             = 'm1.small'
      os.image              = ''
      os.floating_ip_pool   = ''
    end
    <%end -%>

    node.vm.provision :puppet do |puppet|
      puppet.manifests_path = 'manifests'
      puppet.manifest_file  = 'default.pp'
      puppet.options = "--modulepath=/vagrant/modules:/vagrant/static-modules --hiera_config /vagrant/hiera_vagrant.yaml --environment=#{env}"
    end
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
opskeleton-0.9.9 templates/puppet/vagrant.erb
opskeleton-0.9.8 templates/puppet/vagrant.erb
opskeleton-0.9.7 templates/puppet/vagrant.erb
opskeleton-0.9.6 templates/puppet/vagrant.erb
opskeleton-0.9.5 templates/puppet/vagrant.erb
opskeleton-0.9.4 templates/puppet/vagrant.erb
opskeleton-0.9.3 templates/puppet/vagrant.erb
opskeleton-0.9.2 templates/puppet/vagrant.erb
opskeleton-0.9.1 templates/puppet/vagrant.erb
opskeleton-0.9.0 templates/puppet/vagrant.erb
opskeleton-0.8.12 templates/puppet/vagrant.erb
opskeleton-0.8.11 templates/puppet/vagrant.erb
opskeleton-0.8.10 templates/puppet/vagrant.erb
opskeleton-0.8.9 templates/puppet/vagrant.erb
opskeleton-0.8.8 templates/puppet/vagrant.erb
opskeleton-0.8.7 templates/puppet/vagrant.erb
opskeleton-0.8.6 templates/puppet/vagrant.erb
opskeleton-0.8.5 templates/puppet/vagrant.erb