Skip to content

Instantly share code, notes, and snippets.

@kenjiskywalker
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenjiskywalker/7e0240505127b6fb74c0 to your computer and use it in GitHub Desktop.
Save kenjiskywalker/7e0240505127b6fb74c0 to your computer and use it in GitHub Desktop.
consul-templateで全てのserviceを表示する
  • /etc/hosts.ctmpl
{{range services}}
{{range service .Name}}
{{.Address}} {{.Name}}{{end}}{{end}}
  • /etc/hosts
192.168.200.11 foo01
192.168.200.12 foo02

192.168.200.21 bar01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment