dimzak/ansible_elasticsearch

elastic 5.x cluster setup

Opened this issue · 4 comments

Does this role support the cluster setup lets say
I have 3 Nodes for Master and I wanted a separate ansible tags to install the Master Elastic Node, similarly
for Ingest and Data Node.

With this role were you able to setup a Cluster with 3 Master, 5+ Data Nodes, Ingest Node ?

Yes, you can use the node and discovery variables like in below example playbook for 1 master node without data

---
- hosts: node1
  become: yes
  roles:
   - {
        role: ansible_elasticsearch,
        # https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-zen.html
        elasticsearch_discovery_zen_ping_unicast_hosts: '["node2","node3"]',
        elasticsearch_network_host: "{{ hostvars[inventory_hostname].ansible_eth1.ipv4.address }}",
        elasticsearch_node_master: true,
        elasticsearch_node_data: false,
        elasticsearch_node_ingest: false
      }

I will try can you please give me the setup for Data/Ingest Nodes if you already have the playbook.
Also do you have similar playbook for Kibana?

I tested the 1st part of installing only the Java and the playbook executes successfully but I don't see the Java installed in host m/c

@client-6178:~$ java
The program 'java' can be found in the following packages:

  • default-jre
  • gcj-4.8-jre-headless
  • openjdk-7-jre-headless
  • gcj-4.6-jre-headless
  • openjdk-6-jre-headless
    Ask your administrator to install one of them

It worked, i tried with state=absent and then again with state=present and it worked.