# -*- 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| config.vm.hostname = "foo.example.com" config.vm.provider "virtualbox" do |v| v.gui = false end config.vm.define "debian-10-x86_64" do |host| host.vm.box = "debian/contrib-buster64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "debian-11-x86_64" do |host| host.vm.box = "boxomatic/debian-11" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "linuxmint-18-x86_64" do |host| host.vm.box = "artem-sidorenko/mint-18.1-cinnamon" host.vm.provision "shell", inline: "apt-get update && apt-get install -y ruby ruby-dev libc6-dev" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "linuxmint-19-x86_64" do |host| host.vm.box = "ltsp/linuxmint-19.1-cinnamon-64bit" host.vm.provision "shell", inline: "export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y ruby ruby-dev libc6-dev" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "ubuntu-18.04-x86_64" do |host| host.vm.box = "ubuntu/bionic64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "ubuntu-20.04-x86_64" do |host| host.vm.box = "ubuntu/focal64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "ubuntu-21.04-x86_64" do |host| host.vm.box = "ubuntu/hirsute64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "ubuntu-21.10-x86_64" do |host| host.vm.box = "ubuntu/impish64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "centos-7-x86_64" do |host| host.vm.box = "centos/7" host.vm.network :private_network, ip: '10.0.0.2' host.vm.synced_folder ".", "/vagrant", :nfs => true host.vm.provision "shell", inline: "yum -y install ruby-devel gcc wget net-tools" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "centos-8-x86_64" do |host| host.vm.box = "centos/8" host.vm.synced_folder ".", "/vagrant" host.vm.provision "shell", inline: "dnf -y install wget make gcc net-tools" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" host.vbguest.auto_update = true end config.vm.define "almalinux-8-x86_64" do |host| host.vm.box = "almalinux/8" host.vm.synced_folder ".", "/vagrant" host.vm.provision "shell", inline: "dnf -y install wget make gcc net-tools" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "rockylinux-8-x86_64" do |host| host.vm.box = "generic/rocky8" host.vm.synced_folder ".", "/vagrant" host.vm.provision "shell", inline: "dnf -y install wget make gcc net-tools" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "redhat-8-x86_64" do |host| host.vm.box = "generic/rhel8" host.vm.synced_folder ".", "/vagrant" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "archlinux-x86_64" do |host| host.vm.box = "archlinux/archlinux" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" #host.vm.provision "shell", path: "get_facts.sh" #host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "sles-11sp1-x86_64" do |host| host.vm.box = "suse/sles11sp3" host.vm.network "private_network", ip: "192.168.123.2" host.vm.synced_folder ".", "/vagrant", type: "nfs" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "sles-12sp1-x86_64" do |host| host.vm.box = "idar/sles12sp3" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "sles-15-x86_64" do |host| host.vm.box = "trueability/sles-15-sp1" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", inline: [ "SUSEConnect -p sle-module-desktop-applications/15.1/x86_64", "SUSEConnect -p sle-module-legacy/15.1/x86_64", "zypper install --no-confirm net-tools-deprecated", ].join(' && ') host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "opensuse-12-x86_64" do |host| host.vm.box = "alexeym/opensuse-12.3" host.vm.provision "shell", inline: "zypper install -y rubygems ruby-devel make gcc" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "opensuse-13-x86_64" do |host| host.vm.box = "chef/opensuse-13.1" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "opensuse-13.2-x86_64" do |host| host.vm.box = "opensuse/openSUSE-13.2-x86_64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" end config.vm.define "opensuse-42.1-x86_64" do |host| host.vm.box = "opensuse/openSUSE-42.1-x86_64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" end config.vm.define "opensuse-42.2-x86_64" do |host| host.vm.box = "opensuse/openSUSE-42.2-x86_64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" end config.vm.define "opensuse-42.3-x86_64" do |host| host.vm.box = "opensuse/openSUSE-42.3-x86_64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" end config.vm.define "opensuse-Tumbleweed-x86_64" do |host| host.vm.box = "opensuse/openSUSE-Tumbleweed-x86_64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" end config.vm.define "opensuse-15.0-x86_64" do |host| host.vm.box = "opensuse/openSUSE-15.0-x86_64" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" end config.vm.define "freebsd-11-x86_64" do |host| host.vm.box = "bento/freebsd-11" host.vm.synced_folder ".", "/vagrant" host.vm.provision "shell", inline: "pkg install -y bash devel/ruby-gems" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -p now" end config.vm.define "freebsd-12-x86_64" do |host| host.vm.box = "bento/freebsd-12" host.vm.synced_folder ".", "/vagrant" host.vm.provision "shell", inline: "pkg install -y bash devel/ruby-gems" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -p now" end config.vm.define "freebsd-13-x86_64" do |host| host.vm.box = "bento/freebsd-13" host.vm.synced_folder ".", "/vagrant" host.vm.provision "shell", inline: "pkg install -y bash devel/ruby-gems" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -p now" end config.vm.define "gentoo-x86_64" do |host| host.vm.box = "generic/gentoo" host.vm.synced_folder ".", "/vagrant" host.vm.provision "shell", inline: "emerge-webrsync && emerge app-crypt/gnupg net-misc/curl" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "solaris-11-x86_64" do |host| host.vm.box = "http://benden.us/vagrant/solaris-11.2.box" host.ssh.insert_key = false host.vm.provision "shell", inline: "pkg info gcc || pkg install gcc" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -i S -g0 -y 'Bye' &" end config.vm.define "openbsd-6.2-x86_64" do |host| host.vm.box = "bodgit/openbsd-6.2-amd64" host.vm.network :private_network, ip: '10.0.0.2' host.vm.synced_folder ".", "/vagrant", :nfs => true host.vm.provision "shell", inline: <<-SCRIPT.gsub(/^ +/, '') . ~/.profile pkg_info -qe 'bash->=0' || pkg_add -I bash SCRIPT host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "openbsd-6.3-x86_64" do |host| host.vm.box = "bodgit/openbsd-6.3-amd64" host.vm.network :private_network, ip: '10.0.0.2' host.vm.synced_folder ".", "/vagrant", :nfs => true host.vm.provision "shell", inline: <<-SCRIPT.gsub(/^ +/, '') . ~/.profile pkg_info -qe 'bash->=0' || pkg_add -I bash SCRIPT host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "openbsd-6.4-x86_64" do |host| host.vm.box = "generic/openbsd6" host.vm.box_version = "~> 1.9.18" host.vm.network :private_network, ip: '10.0.0.2' host.vm.synced_folder ".", "/vagrant", :nfs => true host.vm.provision "shell", inline: <<-SCRIPT.gsub(/^ +/, '') . ~/.profile pkg_info -qe 'bash->=0' || pkg_add bash pkg_add facter puppet-5.5.6 ln -sf /usr/local/bin/gem24 /usr/bin/gem ln -sf /usr/local/bin/ruby24 /usr/bin/ruby SCRIPT host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "osx-10.10-x86_64" do |host| host.vm.box = "AndrewDryga/vagrant-box-osx" host.vm.network :private_network, ip: '10.0.0.2' host.vm.synced_folder ".", "/vagrant", :nfs => true host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "windows-7-x86_64" do |host| host.vm.hostname = 'foo' host.vm.box = "ferventcoder/win7pro-x64-nocm-lite" host.vm.communicator = "winrm" host.vm.guest = :windows host.vm.network :private_network, :auto_network => true host.vm.network "forwarded_port", guest: 22, host: 2200, id: "ssh", auto_correct: true host.windows.set_work_network = true host.vm.provision 'shell', path: "windows_get_facts.ps1" #host.vm.provision 'shell', inline: "Stop-Computer -AsJob" host.vm.provision 'shell', inline: "shutdown -s -f -c \"Fact Collection Complete\"" #host.vm.post_up_message = 'Note that windows machines do not automatically shutdown. You must run a \'vagrant destroy\' or \'vagrant halt\' to terminate/stop the build vm.' end config.vm.define "windows-2012r2-core-x86_64" do |host| host.vm.hostname = 'foo' host.vm.box = "windows-2012r2-core-x86_64" host.vm.communicator = "winrm" host.vm.guest = :windows host.vm.network :private_network, :auto_network => true host.vm.network "forwarded_port", guest: 22, host: 2200, id: "ssh", auto_correct: true host.windows.set_work_network = true host.vm.provision 'shell', path: "windows_get_facts.ps1" host.vm.provision 'shell', inline: "shutdown -s -f -c \"Fact Collection Complete\"" end config.vm.define "amazonlinux-2-x86_64" do |host| host.vm.box = "bento/amazonlinux-2" host.vm.provision "shell", inline: "yum -y install gcc glibc-devel" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "fedora-32-x86_64" do |host| host.vm.box = "generic/fedora32" host.vm.synced_folder ".", "/vagrant" host.vm.provision "shell", inline: "dnf -y install wget make gcc net-tools" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "fedora-33-x86_64" do |host| host.vm.box = "generic/fedora33" host.vm.synced_folder ".", "/vagrant" # there's no official support for fedora 33, so we need ruby and facter from Fedora host.vm.provision "shell", inline: "dnf -y install wget make gcc net-tools ruby ruby-devel facter" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "fedora-34-x86_64" do |host| host.vm.box = "generic/fedora34" host.vm.synced_folder ".", "/vagrant" host.vm.provision "shell", inline: "dnf -y install wget make gcc net-tools" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end config.vm.define "fedora-35-x86_64" do |host| host.vm.box = "generic/fedora35" host.vm.synced_folder ".", "/vagrant" # there's no official support for fedora 35, so we need ruby 2.7 and facter from Fedora host.vm.provision "shell", inline: "dnf -y module install ruby:2.7/default" host.vm.provision "shell", inline: "dnf -y install wget make gcc net-tools facter ruby-devel" host.vm.provision "file", source: "Gemfile", destination: "Gemfile" host.vm.provision "shell", path: "get_facts.sh" host.vm.provision "shell", inline: "/sbin/shutdown -h now" end end