Reputation: 762
I have an environment of four VMs in Vagrant. I'm using SaltStack to automate installation and configuration of an application. One VM is a salt-master and three are salt-minions. Currently, when I install one of the minions from zero, I have to SSH to this VM, install Salt and set grains for this minion. I would like to specify these configurations in a file that will be passed to a VM during the initialization so that I won't need to SSH into a minion VM.
So here's section from Vagrantfile
for one of the minions:
config.vm.define "loadbalancer" do |loadbalancer|
loadbalancer.vm.box = "ubuntu/trusty64"
loadbalancer.vm.hostname = "loadbalancer"
loadbalancer.vm.provision :salt do |salt|
salt.minion_config = "salt/minion"
end
end
And salt/minion
file looks like this:
master: 192.168.10.10
grains:
roles:
- load-balancing
Am using the right approach for this task? When I run vagrant up
with this set-up, I get this error output:
* INFO: Running install_ubuntu_check_services()
* INFO: Running install_ubuntu_restart_daemons()
salt-minion start/running, process 9632
* INFO: Running daemons_running()
* ERROR: salt-minion was not found running
* ERROR: Failed to run daemons_running()!!!
* ERROR: salt-minion was not found running. Pass '-D' to bootstrap-salt.sh when bootstrapping for additional debugging information...
Upvotes: 0
Views: 543
Reputation: 762
Figured out that the configuration is correct. The reason why I got this error is that the salt-master had an old key for this minion. When I removed a key of a minion and recreated the minion again, I get it working as expected.
Upvotes: 0