This is a simple packer script to build CentOS 6 and CentOS 7 Vagrant images for testing purposes.
packer build centos.json
packer build -only=6 centos.json
packer build -only=7 centos.json
vagrant box add centos-6 centos-6
vagrant box add centos-7 centos-7
Vagrant file example if images are not registered to Vagrant (change the number with desire version):
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos-7"
config.vm.box_url = "./centos7.0.box"
end
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos-7"
end