Remove uses of remove_cron.

Change-Id: Id95228ae662880176b54903ffbcb196fbead992f
This commit is contained in:
Monty Taylor 2012-07-27 12:51:11 -05:00
parent 5fb75ec390
commit 67ef0a4aa8
5 changed files with 11 additions and 32 deletions

View File

@ -10,7 +10,6 @@ node default {
# Long lived servers:
#
node "review.openstack.org" {
include openstack_project::remove_cron
class { 'openstack_project::review':
github_oauth_token => hiera('gerrit_github_token'),
mysql_password => hiera('gerrit_mysql_password'),
@ -20,7 +19,6 @@ node "review.openstack.org" {
}
node "gerrit-dev.openstack.org", "review-dev.openstack.org" {
include openstack_project::remove_cron
class { 'openstack_project::review_dev':
github_oauth_token => hiera('gerrit_dev_github_token'),
mysql_password => hiera('gerrit_dev_mysql_password'),
@ -29,58 +27,48 @@ node "gerrit-dev.openstack.org", "review-dev.openstack.org" {
}
node "jenkins.openstack.org" {
include openstack_project::remove_cron
class { 'openstack_project::jenkins':
jenkins_jobs_password => hiera('jenkins_jobs_password'),
}
}
node "jenkins-dev.openstack.org" {
include openstack_project::remove_cron
include openstack_project::jenkins_dev
}
node "community.openstack.org" {
include openstack_project::remove_cron
include openstack_project::community
}
node "ci-puppetmaster.openstack.org" {
include openstack_project::remove_cron
include openstack_project::puppetmaster
}
node "lists.openstack.org" {
include openstack_project::remove_cron
class { 'openstack_project::lists':
listadmins => hiera('listadmins'),
}
}
node "paste.openstack.org" {
include openstack_project::remove_cron
include openstack_project::paste
}
node "planet.openstack.org" {
include openstack_project::remove_cron
include openstack_project::planet
}
node "eavesdrop.openstack.org" {
include openstack_project::remove_cron
class { 'openstack_project::eavesdrop':
nickpass => hiera('openstack_meetbot_password'),
}
}
node "pypi.openstack.org" {
include openstack_project::remove_cron
include openstack_project::pypi
}
node 'etherpad.openstack.org' {
include openstack_project::remove_cron
class { 'openstack_project::etherpad':
etherpad_crt => hiera('etherpad_crt'),
etherpad_key => hiera('etherpad_key'),
@ -89,7 +77,6 @@ node 'etherpad.openstack.org' {
}
node 'wiki.openstack.org' {
include openstack_project::remove_cron
include openstack_project::wiki
}

View File

@ -1,5 +1,6 @@
define logrotate::file($log,
$options,
$ensure=present,
$prerotate='undef',
$postrotate='undef',
$firstaction='undef',
@ -14,6 +15,7 @@ define logrotate::file($log,
owner => root,
group => root,
mode => 644,
ensure => $ensure,
content => template("logrotate/config.erb"),
require => File["/etc/logrotate.d"],
}

View File

@ -1,16 +1,20 @@
class openstack_project::puppet_cron {
class openstack_project::puppet_cron($ensure=present) {
include logrotate
include puppetboot
class { 'puppetboot':
ensure => $ensure
}
cron { "updatepuppet":
ensure => $ensure,
user => root,
minute => "*/15",
command => 'apt-get update >/dev/null 2>&1 ; sleep $((RANDOM\%600)) && /bin/bash /root/openstack-ci-puppet/run_puppet.sh /root/openstack-ci-puppet',
environment => "PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin",
}
logrotate::file { 'updatepuppet':
ensure => $ensure,
log => '/var/log/manifest.log',
options => ['compress', 'delaycompress', 'missingok', 'rotate 7', 'daily', 'notifempty'],
require => Cron['updatepuppet'],
}
}

View File

@ -1,14 +0,0 @@
class openstack_project::remove_cron {
cron { "updatepuppet":
ensure => absent
}
file { '/etc/init/puppetboot.conf':
ensure => absent
}
file { "/etc/logrotate.d/updatepuppet":
ensure => absent
}
}

View File

@ -1,9 +1,9 @@
class puppetboot {
class puppetboot($ensure=present) {
file {'/etc/init/puppetboot.conf':
owner => 'root',
group => 'root',
mode => 644,
ensure => 'present',
ensure => $ensure,
source => [
"puppet:///modules/puppetboot/puppetboot.conf",
],