Last active
October 9, 2015 13:57
-
-
Save stefhen/3518372 to your computer and use it in GitHub Desktop.
Query deployment for tags
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
seed_hosts = rightscale_server_collection "seed_hosts" do | |
tags ["cassandra:seed_host=true"] | |
mandatory_tags ["server:private_ip_0"] | |
empty_ok false | |
action :nothing | |
end | |
seed_hosts.run_action(:load) | |
seed_ips = Array.new | |
if node["server_collection"]["seed_hosts"] | |
Chef::Log.info "Server collection found ..." | |
node["server_collection"]["seed_hosts"].to_hash.values.each do |tag| | |
seed_ips.push(RightScale::Utils::Helper.get_tag_value("server:private_ip_0", tag)) | |
end | |
end |
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
"server:uuid=#{node[:rightscale][:instance_uuid]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment