Elasticsearch won't start with Ansible service module

Hi all,

I'm using Ansible to install Elasticsearch and when I want to start the Elasticsearch with service module it won't start but when I execute "service elasticsearch start" manually it is working normally.

Ansible play:

- name: Start elastic
    name: elasticsearch
    state: started
    enabled: yes
    use: service
  tags: elastic

Elastic error log
In Ansible it is reporting "changed" for the task execution and not failing.

Other alternatives also not working:

  1. "command" module
command: service elasticsearch start
  1. "use: sysvinit" parameter in service module

Environment: Ansible 2.10.9, Debian 10.9, Elasticsearch 7.12.1, Python 3.7.3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.