In ruby script you copy preseeded keys to temporary dir with filenames like seed-#{name}.pub. Then you copy them to final directory with bash bootstrap script and leave them in "temporary" format seed-#{name}.pub. But under directories like /etc/salt/pki/master/minions/ keys must be in format #{name} (without seed- prefix and .pub extension).
Update please provisioner.rb lib or bootstrap-salt.sh script (I attached simple solution for ruby file bellow).
Thank you!
diff --git a/lib/vagrant-salt/provisioner.rb b/lib/vagrant-salt/provisioner.rb
index 2b50dd6..1291b7a 100644
--- a/lib/vagrant-salt/provisioner.rb
+++ b/lib/vagrant-salt/provisioner.rb
@@ -119,10 +119,10 @@ module VagrantPlugins
@machine.communicate.sudo("mkdir -p -m777 #{seed_dir}")
@config.seed_master.each do |name, keyfile|
sourcepath = expanded_path(keyfile).to_s
- dest = "#{seed_dir}/seed-#{name}.pub"
- @machine.communicate.upload(sourcepath, dest)
+ dest = "#{seed_dir}/#{name}"
+ @machine.communicate.upload(sourcepath, dest)
end
- options = "#{options} -k #{seed_dir}"
+ options = "#{options} -k #{seed_dir}"
end
In ruby script you copy preseeded keys to temporary dir with filenames like
seed-#{name}.pub
. Then you copy them to final directory with bash bootstrap script and leave them in "temporary" formatseed-#{name}.pub
. But under directories like/etc/salt/pki/master/minions/
keys must be in format#{name}
(withoutseed-
prefix and.pub
extension).Update please
provisioner.rb
lib orbootstrap-salt.sh
script (I attached simple solution for ruby file bellow).Thank you!