def index_template_exists(name, hosts=None, profile=None):
 es = _get_instance(hosts, profile)
 try:
  if es.indices.exists_template(name=name):
   return True
  else:
   return False
 except elasticsearch.exceptions.NotFoundError:
  return None
 return None

def index_template_exists ( name , hosts = None , profile = None ) : es = _get_instance ( hosts , profile ) try : if es . indices . exists_template ( name = name ) : return True else : return False except elasticsearch . exceptions . NotFoundError : return None return None
return a boolean indicating whether given index template exists cli example:: salt myminion elasticsearch .