Created
October 30, 2017 08:41
-
-
Save c4m4/82c9b02af02bccd8c54794a18b0f3087 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "bento/centos-7.1" | |
config.ssh.username = 'vagrant' | |
config.ssh.password = 'vagrant' | |
file_to_disk1 = "./lvm_disk.vmdk" | |
file_to_disk2 = "./lvm_disk.vmdk1" | |
file_to_disk3 = "./lvm_disk.vmdk2" | |
config.vm.define "unknown" do |node| | |
node.vm.hostname = "unknown.example.local" | |
node.vm.network "private_network", ip: "192.168.100.10" | |
node.vm.synced_folder "../elkpuppet", "/puppet" | |
node.vm.provider "virtualbox" do |vb| | |
vb.memory = 2048 | |
unless File.exist?(file_to_disk1) | |
vb.customize ['createhd', '--filename', file_to_disk1, '--size', 20 * 1024] | |
end | |
unless File.exist?(file_to_disk2) | |
vb.customize ['createhd', '--filename', file_to_disk2, '--size', 20 * 1024] | |
end | |
unless File.exist?(file_to_disk3) | |
vb.customize ['createhd', '--filename', file_to_disk3, '--size', 20 * 1024] | |
end | |
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk1] | |
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 2, '--device', 0, '--type', 'hdd', '--medium', file_to_disk2] | |
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 3, '--device', 0, '--type', 'hdd', '--medium', file_to_disk3] | |
end | |
node.vm.provision "shell" do |s| | |
s.inline = 'rpm --force -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm && yum -q -y install puppet-agent' | |
end | |
node.vm.provision "puppet" do |puppet| | |
puppet.manifests_path = "../elkpuppet/environments/dev/manifests" | |
puppet.hiera_config_path = "../elkpuppet/hiera.yaml" | |
# puppet.options = '--debug' | |
puppet.environment = 'dev' | |
puppet.environment_path = '../elkpuppet/environments' | |
puppet.manifest_file = "site.pp" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment