Skip to content

Commit

Permalink
Change service unit template
Browse files Browse the repository at this point in the history
Add default unit template to instance service manifest.
  • Loading branch information
surprisingb committed Jun 26, 2019
1 parent 9b02689 commit caf3228
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/instance_service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#
define haproxy::instance_service (
Optional[String] $haproxy_init_source = undef,
Optional[String]$haproxy_unit_template = undef,
Optional[String]$haproxy_unit_template = 'haproxy/instance_service_unit.erb',
String $haproxy_package = 'haproxy',
Stdlib::Absolutepath $bindir = '/opt/haproxy/bin',
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ Description=HAProxy-<%= @title %> Load Balancer
After=syslog.target network.target

[Service]
<% if @title == "haproxy" -%>
ExecStart=<%= @wrapper %> -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
<% else -%>
ExecStart=<%= @wrapper %> -f /etc/haproxy-<%= @title %>/haproxy-<%= @title %>.cfg -p /run/haproxy-<%= @title %>.pid
<% end %>
ExecReload=/bin/kill -USR2 $MAINPID

[Install]
Expand Down

0 comments on commit caf3228

Please sign in to comment.