ctubbsii commented on a change in pull request #334: Adds systemd support for
accumulo(2.x) services
URL: https://github.com/apache/fluo-muchos/pull/334#discussion_r396122905
##########
File path: ansible/roles/accumulo/templates/tserver.j2
##########
@@ -0,0 +1,26 @@
+[Unit]
+Description=TServer Service for Accumulo
+Requires=network.target
+After=network.target
+
+[Service]
+User={{ cluster_user }}
+Group={{ cluster_group }}
+Type=simple
+ExecStart={{ accumulo_home }}/bin/accumulo tserver{% if accumulo_major_version
== '1' %}-{{ tserver_instance_id }}{% endif %}{{''}}
+Environment=ACCUMULO_HOME={{ accumulo_home }}
+Environment=JAVA_HOME={{ java_home }}
+{% if accumulo_major_version == '2' %}
+Environment=ACCUMULO_SERVICE_INSTANCE={{ tserver_instance_id }}
+{% endif %}
Review comment:
If systemd templating is used, you don't need to use the ansible templating
here for the tserver_instance_id. You can instead use `%I` (or `%i`):
https://fedoramagazine.org/systemd-template-unit-files/
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services