Skip to content

Instantly share code, notes, and snippets.

@pkazi
Created October 22, 2018 09:06
Show Gist options
  • Save pkazi/3132e46946785d031320ab2f454a433f to your computer and use it in GitHub Desktop.
Save pkazi/3132e46946785d031320ab2f454a433f to your computer and use it in GitHub Desktop.
DCOS Get Public IP of all Public Nodes
#!/bin/bash
for id in $(dcos node --json | jq --raw-output '.[] | select(.attributes.public_ip == "true") | .id');
do
dcos node ssh --option StrictHostKeyChecking=no --option LogLevel=quiet --master-proxy --mesos-id=$id "curl -s ifconfig.co"
done 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment