
For prerotate, logrotate, firstaction and lastaction is very common to need several lines of commands, making it difficult to pass with a puppet string. Allow this parameter to be either and string or an array to allow this usage. Change-Id: I7451ecc550b50b85c55784ef598f6b45412117fc
37 lines
884 B
Plaintext
37 lines
884 B
Plaintext
<%= @log %> {
|
|
<% @options.each do |opt| -%> <%= opt %>
|
|
<% end -%>
|
|
<% if @prerotate != 'undef' -%>
|
|
prerotate
|
|
<%- @prerotate = [@prerotate] unless @prerotate.is_a?(Array) -%>
|
|
<%- @prerotate.each do |val| -%>
|
|
<%= val %>
|
|
<%- end -%>
|
|
endscript
|
|
<% end -%>
|
|
<% if @postrotate != 'undef' -%>
|
|
postrotate
|
|
<%- @postrotate = [@postrotate] unless @postrotate.is_a?(Array) -%>
|
|
<%- @postrotate.each do |val| -%>
|
|
<%= val %>
|
|
<%- end -%>
|
|
endscript
|
|
<% end -%>
|
|
<% if @firstaction != 'undef' -%>
|
|
firstaction
|
|
<%- @firstaction = [@firstaction] unless @firstaction.is_a?(Array) -%>
|
|
<%- @firstaction.each do |val| -%>
|
|
<%= val %>
|
|
<%- end -%>
|
|
endscript
|
|
<% end -%>
|
|
<% if @lastaction != 'undef' -%>
|
|
lastaction
|
|
<%- @lastaction = [@lastaction] unless @lastaction.is_a?(Array) -%>
|
|
<%- @lastaction.each do |val| -%>
|
|
<%= val %>
|
|
<%- end -%>
|
|
endscript
|
|
<% end -%>
|
|
}
|