Skip to content

Commit

Permalink
Merge pull request #53 from davidnewhall/master
Browse files Browse the repository at this point in the history
Add syslog facility, memlock and core limits to service template.
  • Loading branch information
jordiprats committed Jan 22, 2018
2 parents 73811dc + e5a5aa8 commit 0ac17d0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manifests/service.pp
Expand Up @@ -30,9 +30,11 @@
$timeoutstopsec = undef,
$timeoutsec = undef,
$restart_prevent_exit_status = undef,
$limit_memlock = undef,
$limit_nofile = undef,
$limit_nproc = undef,
$limit_nice = undef,
$limit_core = undef,
$runtime_directory = undef,
$runtime_directory_mode = undef,
$restart_sec = undef,
Expand All @@ -46,6 +48,7 @@
$startlimitburst = undef,
$standard_output = 'syslog',
$standard_error = 'syslog',
$syslog_facility = undef,
$killmode = undef,
$successexitstatus = [],
$killsignal = undef,
Expand Down
9 changes: 9 additions & 0 deletions templates/service.erb
Expand Up @@ -76,6 +76,9 @@ StandardError=<%= @standard_error %>
<% if defined?(@syslogidentifier) -%>
SyslogIdentifier=<%= @syslogidentifier %>
<% end -%>
<% if defined?(@syslog_facility) -%>
SyslogFacility=<%= @syslog_facility %>
<% end -%>
<% if defined?(@user) -%>
User=<%= @user %>
<% end -%>
Expand Down Expand Up @@ -123,6 +126,9 @@ RestartPreventExitStatus=<%= @restart_prevent_exit_status.join(' ') %>
RestartPreventExitStatus=<%= @restart_prevent_exit_status %>
<%- end -%>
<% end -%>
<% if defined?(@limit_memlock) -%>
LimitMEMLOCK = <%= @limit_memlock %>
<% end -%>
<% if defined?(@limit_nofile) -%>
LimitNOFILE = <%= @limit_nofile %>
<% end -%>
Expand All @@ -132,6 +138,9 @@ LimitNPROC = <%= @limit_nproc %>
<% if defined?(@limit_nice) -%>
LimitNICE = <%= @limit_nice %>
<% end -%>
<% if defined?(@limit_core) -%>
LimitCORE = <%= @limit_core %>
<% end -%>
<% if defined?(@runtime_directory) -%>
<%- if @runtime_directory.kind_of?(Array) -%>
RuntimeDirectory=<%= @runtime_directory.join(' ') %>
Expand Down

0 comments on commit 0ac17d0

Please sign in to comment.