---

- hosts: localhost
  become: true


  tasks:

  - name: Start Elasticsearch
    service: name=elasticsearch state=started

---

- hosts: localhost
  become: true


  tasks:

  - name: Change Elasticsearch's memory usage to 512MB
    lineinfile: dest=/etc/elasticsearch/jvm.options regexp="^-Xms" line="-Xms512m" state=present
  - lineinfile: dest=/etc/elasticsearch/jvm.options regexp="^-Xmx" line="-Xmx512m" state=present

  - name: Start Elasticsearch
    service: name=elasticsearch state=started

ADD Elasticsearch memory setting so it doesn't kill the VM
ADD Elasticsearch memory setting so it doesn't kill the VM
