From 2ead031c3e15ad1aeee4113be3250a74fa4bc766 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 25 Jan 2013 10:40:42 -0200 Subject: Refactoring to use parametrized classes and hiera --- manifests/gitweb.pp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'manifests/gitweb.pp') diff --git a/manifests/gitweb.pp b/manifests/gitweb.pp index 045787d..1305390 100644 --- a/manifests/gitweb.pp +++ b/manifests/gitweb.pp @@ -1,19 +1,14 @@ # This class handles a gitweb installation. -class gitweb inherits git-manager { +class gitweb( + $protocol = hiera('git::web::protocol', 'git'), + $hosting_domain = hiera('git::web::hosting_domain', $::domain) + $implementation = hiera('git::daemon::implementation', 'gitolite') +) { + # the needed packages package { gitweb: ensure => installed } - $hosting_domain = $base_domain ? { - '' => $domain, - default => $base_domain, - } - - $base_url_protocol = $gitweb_protocol ? { - '' => 'git', - default => $gitweb_protocol, - } - # gitweb config file file { "/etc/gitweb.conf": owner => "root", -- cgit v1.2.3