es.sh: fix detection of #master node
template: update and remove wrong trigger

In #es cluster, there is at most 1 master node at anytime