{"id":22845518,"url":"https://github.com/idealista/elasticsearch_role","last_synced_at":"2025-09-03T13:39:57.069Z","repository":{"id":36774748,"uuid":"178378390","full_name":"idealista/elasticsearch_role","owner":"idealista","description":"Ansible role to install Elasticsearch","archived":false,"fork":false,"pushed_at":"2025-04-21T14:26:02.000Z","size":217,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-28T16:57:44.814Z","etag":null,"topics":["ansible","ansible-role","debian","elastic","elasticsearch","elasticsearch-role"],"latest_commit_sha":null,"homepage":"","language":"YAML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idealista.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-29T09:49:00.000Z","updated_at":"2025-04-21T14:25:14.000Z","dependencies_parsed_at":"2024-02-09T12:15:17.050Z","dependency_job_id":"9bcc8fe1-6b50-4879-af3c-d458d813bc56","html_url":"https://github.com/idealista/elasticsearch_role","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/idealista/elasticsearch_role","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Felasticsearch_role","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Felasticsearch_role/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Felasticsearch_role/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Felasticsearch_role/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idealista","download_url":"https://codeload.github.com/idealista/elasticsearch_role/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Felasticsearch_role/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273453424,"owners_count":25108470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","debian","elastic","elasticsearch","elasticsearch-role"],"created_at":"2024-12-13T03:17:30.781Z","updated_at":"2025-09-03T13:39:57.042Z","avatar_url":"https://github.com/idealista.png","language":"YAML","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](https://raw.githubusercontent.com/idealista/elasticsearch_role/master/logo.gif)\n\n[![Build Status](https://travis-ci.com/idealista/elasticsearch_role.png)](https://travis-ci.com/idealista/elasticsearch_role)\n\n# Elasticsearch Ansible role\n\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installing](#installing)\n- [Usage](#usage)\n- [Testing](#testing)\n- [Built With](#built-with)\n- [Versioning](#versioning)\n- [Authors](#authors)\n- [License](#license)\n- [Contributing](#contributing)\n\n## Getting Started\n\n**THIS ROLE IS FOR 6.x or 7.x**\n\nAnsible role for 6.x/7.x Elasticsearch. Currently, this works on Debian based linux systems. Tested platforms are:\n\n* Debian 9\n* Debian 10\n\nFor now, you can install as tar or deb package.\n\n**NOTE: Opendistro only available as deb package and with java 11 or newer.**\n\nThese instructions will get you a copy of the role for your ansible playbook. Once launched, it will install a [Elasticsearch](https://www.elastic.co/products/elasticsearch) distributed, RESTful search and analytics engine in a Debian system.\n\n### Prerequisites\n\n#### To execute this role:\n\nAnsible 2.8.19 version installed.\n\n#### For testing purposes:\n\n* Python 3.6\n* [Molecule](https://molecule.readthedocs.io/)\n* [Pipenv](https://github.com/pypa/pipenv) \n* [jmespath](http://jmespath.org/) \n* [Docker](https://www.docker.com/) as driver\n\n\n### Installing\n\nCreate or add to your roles dependency file (e.g requirements.yml):\n\n```yml\n- src: http://github.com/idealista/elasticsearch_role.git\n  scm: git\n  version: 1.7.1\n  name: elasticsearch\n```\n\nInstall the role with ansible-galaxy command:\n\n```sh\nansible-galaxy install -p roles -r requirements.yml -f\n```\n\nUse in a playbook:\n\n```yml\n- hosts: someserver\n  roles:\n    - role: elasticsearch\n```\n\n## Usage\n\n### Important to read before use\n- Choose your `install_mode` by default is `tar` mode, but is recommended `deb` package.\n- Check what distribution of elasticsearch you want to install. By default, oss version is installed. \nYou can choose `basic` for official elastic version.\n- In case you want use oss with opendistro check compatibility version of packages [here](https://opendistro.github.io/for-elasticsearch-docs/version-history/).\n\nLook to the [defaults](defaults/main.yml) properties file to see the possible configuration properties.\n\nAll Elasticsearch configuration parameters are supported. This is achieved using a configuration map parameter 'elasticsearch_config' which is serialized into the elasticsearch.yml file.\nThe use of a map ensures the Ansible playbook does not need to be updated to reflect new/deprecated/plugin configuration parameters.\n\nIn addition to the elasticsearch_config map, several other parameters are supported for additional functions e.g. script installation. These can be found in the role's defaults/main.yml file.\n\n## Elastic 7.x\nThe following illustrates applying configuration parameters to an Elasticsearch. See comments to different possible configurations.\n7.x instance with single-node (development).\n\n```yaml\n- name: Elasticsearch with custom configuration\n  hosts: localhost\n  roles:\n    - role: idealista.elasticsearch_role\n  vars:\n    ## Uncomment next line if you want to install as deb package instead of tar installation.\n    # install_mode: deb\n    ## Uncomment next line if you want to install oss with opendistro of amazon. Mandatory to set install mode as deb\n    # install_opendistro: true\n    ## Uncomment next line if you want to install basic license (official with x-pack from elastic)\n    # elasticsearch_license_type: 'basic'\n    elasticsearch_config:\n      node.name: node1\n      discovery.type: single-node\n      node.data: true\n      node.master: true\n      bootstrap.memory_lock: true\n    elasticsearch_heap_size: 1g\n    elasticsearch_api_host: localhost\n    elasticsearch_api_port: 9200\n    elasticsearch_plugins:\n      - name: ingest-geoip\n```\n\nSee https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html for further details on available options.\n\n\n#### Important Note\n\n**The role uses elasticsearch_api_host and elasticsearch_api_port to communicate with the node for actions only achievable via http e.g. to install templates and to check the NODE IS ACTIVE.  These default to \"localhost\" and 9200 respectively.  \nIf the node is deployed to bind on either a different host or port, these must be changed.**\n\n\n### Multi Node Server Installations\n\nThe application of the elasticsearch role results in the installation of a node on a host. Specifying the role multiple times for a host therefore results in the installation of multiple nodes for the host.\n\nAn example of a three server deployment is shown below. The three servers work as master and data nodes.\n\n\n```yaml\n  hosts: node1\n  roles:\n    - role: idealista.elasticsearch_role\n  vars:\n    ## Uncomment next line if you want to install as deb package instead of tar installation.\n    # install_mode: deb\n    ## Uncomment next line if you want to install oss with opendistro of amazon. Mandatory to set install mode as deb\n    # install_opendistro: true\n    ## Uncomment next line if you want to install basic license (official with x-pack from elastic)\n    # elasticsearch_license_type: 'basic'\n    elasticsearch_config:\n      node.name: node1\n      cluster.name: idealista-cluster\n      discovery.seed_hosts: [\"node1\", \"node2\", \"node3\"]\n      cluster.initial_master_nodes: [\"node1\", \"node2\", \"node3\"]\n      network.host: _site_\n      http.port: 9200\n      node.master: true\n      node.data: true\n      bootstrap.memory_lock: true\n    elasticsearch_api_host: node1\n    elasticsearch_api_port: 9200\n    elasticsearch_plugins:\n      - name: ingest-geoip\n\n- hosts: node2\n  roles:\n    - role: idealista.elasticsearch_role\n  vars:\n    ## Uncomment next line if you want to install as deb package instead of tar installation.\n    # install_mode: deb\n    ## Uncomment next line if you want to install oss with opendistro of amazon. Mandatory to set install mode as deb\n    # install_opendistro: true\n    ## Uncomment next line if you want to install basic license (official with x-pack from elastic)\n    # elasticsearch_license_type: 'basic'\n    elasticsearch_config:\n      node.name: node2\n      cluster.name: idealista-cluster\n      discovery.seed_hosts: [\"node1\", \"node2\", \"node3\"]\n      cluster.initial_master_nodes: [\"node1\", \"node2\", \"node3\"]\n      network.host: _site_\n      http.port: 9200\n      node.master: true\n      node.data: true\n      bootstrap.memory_lock: true\n    elasticsearch_api_host: node2\n    elasticsearch_api_port: 9200\n    elasticsearch_plugins:\n      - name: ingest-geoip\n    \n- hosts: node3\n  roles:\n    - role: idealista.elasticsearch_role\n  vars:\n    ## Uncomment next line if you want to install as deb package instead of tar installation.\n    # install_mode: deb\n    ## Uncomment next line if you want to install oss with opendistro of amazon. Mandatory to set install mode as deb\n    # install_opendistro: true\n    ## Uncomment next line if you want to install basic license (official with x-pack from elastic)\n    # elasticsearch_license_type: 'basic'\n    elasticsearch_config:\n      node.name: node3\n      cluster.name: idealista-cluster\n      discovery.seed_hosts: [\"node1\", \"node2\", \"node3\"]\n      cluster.initial_master_nodes: [\"node1\", \"node2\", \"node3\"]\n      network.host: _site_\n      http.port: 9200\n      transport.tcp.port: 9300\n      node.master: true\n      node.data: true\n      bootstrap.memory_lock: true\n    elasticsearch_api_host: node3\n    elasticsearch_api_port: 9200\n    elasticsearch_plugins:\n      - name: ingest-geoip\n```\n\n## Elastic 6.x\nThe following illustrates applying configuration parameters to an Elasticsearch 6.x instance.\n\nUsing `install_mode: tar` (default)\n```yaml\n- name: Elasticsearch with custom configuration\n  hosts: localhost\n  roles:\n    - role: idealista.elasticsearch_role\n  vars:      \n    elasticsearch_version: 6.8.14\n    ## Uncomment next line if you want to install as deb package instead of tar installation.\n    # install_mode: deb\n    ## Uncomment next line if you want to install oss with opendistro of amazon. Mandatory to set install mode as deb\n    # install_opendistro: true\n    ## Uncomment next line if you want to install basic license (official with x-pack from elastic)\n    # elasticsearch_license_type: 'basic'\n    elasticsearch_config:\n      node.name: node1\n      http.port: 9200\n      node.data: true\n      node.master: true\n      bootstrap.memory_lock: true\n    elasticsearch_heap_size: 1g\n    elasticsearch_api_host: localhost\n    elasticsearch_api_port: 9200\n    elasticsearch_plugins:\n      - name: ingest-geoip\n```\n\nSee https://www.elastic.co/guide/en/elasticsearch/reference/6.8/settings.html for further details on available options.\n\n\n#### Important Note\n\n**The role uses elasticsearch_api_host and elasticsearch_api_port to communicate with the node for actions only achievable via http e.g. to install templates and to check the NODE IS ACTIVE.  These default to \"localhost\" and 9200 respectively.  \nIf the node is deployed to bind on either a different host or port, these must be changed.**\n\n\n### Multi Node Server Installations\n\nThe application of the elasticsearch role results in the installation of a node on a host. Specifying the role multiple times for a host therefore results in the installation of multiple nodes for the host. \n\nAn example of a three server deployment is shown below. The three servers work as master and data nodes.\n\n\n```yaml\n  hosts: node1\n  roles:\n    - role: idealista.elasticsearch_role\n  vars:\n    elasticsearch_config:\n      elasticsearch_version: 6.8.14\n      ## Uncomment next line if you want to install as deb package instead of tar installation.\n      # install_mode: deb\n      ## Uncomment next line if you want to install oss with opendistro of amazon. Mandatory to set install mode as deb\n      # install_opendistro: true\n      ## Uncomment next line if you want to install basic license (official with x-pack from elastic)\n      # elasticsearch_license_type: 'basic'\n      node.name: node1\n      cluster.name: idealista-cluster\n      discovery.zen.ping.unicast.hosts: [\"node1\", \"node2\", \"node3\"]\n      discovery.zen.minimum_master_nodes: 2\n      network.host: _site_\n      http.port: 9200\n      node.master: true\n      node.data: true\n      bootstrap.memory_lock: true\n    elasticsearch_api_host: node1\n    elasticsearch_api_port: 9200\n    elasticsearch_plugins:\n      - name: ingest-geoip\n\n- hosts: node2\n  roles:\n    - role: idealista.elasticsearch_role\n  vars:\n    elasticsearch_config:\n      elasticsearch_version: 6.8.14\n      ## Uncomment next line if you want to install as deb package instead of tar installation.\n      # install_mode: deb\n      ## Uncomment next line if you want to install oss with opendistro of amazon. Mandatory to set install mode as deb\n      # install_opendistro: true\n      ## Uncomment next line if you want to install basic license (official with x-pack from elastic)\n      # elasticsearch_license_type: 'basic'\n      node.name: node2\n      cluster.name: idealista-cluster\n      discovery.zen.ping.unicast.hosts: [\"node1\", \"node2\", \"node3\"]\n      discovery.zen.minimum_master_nodes: 2\n      network.host: _site_\n      http.port: 9200\n      node.master: true\n      node.data: true\n      bootstrap.memory_lock: true\n    elasticsearch_api_host: node2\n    elasticsearch_api_port: 9200\n    elasticsearch_plugins:\n      - name: ingest-geoip\n    \n- hosts: node3\n  roles:\n    - role: idealista.elasticsearch_role\n  vars:\n    elasticsearch_config:\n      elasticsearch_version: 6.8.14\n      ## Uncomment next line if you want to install as deb package instead of tar installation.\n      # install_mode: deb\n      ## Uncomment next line if you want to install oss with opendistro of amazon. Mandatory to set install mode as deb\n      # install_opendistro: true\n      ## Uncomment next line if you want to install basic license (official with x-pack from elastic)\n      # elasticsearch_license_type: 'basic'\n      node.name: node3\n      cluster.name: idealista-cluster\n      discovery.zen.ping.unicast.hosts: [\"node1\", \"node2\", \"node3\"]\n      discovery.zen.minimum_master_nodes: 2\n      network.host: _site_\n      http.port: 9200\n      node.master: true\n      node.data: true\n      bootstrap.memory_lock: true\n    elasticsearch_api_host: node3\n    elasticsearch_api_port: 9200\n    elasticsearch_plugins:\n      - name: ingest-geoip\n```\n\n## Testing\nHaving pipenv installed.\n```sh\npipenv sync\nmolecule test\n```\n\n## Built With\n\n![Ansible](https://img.shields.io/badge/ansible-2.8.19-green.svg)\n\n## Versioning\n\nFor the versions available, see the [tags on this repository](https://github.com/idealista/elasticsearch_role/tags).\n\nYou can see what change in each version in the [CHANGELOG.md](CHANGELOG.md) file.\n\n## Authors\n\n- **Idealista** - *Work with* - [idealista](https://github.com/idealista)\n\nSee also the list of [contributors](https://github.com/idealista/elasticsearch_role/contributors) who participated in this project.\n\n## License\n\n![Apache 2.0 License](https://img.shields.io/hexpm/l/plug.svg)\n\nThis project is licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidealista%2Felasticsearch_role","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidealista%2Felasticsearch_role","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidealista%2Felasticsearch_role/lists"}