geerlingguy.elasticsearch

Ansible Role: Elasticsearch

CI

This is an Ansible Role that installs Elasticsearch on RedHat/CentOS or Debian/Ubuntu systems.

Requirements

You need at least Java 8 installed. You can use the geerlingguy.java role to install Java easily.

Role Variables

Here are the variables you can use, along with their default values (check defaults/main.yml for more):

  • elasticsearch_version: '7.x'
    This is the major version of Elasticsearch that you want to install.

  • elasticsearch_package: elasticsearch
    Keep the default if you want the latest version in the specified elasticsearch_version. Otherwise, you can specify a version like -7.13.2 for RedHat-based systems or =7.13.2 for Debian-based systems to install a specific version.

  • elasticsearch_package_state: present
    The state of the elasticsearch package; set it to latest to upgrade to the latest version.

  • elasticsearch_service_state: started

  • elasticsearch_service_enabled: true
    These control the options for the Elasticsearch service.

  • elasticsearch_network_host: localhost
    This specifies the network host for incoming connections. By default, it listens only on localhost. You can change it to a specific IP or "0.0.0.0" to listen on all interfaces. If you are setting up a standalone Elasticsearch server, you'll need to add discovery.type: single-node to elasticsearch_extra_options.

  • elasticsearch_http_port: 9200
    This is the port for HTTP connections.

  • elasticsearch_heap_size_min: 1g
    This sets the minimum JVM heap size.

  • elasticsearch_heap_size_max: 2g
    This sets the maximum JVM heap size.

  • elasticsearch_extra_options: ''
    This is a space for additional configuration options not included in the role. It will be added to the end of the elasticsearch.yml file. Make sure to keep the formatting with a |. For example:

elasticsearch_extra_options: |  # Don't forget the pipe!
  some.option: true
  another.option: false

Dependencies

There are no dependencies.

Example Playbook

- hosts: search
  roles:
    - geerlingguy.java
    - geerlingguy.elasticsearch

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, the author of Ansible for DevOps.

Installa
ansible-galaxy install geerlingguy.elasticsearch
Licenza
mit
Download
982.3k
Proprietario
Father, author, developer, maker. Sometimes called "an inflammatory enigma". #stl #drupal #ansible #k8s #raspberrypi #crohns