Skip to content

Instantly share code, notes, and snippets.

@stefhen
Last active October 9, 2015 13:57
Show Gist options
  • Save stefhen/3518372 to your computer and use it in GitHub Desktop.
Save stefhen/3518372 to your computer and use it in GitHub Desktop.
Query deployment for tags
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
"server:uuid=#{node[:rightscale][:instance_uuid]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment