diff options
Diffstat (limited to '')
-rw-r--r-- | manifests/filter.pp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/manifests/filter.pp b/manifests/filter.pp index 1c092f1..76bdcd3 100644 --- a/manifests/filter.pp +++ b/manifests/filter.pp @@ -19,24 +19,25 @@ define cgit::filter ( default => 'exec', } ) { - - include ::cgit::filter_setup + include cgit::filter_setup $dest = "${cgit::filterpath}/${filtername}-filter" + $mode = $type ? { + 'lua' => '0444', + 'exec' => '0555', + } + file { $dest: ensure => file, - mode => $type ? { - 'lua' => '0444', - 'exec' => '0555', - }, + mode => $mode, source => $source, content => $content, * => $file_props, } concat::fragment { "cgit config filter ${filtername}": - target => $::cgit::cgitrc, + target => $cgit::cgitrc, content => "${filtername}-filter=${type}:${dest}\n", require => File[$dest], } |