+define linux_module ($ensure) {
+ case $ensure {
+ present: {
+ exec { "append_module_${name}":
+ command => "echo '${name}' >> /etc/modules",
+ unless => "grep -q -F -x '${name}' /etc/modules",
+ }
+ }
+ absent: {
+ exec { "remove_module_${name}":
+ command => "sed -i -e'/^${name}\$/d' /etc/modules",
+ onlyif => "grep -q -F -x '${name}' /etc/modules",
+ }
+ }
+ default: {
+ err("invalid ensure value ${ensure}")
+ }
+ }
+}
+
+
+class debian-org {
+ $debianadmin = [ "debian-archive-debian-samhain-reports@master.debian.org", "debian-admin@ftbfs.de", "weasel@debian.org", "steve@lobefin.net" ]
+ package {
+ "apt-utils": ensure => installed;
+ "bash-completion": ensure => installed;
+ "debian.org": ensure => installed;
+ "dnsutils": ensure => installed;
+ "dsa-munin-plugins": ensure => installed;
+ "klogd": ensure => purged;
+ "less": ensure => installed;
+ "libfilesystem-ruby1.8": ensure => installed;
+ "mtr-tiny": ensure => installed;
+ "nload": ensure => installed;
+ "pciutils": ensure => installed;
+ "rsyslog": ensure => purged;
+ "sysklogd": ensure => purged;
+ }
+ file {
+ "/etc/apt/preferences":
+ source => "puppet:///modules/debian-org/apt.preferences";
+ "/etc/apt/sources.list.d/backports.org.list":
+ content => template("debian-org/etc/apt/sources.list.d/backports.org.list.erb"),
+ notify => Exec["apt-get update"];
+ "/etc/apt/sources.list.d/debian.org.list":
+ content => template("debian-org/etc/apt/sources.list.d/debian.org.list.erb"),
+ notify => Exec["apt-get update"];
+ "/etc/apt/sources.list.d/security.list":
+ content => template("debian-org/etc/apt/sources.list.d/security.list.erb"),
+ notify => Exec["apt-get update"];
+ "/etc/apt/sources.list.d/volatile.list":
+ content => template("debian-org/etc/apt/sources.list.d/volatile.list.erb"),
+ notify => Exec["apt-get update"];
+ "/etc/apt/apt.conf.d/local-recommends":
+ source => "puppet:///modules/debian-org/apt.conf.d/local-recommends";
+ "/etc/apt/apt.conf.d/local-pdiffs":
+ source => "puppet:///modules/debian-org/apt.conf.d/local-pdiffs";
+ "/etc/timezone":
+ source => "puppet:///modules/debian-org/timezone",
+ notify => Exec["dpkg-reconfigure tzdata -pcritical -fnoninteractive"];
+ "/etc/puppet/puppet.conf":
+ # require => Package["puppet"],
+ source => "puppet:///modules/debian-org/puppet.conf"
+ ;
+ "/etc/default/puppet":
+ # require => Package["puppet"],
+ source => "puppet:///modules/debian-org/puppet.default"
+ ;