if p.delete('buildd')
entries += ", the Debian #{arch} build daemon"
end
- if p.delete('porterbox') or scope.lookupvar('site::nodeinfo').has_key?('porterbox')
+ if p.delete('porterbox') or classes.include?("porterbox")
entries += ", the Debian #{arch} porterbox"
end
end
-if scope.lookupvar('site::nodeinfo').has_key?('porterbox')
+if classes.include?("porterbox")
purp += "\n " + wrap("Disk space on porter boxes is often limited. Please respect your fellow porters by cleaning up after yourself and deleting schroots and source/build trees in your ~ as soon as feasible. DSA reserves the right to recover disk space as necessary. See <URL:http://dsa.debian.org/doc/schroot/> for a brief tutorial on using schroot.")
end
-class porterbox ($ensure = present){
- if $ensure in present {
- include schroot
- }
+class porterbox {
+ include schroot
file { '/usr/local/bin/dd-schroot-cmd':
mode => '0555',
source => 'puppet:///modules/porterbox/dd-schroot-cmd',
- ensure => $ensure,
}
file { '/usr/local/bin/schroot-list-sessions':
mode => '0555',
source => 'puppet:///modules/porterbox/schroot-list-sessions',
- ensure => $ensure,
}
file { '/usr/local/sbin/setup-dchroot':
mode => '0555',
source => 'puppet:///modules/porterbox/setup-dchroot',
- ensure => $ensure,
}
file { '/usr/local/sbin/setup-all-dchroots':
mode => '0555',
source => 'puppet:///modules/porterbox/setup-all-dchroots',
- ensure => $ensure,
}
file { '/etc/cron.d/puppet-update-dchroots':
content => "0 15 * * 0 root PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin chronic setup-all-dchroots\n",
- ensure => $ensure,
}
file { '/etc/cron.weekly/puppet-mail-big-homedirs':
mode => '0555',
source => 'puppet:///modules/porterbox/mail-big-homedirs',
- ensure => $ensure,
}
}
# XXX: turn this into a real role
if getfromhash($site::nodeinfo, 'porterbox') {
- class {'porterbox':
- ensure => present,
- }
- } else {
- class {'porterbox':
- ensure => absent,
- }
+ include porterbox
}
if has_role('bugs_mirror') {