From 51ae016d59fe7b2a57057c07ff40d3127c52814e Mon Sep 17 00:00:00 2001 From: Damien Lallement Date: Fri, 18 Mar 2011 18:20:30 +0000 Subject: add db backup and update class names to be more explicit --- modules/blog/manifests/init.pp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'modules/blog/manifests') diff --git a/modules/blog/manifests/init.pp b/modules/blog/manifests/init.pp index d3640638..dcaff643 100644 --- a/modules/blog/manifests/init.pp +++ b/modules/blog/manifests/init.pp @@ -10,7 +10,7 @@ class blog { } } - class champagne inherits base { + class files-bots inherits base { package { ['wget','php-mysql']: ensure => installed } @@ -55,4 +55,30 @@ class blog { mode => 644, } } + class db_backup inherits base { + file { "/var/lib/blog/backup/db": + ensure => directory, + owner => root, + group => root, + mode => 644, + } + + file { "backup_blog-db": + path => "/usr/local/bin/backup_blog-db.sh", + ensure => present, + owner => root, + group => root, + mode => 755, + content => template("blog/backup_blog-db.sh") + } + + cron { root: + user => root, + day => '*', + hour => '23', + minute => '42', + command => "/usr/local/bin/backup_blog-db.sh", + require => [File["backup_blog-db"]], + } + } } -- cgit v1.2.1