From 4aa867dd7fab505a1d9a7ee09d040e100b3a455c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 15 Jan 2023 12:17:08 +0100 Subject: Fix linter warnings. --- manifests/filter.pp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'manifests/filter.pp') 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], } -- cgit v1.2.3