stack-kicker 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/stack-kicker/version.rb +1 -1
- data/lib/stack.rb +5 -3
- metadata +1 -1
data/lib/stack-kicker/version.rb
CHANGED
data/lib/stack.rb
CHANGED
@@ -482,10 +482,12 @@ cookbook_path [ '<%=config[:stackhome]%>/cookbooks' ]
|
|
482
482
|
end
|
483
483
|
|
484
484
|
def Stack.get_public_ip(config, hostname)
|
485
|
+
Logger.debug { "Stack.get_public_ip getting public IP for #{hostname}" }
|
485
486
|
# get a public address from the instance
|
486
487
|
# (could be either the dynamic or one of our floating IPs
|
487
488
|
config[:all_instances][hostname][:addresses].each do |address|
|
488
489
|
if address.label == 'public'
|
490
|
+
Logger.debug { "public IP for #{hostname} is #{address.address}" }
|
489
491
|
return address.address
|
490
492
|
end
|
491
493
|
end
|
@@ -823,11 +825,11 @@ cookbook_path [ '<%=config[:stackhome]%>/cookbooks' ]
|
|
823
825
|
|
824
826
|
# replace any tokens in the argument
|
825
827
|
public_ip = Stack.get_public_ip(config, hostname)
|
826
|
-
role_details[:post_install_args].sub
|
828
|
+
post_install_args = role_details[:post_install_args].sub(%q!%PUBLIC_IP%!, public_ip)
|
827
829
|
|
828
830
|
# we system this, so that the script can give live feed back
|
829
|
-
Logger.info "Executing '#{post_install_script_abs} #{
|
830
|
-
system("cd #{post_install_cwd_abs} ; #{post_install_script_abs} #{
|
831
|
+
Logger.info "Executing '#{post_install_script_abs} #{post_install_args]}' in #{post_install_cwd_abs} as the post_install_script"
|
832
|
+
system("cd #{post_install_cwd_abs} ; #{post_install_script_abs} #{post_install_args]}")
|
831
833
|
end
|
832
834
|
else
|
833
835
|
Logger.info "Skipped role #{role}"
|