X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fdebian-org%2Fmanifests%2Finit.pp;h=053b61ac380285cf44c17139a55610c3e345c783;hb=2de744ff634d0ed929b05346970c2ed9cc61353f;hp=ff5d0fe027dbc057284cf6d4b098b0edc1b63f12;hpb=2cbbbdebf1a85a7119acd62fc8babfa6bb5f041b;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian-org/manifests/init.pp b/modules/debian-org/manifests/init.pp index ff5d0fe02..053b61ac3 100644 --- a/modules/debian-org/manifests/init.pp +++ b/modules/debian-org/manifests/init.pp @@ -1,3 +1,7 @@ +# == Class: debian-org +# +# Stuff common to all debian.org servers +# class debian-org { if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') { $mirror = getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') @@ -95,6 +99,16 @@ class debian-org { require => Package['molly-guard'], } + file { '/etc/apt/trusted-keys.d': + ensure => absent, + force => true, + } + + file { '/etc/apt/trusted.gpg': + mode => '0600', + content => "", + } + site::aptrepo { 'security': url => 'http://security.debian.org/', suite => "${::lsbdistcodename}/updates", @@ -106,11 +120,6 @@ class debian-org { suite => "${::lsbdistcodename}-backports", components => ['main','contrib','non-free'] } - site::aptrepo { 'backports.org': - ensure => absent, - keyid => '16BA136C', - key => 'puppet:///modules/debian-org/backports.org.asc', - } site::aptrepo { 'volatile': url => $mirror, @@ -134,7 +143,17 @@ class debian-org { url => 'http://db.debian.org/debian-admin', suite => 'lenny', components => 'main', - key => 'puppet:///modules/debian-org/db.debian.org.asc', + key => 'puppet:///modules/debian-org/db.debian.org.gpg', + } + + augeas { 'inittab_replicate': + context => '/files/etc/inittab', + changes => [ + 'set ud/runlevels 2345', + 'set ud/action respawn', + 'set ud/process "/usr/bin/ud-replicated -d"', + ], + notify => Exec['init q'], } if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') { @@ -161,10 +180,6 @@ class debian-org { file { '/etc/apt/preferences': source => 'puppet:///modules/debian-org/apt.preferences', } - file { '/etc/apt/trusted-keys.d/': - ensure => directory, - purge => true, - } file { '/etc/apt/apt.conf.d/local-compression': source => 'puppet:///modules/debian-org/apt.conf.d/local-compression', } @@ -243,9 +258,17 @@ class debian-org { require => Package['debian.org'] } + file { '/usr/local/bin/check_for_updates': + source => 'puppet:///modules/debian-org/check_for_updates', + mode => '0755', + owner => root, + group => root, + } + exec { 'apt-get update': - path => '/usr/bin:/usr/sbin:/bin:/sbin', - refreshonly => true, + path => '/usr/bin:/usr/sbin:/bin:/sbin', + onlyif => '/usr/local/bin/check_for_updates', + require => File['/usr/local/bin/check_for_updates'] } Exec['apt-get update']->Package<| tag == extra_repo |>