Created
October 22, 2018 09:06
-
-
Save pkazi/3132e46946785d031320ab2f454a433f to your computer and use it in GitHub Desktop.
DCOS Get Public IP of all Public Nodes
This file contains hidden or 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
#!/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