Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage the elasticsearch service file (systemd) via the elasticsearch module #1078

Open
cr-liadsh opened this issue Mar 15, 2020 · 1 comment

Comments

@cr-liadsh
Copy link

cr-liadsh commented Mar 15, 2020

  • Module version: 6.4.0
  • Puppet version: 5.3
  • OS and version: centos7.6

Feature Description

The Elasticsearch service systemd file is deployed by the elasticsearch puppet module.
At the moment it is not possible to apply systemd directives (https://www.freedesktop.org/software/systemd/man/systemd.directives.html) to the configuration file from the Elasticsearch class.

My workaround right now is updating elasticsearch.systemd.erb:

[Unit]
Description=Elasticsearch instance <%= @resource[:instance] %>
Documentation=http://www.elastic.co
Wants=network-online.target
After=network-online.target
< my change is the line below >
<% if SOME_CONDITION %>AssertPathIsMountPoint=<%= Facter.value('SOME_VALUE') %><% end %>

In my case, I need to make sure that my data dir is mounted on data nodes before I start the service.

Adding a parameter to send these directives to the template will be enough in my opinion, maybe something like this:

[Unit]
Description=Elasticsearch instance <%= @resource[:instance] %>
Documentation=http://www.elastic.co
Wants=network-online.target
After=network-online.target
<% directives.each do |key,value| -%>
<%= key %>=<%= value %>
<% end %>

@braddeicide
Copy link

You can achieve this with a systemd drop-in in your profile etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants