lib/stack.rb in stack-kicker-0.0.9 vs lib/stack.rb in stack-kicker-0.0.10
- old
+ new
@@ -383,12 +383,13 @@
if role_details[:security_group].nil?
role_details[:security_group] = role.to_s
end
# default to execing post install scripts in stackhome is a cwd wasn't set
+ # (cwd is calculated relative to stackhome)
if role_details[:post_install_cwd].nil?
- role_details[:post_install_cwd] = config[:stackhome]
+ role_details[:post_install_cwd] = '/.'
end
(1..role_details[:count]).each do |p|
Logger.debug { "Populating the config[:role_details][:azs] array with AZ" }
role_details[:azs] = Array.new if role_details[:azs].nil?
@@ -747,10 +748,10 @@
# refresh the secgroups ASAP
Stack.secgroup_sync(config)
# run any post-install scripts, these are run from the current host, not the nodes
if role_details[:post_install_script]
- Logger.debug { "This role has a post-install script (#{role_details[:post_install_script]}, preparing to run" }
+ Logger.debug { "This role has a post-install script (#{role_details[:post_install_script]}), preparing to run" }
# convert when we got passed to an absolute path
post_install_script_abs = File.realpath(config[:stackhome] + '/' + role_details[:post_install_script])
post_install_cwd_abs = File.realpath(config[:stackhome] + '/' + role_details[:post_install_cwd])
# replace any tokens in the argument