Verified Commit 0b254c1c authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

some work out_of_date

parent efb50b38
unreleased (207x-xx-xx) unreleased (207x-xx-xx)
[out_of_date] Add some parameters to the interface to make it easier
to point at different out-of-date servers. [adamhl]
[ssh] Change interface parameter. The parameter [ssh] Change interface parameter. The parameter
base::ssh::extra_gssapi_only_users has been renamed to base::ssh::extra_gssapi_only_users has been renamed to
base::ssh::extra_skip_duo_users to more accurately reflect what this base::ssh::extra_skip_duo_users to more accurately reflect what this
......
# Set up the out_of_date client, which reports package status to the server. # Set up the out_of_date client, which reports package status to the server.
class base::out_of_date::client { # $platform: should be one 'production' or 'development'.
class base::out_of_date::client (
$ensure = 'present',
$platform = 'production',
$ood_server_override = undef,
){
if ($ensure == 'present') {
# PRESENT
# Determine the server to use.
if ($ood_server_override) {
$ood_server = $ood_server_override
} else {
case $platform {
'production': { $ood_server = 'frankoz1.stanford.edu' }
'development': { $ood_server = 'frankoz1.stanford.edu' }
default: { fail("unrecognized platform") }
}
}
package { 'stanford-outofdate-client': package { 'stanford-outofdate-client':
ensure => installed, ensure => installed,
} }
file { file {
'/etc/out-of-date': '/etc/out-of-date':
ensure => directory, ensure => directory,
owner => root, owner => root,
group => root; group => root;
'/etc/out-of-date/client.conf': '/etc/out-of-date/client.conf':
source => 'puppet:///modules/base/out-of-date/etc/out-of-date/client.conf', content => template('base/out_of_date/etc/out-of-date/client.conf.erb'),
require => Package['stanford-outofdate-client']; require => Package['stanford-outofdate-client'];
} }
if $::lsbdistcodename == 'lenny' { file { '/etc/cron.hourly/out-of-date':
file { '/etc/cron.hourly/out-of-date': ensure => absent } source => 'puppet:///modules/base/out-of-date/etc/cron.hourly/out-of-date',
} else {
file { '/etc/cron.hourly/out-of-date':
source => 'puppet:///modules/base/out-of-date/etc/cron.hourly/out-of-date';
}
} }
} } else {
# ABSENT
# disable ood-client by removing its cron job. package { 'stanford-outofdate-client':
class base::out_of_date::client::disabled inherits base::out_of_date::client { ensure => absent,
File['/etc/cron.hourly/out-of-date'] {
ensure => absent
} }
}
class base::out_of_date::client::dev inherits base::out_of_date::client { file { '/etc/cron.hourly/out-of-date':
File['/etc/out-of-date/client.conf'] { ensure => absent
source => 'puppet:///modules/base/out-of-date/etc/out-of-date/client-dev.conf' }
file {
'/etc/out-of-date':
ensure => absent;
'/etc/out-of-date/client.conf':
ensure => absent;
} }
}
} }
# DEPRECATED!
#
# Use instead base::out_of_date::client with the parameter 'platform' set
# to 'development'.
class base::out_of_date::client::dev {
class { 'base::out_of_date::client':
platform => 'development',
}
}
# disable ood-client by removing its cron job.
# DEPRECATED!
#
# Use instead base::out_of_date::client with the parameter 'ensure' set to
# absent.
class base::out_of_date::client::disabled {
# File['/etc/cron.hourly/out-of-date'] {
# ensure => absent
# }
class { 'base::out_of_date::client':
ensure => absent,
}
}
# Out-of-date Package Management ##############################################################################
### Out-Of-Date Package Management
##############################################################################
# Upper bound of the random number generator; default is 12, you probably # Upper bound of the random number generator; default is 12, you probably
# won't want to change this too often. # won't want to change this too often.
$RANDOM_HOURS = 12; $RANDOM_HOURS = 12;
# What server is collecting this information? # What server is collecting this information?
$COLLECT_SERVER = 'frankoz2.stanford.edu'; $COLLECT_SERVER = '<%= @ood_server %>';
# Should we download and locally cache packages to-be-installed, if possible? # Should we download and locally cache packages to-be-installed, if possible?
$CACHE_PACKAGES = 0; $CACHE_PACKAGES = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment