provisioners/salt: default bootstrap script gets latest

This commit is contained in:
Mitchell Hashimoto 2013-08-29 17:40:59 -07:00
parent 874994ff73
commit e5db091b1c
2 changed files with 6 additions and 3102 deletions

File diff suppressed because it is too large Load Diff

View File

@ -173,6 +173,7 @@ module VagrantPlugins
else
bootstrap_abs_path = Pathname.new("../bootstrap-salt.sh").expand_path(__FILE__)
end
return bootstrap_abs_path
end
@ -190,7 +191,7 @@ module VagrantPlugins
@machine.env.ui.info "Bootstrapping Salt... (this may take a while)"
end
bootstrap_path = get_bootstrap()
bootstrap_path = get_bootstrap
bootstrap_destination = File.join(config_dir, "bootstrap_salt.sh")
@machine.communicate.upload(bootstrap_path.to_s, bootstrap_destination)
@machine.communicate.sudo("chmod +x %s" % bootstrap_destination)
@ -221,53 +222,6 @@ module VagrantPlugins
end
end
# DEPRECATED
def accept_keys
if !@machine.communicate.test("which salt-key")
@machine.env.ui.info "Salt-key not installed!"
return
end
key_staged = false
keys = keys()
if keys.length > 0
@machine.env.ui.info "Minion keys registered:"
keys.each do |name|
@machine.env.ui.info " - %s" %name
end
return
end
@machine.env.ui.info "Waiting for minion key..."
attempts = 0
while !key_staged
attempts += 1
numkeys = @machine.communicate.sudo("salt-key -l pre | wc -l") do |type, rawoutput|
begin
if type == :stdout
output = Integer(rawoutput)
if output > 1
key_staged = true
end
break output
end
end
end
sleep 1
if attempts > 10
raise Salt::Errors::SaltError, "No keys staged"
end
end
if key_staged
@machine.env.ui.info "Adding %s key(s) for minion(s)" %numkeys
@machine.communicate.sudo("salt-key -A")
end
end
def call_highstate
if @config.run_highstate
@machine.env.ui.info "Calling state.highstate... (this may take a while)"