# salt.states.elasticsearch_index

State module to manage Elasticsearch indices

Added in version 2015.8.0.

Deprecated since version 2017.7.0: Use elasticsearch state instead

salt.states.elasticsearch_index.absent(name)

  Ensure that the named index is absent.

  name

    Name of the index to remove

salt.states.elasticsearch_index.present(name, definition=None)

  Added in version 2015.8.0.

  Changed in version 2017.3.0: Marked `definition` as optional.

  Ensure that the named index is present.

  name

    Name of the index to add

  definition

    Optional dict for creation parameters as per https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html

  Example:

      # Default settings
      mytestindex:
        elasticsearch_index.present

      # Extra settings
      mytestindex2:
        elasticsearch_index.present:
          - definition:
              settings:
                index:
                  number_of_shards: 10