Last active
November 9, 2016 01:31
-
-
Save smuthali/d628a7162f367b57a269b5fdeb354146 to your computer and use it in GitHub Desktop.
Zookeeper myid template
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
{{- $myid_counter := key "zk/zkcounter" | parseInt -}} | |
{{- range $i, $services := service "zookeeper" -}} | |
{{- with node -}} | |
{{- if eq $services.Node .Node.Node -}} | |
{{- $myid_counter | add $i -}} | |
{{- end -}} | |
{{- end -}} | |
{{ end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment