Index: modules/sitescripts/manifests/init.pp |
=================================================================== |
--- a/modules/sitescripts/manifests/init.pp |
+++ b/modules/sitescripts/manifests/init.pp |
@@ -1,19 +1,28 @@ |
class sitescripts ( |
$sitescriptsini_source = undef |
){ |
- file {'/etc/sitescripts.ini': |
+ concat {'/etc/sitescripts.ini': |
mode => 644, |
owner => root, |
group => root, |
- source => $sitescriptsini_source |
} |
+ define configfragment($source = $title) |
+ { |
+ concat::fragment {$source: |
+ target => '/etc/sitescripts.ini', |
+ source => $source |
+ } |
+ } |
+ |
+ configfragment {$sitescriptsini_source: } |
+ |
exec { "fetch_sitescripts": |
command => "hg clone https://hg.adblockplus.org/sitescripts /opt/sitescripts", |
path => ["/usr/bin/", "/bin/"], |
require => Package['mercurial'], |
onlyif => "test ! -d /opt/sitescripts" |
} |
cron {"update_sitescripts": |