From 9aacd3d321a01242bc2ee11534f294dea8fd52a2 Mon Sep 17 00:00:00 2001 From: Ramy Asselin Date: Wed, 28 Jan 2015 11:36:23 -0800 Subject: [PATCH] Split out logrotate Change-Id: Id4bc423205a9c933c9cadb556d9f35d67f548c5b --- modules.env | 1 + modules/logrotate/manifests/file.pp | 24 ------------------------ modules/logrotate/manifests/init.pp | 17 ----------------- modules/logrotate/templates/config.erb | 24 ------------------------ 4 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 modules/logrotate/manifests/file.pp delete mode 100644 modules/logrotate/manifests/init.pp delete mode 100644 modules/logrotate/templates/config.erb diff --git a/modules.env b/modules.env index 5b2bbd3902..1426cafa2a 100644 --- a/modules.env +++ b/modules.env @@ -74,6 +74,7 @@ INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-zuul"]="or INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-kibana"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-lodgeit"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-log_processor"]="origin/master" +INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-logrotate"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-logstash"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-meetbot"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-mysql_backup"]="origin/master" diff --git a/modules/logrotate/manifests/file.pp b/modules/logrotate/manifests/file.pp deleted file mode 100644 index f7c0873131..0000000000 --- a/modules/logrotate/manifests/file.pp +++ /dev/null @@ -1,24 +0,0 @@ -# == Define: logrotate::file -# -define logrotate::file( $log, - $options, - $ensure=present, - $prerotate='undef', - $postrotate='undef', - $firstaction='undef', - $lastaction='undef') { - - # $options should be an array containing 1 or more logrotate - # directives (e.g. missingok, compress). - - include logrotate - - file { "/etc/logrotate.d/${name}": - ensure => $ensure, - owner => 'root', - group => 'root', - mode => '0644', - content => template('logrotate/config.erb'), - require => File['/etc/logrotate.d'], - } -} diff --git a/modules/logrotate/manifests/init.pp b/modules/logrotate/manifests/init.pp deleted file mode 100644 index 0d4da92ae8..0000000000 --- a/modules/logrotate/manifests/init.pp +++ /dev/null @@ -1,17 +0,0 @@ -# == Class: logrotate -# -# Adapted from http://projects.puppetlabs.com/projects/1/wiki/Logrotate_Patterns -# -class logrotate { - package { 'logrotate': - ensure => present, - } - - file { '/etc/logrotate.d': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - require => Package['logrotate'], - } -} diff --git a/modules/logrotate/templates/config.erb b/modules/logrotate/templates/config.erb deleted file mode 100644 index 619c2993e1..0000000000 --- a/modules/logrotate/templates/config.erb +++ /dev/null @@ -1,24 +0,0 @@ -<%= @log %> { -<% @options.each do |opt| -%> <%= opt %> -<% end -%> -<% if @prerotate != 'undef' -%> - prerotate - <%= @prerotate %> - endscript -<% end -%> -<% if @postrotate != 'undef' -%> - postrotate - <%= @postrotate %> - endscript -<% end -%> -<% if @firstaction != 'undef' -%> - firstaction - <%= @firstaction %> - endscript -<% end -%> -<% if @lastaction != 'undef' -%> - lastaction - <%= @lastaction %> - endscript -<% end -%> -}