NETWAYS / ansible-collection-elasticstack

A collection to install and manage the Elastic Stack
GNU General Public License v3.0
9 stars 8 forks source link

Restarting Elasticsearch after the first start is not ideal #141

Closed afeefghannam89 closed 10 months ago

afeefghannam89 commented 1 year ago

We flush handlers in security file yaml after the first start of the new initialized cluster. That lead to directly restart of Elasticsearch after the first start. This is maybe not ideal. We can put a when condition to adjust this behavior.

Also, we put two tasks to start Elasticsearch. The first one in security file yaml and the next one in main.yml. This led to two changes in Ansible output. What about putting when condition to not trigger the second one if security is enabled?

What do you think @widhalmt?

widhalmt commented 1 year ago

I'd love to minimize restarts. The current version is just the outcome of sometimes needing Elasticsearch running and sometimes not. If you find a better way, I'm all for it. Maybe the current way isn't needed any more due to all the changes we had.