aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/nodes.pp2
-rw-r--r--modules/blog/manifests/init.pp25
2 files changed, 26 insertions, 1 deletions
diff --git a/manifests/nodes.pp b/manifests/nodes.pp
index 68720989..b6c1c2a7 100644
--- a/manifests/nodes.pp
+++ b/manifests/nodes.pp
@@ -169,7 +169,7 @@ node champagne {
include default_mageia_server
timezone::timezone { "Europe/Paris": }
include blog::files-bots
- #include blog::files_backup
+ include blog::files_backup
include planet
include websites::static
}
diff --git a/modules/blog/manifests/init.pp b/modules/blog/manifests/init.pp
index e42549cc..0c895bf4 100644
--- a/modules/blog/manifests/init.pp
+++ b/modules/blog/manifests/init.pp
@@ -80,4 +80,29 @@ class blog {
require => [File["backup_blog-db"]],
}
}
+ class files_backup inherits base {
+ file { "/var/lib/blog/backup":
+ ensure => directory,
+ owner => root,
+ group => root,
+ mode => 644,
+ }
+
+ file { "backup_blog-files":
+ path => "/usr/local/bin/backup_blog-files.sh",
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 755,
+ content => template("blog/backup_blog-files.sh")
+ }
+
+ cron { "Backup files (blog)":
+ user => root,
+ hour => '23',
+ minute => '42',
+ command => "/usr/local/bin/backup_blog-files.sh",
+ require => [File["backup_blog-files"]],
+ }
+ }
}