puppet-standalone-mashup/shared/additional-modules/squid/manifests/debian.pp

32 lines
746 B
ObjectPascal
Raw Normal View History

2012-05-17 00:33:40 +00:00
class squid::debian($version, $config_template) {
$squid_user = 'squid'
$squid_group = 'squid'
user { $squid_user: uid => 6574 }
class { 'squid':
version => $version,
user => 'squid',
config_template => $config_template,
require => User['squid']
}
init_d_bundle { 'squid':
init_d_prolog => template('squid/debian/init-d-prolog'),
init_d_prerun => template('squid/debian/init-d-prerun'),
require => Class['squid']
}
exec { 'ensure-data-dir-ownership':
command => "chown -R ${squid_user}:${squid_group} ${squid::data}",
path => $base::path,
require => Class['squid']
}
logrotate_d { 'squid':
postrotate => 'service squid rotate',
pattern => "${squid::log}/access.log"
}
}