Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7defffa2b8
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (29 sloc) 0.635 kb
meta :logrotate do
accepts_value_for :renders
accepts_value_for :as
template {
requires 'logrotate.managed'
def conf_dest
%w[
/usr/local/etc/logrotate.d
/etc/logrotate.d
].detect {|path|
path.p.exists?
} / as
end
met? {
Babushka::Renderable.new(conf_dest).from?(dependency.load_path.parent / renders)
}
meet {
render_erb renders, :to => conf_dest, :sudo => true
}
}
end
dep 'nginx.logrotate', :for => :linux do
renders "logrotate/nginx.conf"
as "nginx"
end
dep 'rails.logrotate' do
renders "logrotate/rails.conf"
as var(:username)
end
Jump to Line
Something went wrong with that request. Please try again.