Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Bug in seed_master option #97

Open
msgre opened this issue Aug 6, 2013 · 2 comments
Open

Bug in seed_master option #97

msgre opened this issue Aug 6, 2013 · 2 comments

Comments

@msgre
Copy link

msgre commented Aug 6, 2013

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
@ifnull
Copy link
Contributor

ifnull commented Sep 26, 2013

+1

@viq
Copy link

viq commented Oct 10, 2013

Please fix this. There's even a pull request for it - #98

dstrctrng pushed a commit to dstrctrng/vagrant-vbox that referenced this issue Oct 30, 2013
As per vmware-archive/salty-vagrant#98 and vmware-archive/salty-vagrant#97 the expected file name for minion is 'minion', not 'seed-minion.pub'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants