Sha256: 0a4cde821978ca2da358ef68f9929650915eceb7e3888ae3f7cbd13155e1d2f5
Contents?: true
Size: 1.49 KB
Versions: 1
Compression:
Stored size: 1.49 KB
Contents
# -*- mode: ruby -*- # vi: set ft=ruby : <%if(options['provider'].eql?('openstack')) -%> require 'vagrant-openstack-provider' require 'yaml' AUTH = YAML.load_file("#{ENV['HOME']}/.opsk.yaml") <%end -%> Vagrant.configure("2") do |config| config.vm.define :<%=name%> do |node| bridge = ENV['VAGRANT_BRIDGE'] bridge ||= 'eth0' env = ENV['PUPPET_ENV'] env ||= 'dev' node.vm.box = '<%=box%>' <%if(options['box_url']) -%> <%="node.vm.box_url = '#{options['box_url']}'" -%> <%end -%> <%if(options['provider'].eql?('virtualbox')) -%> 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 = AUTH['user'] os.password = AUTH['pass'] 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
opskeleton-0.8.2 | templates/puppet/vagrant.erb |