Created
May 1, 2017 05:29
-
-
Save sidarta-luizalabs/7c0668e1f164c1983b4e47e1d74ecc5f to your computer and use it in GitHub Desktop.
lxc-update-etc-hosts
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
lxc list --format=json | jq -r '.[]| select(.status=="Running").state.network.eth0.addresses[0].address + " " + select(.status=="Running").name' | sudo tee -a /etc/hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment