All checks were successful
Build / precommit (pull_request) Successful in 4m39s
- add module for victorialogs - add hieradata for vl insert/select/storage - manage packages, directories, services, etc - manage exporting metrics
34 lines
566 B
Plaintext
34 lines
566 B
Plaintext
<%
|
|
opts = @options || {}
|
|
lines = []
|
|
|
|
def undefish?(v)
|
|
v.respond_to?(:strip) && v.strip.downcase == 'undef'
|
|
end
|
|
|
|
opts.each do |key, val|
|
|
flag = "-#{key}"
|
|
|
|
case val
|
|
when Array
|
|
need_bare = false
|
|
val.each do |v|
|
|
if undefish?(v)
|
|
need_bare = true
|
|
else
|
|
lines << "#{flag}=#{v}"
|
|
end
|
|
end
|
|
lines << flag if need_bare
|
|
else
|
|
if undefish?(val)
|
|
lines << flag
|
|
else
|
|
lines << "#{flag}=#{val}"
|
|
end
|
|
end
|
|
end
|
|
%>
|
|
OPTIONS="<%= lines.join(" \\\n ") %>"
|
|
|