Initial commit
[ta/infra-ansible.git] / roles / distributed-state-server / templates / dss-server.service.j2
diff --git a/roles/distributed-state-server/templates/dss-server.service.j2 b/roles/distributed-state-server/templates/dss-server.service.j2
new file mode 100644 (file)
index 0000000..a2a7a42
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=distributed state server
+After=network.target
+{%if groups['management']|length > 1 %}
+Requires=etcd.service
+{% endif %}
+
+[Service]
+Type=simple
+ExecStart=/usr/local/bin/dss --config /etc/distributed-state-server/config.ini
+Restart=always
+
+[Install]
+WantedBy=multi-user.target