Setup salt provisioning

This commit performs salt provisioning setup by adding salt master to
the salt VM and salt minion to all VMs. An /etc/hosts entry for the salt
master is added using a shell provisioner. No salt executions are
performed yet.
This commit is contained in:
Jan Dittberner 2017-02-18 13:29:18 +01:00
parent f373d0c639
commit d1cecfe7a8
3 changed files with 41 additions and 2 deletions

20
Vagrantfile vendored
View file

@ -6,18 +6,34 @@ Vagrant.configure("2") do |config|
config.vm.post_up_message = nil
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provision "shell",
inline: "sed -i 's/^mesg n$/tty -s \\&\\& mesg n/g' /root/.profile"
config.vm.provision "shell",
path: "scripts/add_salt_to_etc_hosts.sh"
config.vm.provision :salt do |salt|
salt.masterless = false
salt.minion_config = "salt/minion"
salt.run_highstate = false
salt.install_type = "stable"
end
config.vm.define "salt" do |node|
node.vm.hostname = "salt"
node.vm.hostname = "salt.gva.dev"
node.vm.synced_folder "repos/gvasalt/states", "/srv/salt"
node.vm.synced_folder "repos/gvasalt/pillar", "/srv/pillar"
node.vm.network "private_network", ip: "172.16.4.10"
node.vm.provider "virtualbox" do |vb|
vb.memory = "256"
end
node.vm.provision :salt do |salt|
salt.install_master = true
salt.minion_id = "salt"
end
end
config.vm.define "mq" do |node|
node.vm.hostname = "mq"
node.vm.hostname = "mq.gva.dev"
node.vm.network "private_network", ip: "172.16.4.20"
node.vm.provider "virtualbox" do |vb|
vb.memory = "256"