Skip to content
Snippets Groups Projects
client.pp 1.17 KiB
Newer Older
Adam Lewenberg's avatar
Adam Lewenberg committed
# Set up the out-of-date client, which reports package status to the server.

class base::out-of-date::client {
    package { 'stanford-outofdate-client':
        ensure => installed,
    }

    file {
        '/etc/out-of-date':
            ensure  => directory,
            owner   => root,
            group   => root;
        '/etc/out-of-date/client.conf':
            source  => 'puppet:///modules/base/out-of-date/etc/out-of-date/client.conf',
            require => Package['stanford-outofdate-client'];
    }

    if $::lsbdistcodename == 'lenny' {
      file { '/etc/cron.hourly/out-of-date': ensure => absent }
    } else {
      file { '/etc/cron.hourly/out-of-date':
        source => 'puppet:///modules/base/out-of-date/etc/cron.hourly/out-of-date';
      }
    }
}

# disable ood-client by removing its cron job.
class base::out-of-date::client::disabled inherits base::out-of-date::client {
    File['/etc/cron.hourly/out-of-date'] {
        ensure => absent
    }
}

class base::out-of-date::client::dev inherits base::out-of-date::client {
    File ['/etc/out-of-date/client.conf'] {
        source  => 'puppet:///modules/base/out-of-date/etc/out-of-date/client-dev.conf'
    }
}