X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Ftestbed-setup%2Fansible%2Froles%2Fconsul%2Ftemplates%2Fconsul_systemd.service.j2;fp=resources%2Ftools%2Ftestbed-setup%2Fansible%2Froles%2Fconsul%2Ftemplates%2Fconsul_systemd.service.j2;h=8e1ef1310de91d6b50a768b01b14b1d7dd73c6a2;hb=37337e09e81af58459d8029b00ca50d0f8d5897a;hp=0000000000000000000000000000000000000000;hpb=610e96a2afae5c8e58bee00d05c45d57d7bb6021;p=csit.git diff --git a/resources/tools/testbed-setup/ansible/roles/consul/templates/consul_systemd.service.j2 b/resources/tools/testbed-setup/ansible/roles/consul/templates/consul_systemd.service.j2 new file mode 100644 index 0000000000..8e1ef1310d --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/consul/templates/consul_systemd.service.j2 @@ -0,0 +1,21 @@ +[Unit] +Description=Consul Service +Documentation=https://www.nomadproject.io/docs/ +Wants=network-online.target +After=network-online.target + +[Service] +# TODO: Decrease privilege +ExecReload=/bin/kill -SIGHUP $MAINPID +ExecStart={{ consul_bin_dir }}/consul agent -config-dir {{ consul_config_dir }} +KillSignal=SIGTERM +LimitNOFILE=infinity +LimitNPROC=infinity +Restart=on-failure +RestartSec=1 +User=root +Group=root +Environment="GOMAXPROCS=2" + +[Install] +WantedBy=multi-user.target