-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
53 lines (41 loc) · 1.5 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*- 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.configure(VAGRANTFILE_API_VERSION) do |config|
# use a centos 7 box
config.vm.box = "bento/centos-7.2"
# set the hostname
config.vm.hostname = "centos7"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", type: "dhcp"
config.vm.provider "virtualbox" do |vb|
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
# don't run guest update
if Vagrant.has_plugin?('vagrant-vbguest')
config.vbguest.auto_update = false
end
# install puppet with ansible :facepalm:
config.vm.provision "ansible", run: "once" do |ansible|
ansible.playbook = "vagrant/playbook.yml"
end
# provision with puppet
config.vm.provision "puppet" do |puppet|
# allow custom args
puppet.options = [ENV.fetch("PUPPET_ARGS", ""), "--parser future"].join(" ")
# setup hiera
puppet.hiera_config_path = "hiera.yml"
puppet.working_directory = "/vagrant"
# setup manifest path
puppet.manifests_path = "manifests"
puppet.manifest_file = "default.pp"
# setup module path
puppet.module_path = "modules"
# define custom facts
puppet.facter = {
}
end
end