Created
February 10, 2017 15:11
-
-
Save sanguis/90b580794f70e008dc4cdfa3a0549e89 to your computer and use it in GitHub Desktop.
ruby mixin loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby_block "checkcontroler" do | |
block do | |
pass_codes = [200, 302, 000] | |
Chef::Mixin::Shellout.send(:include Mixin::Shellout::ShellOut) | |
retcode = "curl --insecure --silent --output /dev/null --write-out '%{http_code}' https://#{node.private_ip}" | |
until pass.include?(retcode.std_out) do | |
execute 'cfn-signal' | |
# TODO: get info on this | |
command "/opt/aws/bin/cfn-signal --success true ' - Ref: WaitHandle02" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment