Skip to content

Instantly share code, notes, and snippets.

@jasonjckn
Created February 1, 2011 22:33
Show Gist options
  • Save jasonjckn/806859 to your computer and use it in GitHub Desktop.
Save jasonjckn/806859 to your computer and use it in GitHub Desktop.
(defn filter-by-running [nodes]
(filter #(= "RUNNING" (str (.getState %))) nodes))
(defn print-ips-for-tag! [tag-str]
(let [running-nodes (filter-by-running (nodes-with-tag tag-str aws))]
(println "TAG: " tag-str)
(println "PUBLIC: " (map primary-ip running-nodes))
(println "PRIVATE: " (map private-ip running-nodes)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment