From 59abd329593b5a9b145117f998a6ba9183091269 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sat, 17 Mar 2012 12:03:46 +0000 Subject: clean the script + cronjob declaration like the backup one --- modules/blog/manifests/init.pp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'modules/blog') diff --git a/modules/blog/manifests/init.pp b/modules/blog/manifests/init.pp index 8a1fcf17..84cf94d4 100644 --- a/modules/blog/manifests/init.pp +++ b/modules/blog/manifests/init.pp @@ -19,20 +19,15 @@ class blog { 'php-ldap', 'unzip']: } - file { "check_new-blog-post": - path => "/usr/local/bin/check_new-blog-post.sh", - ensure => present, - owner => root, - group => root, - mode => 755, - content => template("blog/check_new-blog-post.sh") + local_script { 'check_new-blog-post.sh': + content => template('blog/check_new-blog-post.sh'), } - - cron { "Blog bot": - user => blog, - minute => '*/15', - command => "/usr/local/bin/check_new-blog-post.sh", - require => [File["check_new-blog-post"], User['blog']], + + cron { 'Blog bot': + user => 'blog', + minute => '*/15', + command => '/usr/local/bin/check_new-blog-post.sh', + require => Local_script['check_new-blog-post.sh'], } include apache::mod_php -- cgit v1.2.1