Skip to content

Instantly share code, notes, and snippets.

@arafatm
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arafatm/a7f0191de78db8b74fd9 to your computer and use it in GitHub Desktop.
Save arafatm/a7f0191de78db8b74fd9 to your computer and use it in GitHub Desktop.
vagrant puppet
Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version.
# Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
['vagrant-vbguest', 'vagrant-librarian-puppet', 'vagrant-puppet-install'].each do |plugin|
unless Vagrant.has_plugin?(plugin)
system("vagrant plugin install #{plugin}")
end
end
if ENV['OS'] =~ /_NT/ # Use smb on windows
plugin = "vagrant-winnfsd"
unless Vagrant.has_plugin?(plugin)
system("vagrant plugin install #{plugin}")
end
end
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Either use i386 or amd64 versions
config.vm.box = 'ubuntu/trusty32'
config.vm.hostname = 'vm.furahasoftware.com'
config.ssh.forward_agent = true
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
end
config.puppet_install.puppet_version = :latest
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "site.pp"
puppet.module_path = "modules"
end
# args:
# $1 clone dotfiles for this user from github
# $2 ruby version to install; one of:
# a. .ruby_version (read automatically if available)
# b. provide a ruby version here
# c. if not provided then ruby-install default ruby
# config.vm.provision :shell, :path =>
# "https://raw.githubusercontent.com/Furaha/vagrant/master/bootstrap.sh",
# :args => [ENV['USER'], '2.1.5' ],
# privileged: false
end
-------------------------------
Output on 'vagrant up'
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: Installing Puppet modules with Librarian-Puppet...
Unable to load puppet. Please install it using native packages for your platform
(eg .deb, .rpm, .dmg, etc).
puppet --version returned pid 7652 exit 1
C:/Users/arafatm/.vagrant.d/gems/gems/facter-1.7.6/lib/facter/util/config.rb:47:
in `require': cannot load such file -- win32/dir (LoadError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment