def index_delete(index, hosts=None, profile=None):
 es = _get_instance(hosts, profile)
 try:
  if (not index_exists(index=index)):
   return True
  else:
   result = es.indices.delete(index=index)
   if result.get('acknowledged', False):
    return True
 except elasticsearch.exceptions.NotFoundError:
  return None
 return None

def index_delete ( index , hosts = None , profile = None ) : es = _get_instance ( hosts , profile ) try : if ( not index_exists ( index = index ) ) : return True else : result = es . indices . delete ( index = index ) if result . get ( 'acknowledged' , False ) : return True except elasticsearch . exceptions . NotFoundError : return None return None
delete an index cli example:: salt myminion elasticsearch .