Created
October 23, 2016 02:57
-
-
Save aodag/2cb93e8b3d2bb23a73cf2ceacdca56f1 to your computer and use it in GitHub Desktop.
lxd apiでipアドレスを取得する
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
container_name=$1 | |
lxd_endpoint=/var/lib/lxd/unix.socket | |
curl -s --unix-socket $lxd_endpoint -X GET a/1.0/containers/$container_name/state | jq '.metadata.network.eth0.addresses[] | select(.family == "inet") | .address' -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment