diff --git a/.gitignore b/.gitignore index dace708..54e0741 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/.vagrant +vagrant/.vagrant diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile new file mode 100644 index 0000000..1b850e3 --- /dev/null +++ b/vagrant/Vagrantfile @@ -0,0 +1,43 @@ +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "trusty64" + config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" + + # Salt master + config.vm.define "master" do |node| + node.vm.hostname = "master" + node.vm.network :private_network, ip: "192.168.33.10" + + node.vm.synced_folder "../", "/srv/" + + # salt-master provisioning + node.vm.provision :salt do |salt| + salt.install_master = true + salt.no_minion = true + salt.run_highstate = false + end + end + + # Salt minion01 + config.vm.define "minion01" do |node| + node.vm.hostname = "minion01" + node.vm.network :private_network, ip: "192.168.33.20" + + # salt-minion provisioning + node.vm.provision :salt do |salt| + salt.minion_config = "minion" + end + end + + # Salt minion02 + config.vm.define "minion02" do |node| + node.vm.hostname = "minion02" + node.vm.network :private_network, ip: "192.168.33.30" + + # salt-minion provisioning + node.vm.provision :salt do |salt| + salt.minion_config = "minion" + end + end +end diff --git a/vagrant/minion b/vagrant/minion new file mode 100644 index 0000000..505db17 --- /dev/null +++ b/vagrant/minion @@ -0,0 +1 @@ +master: 192.168.33.10