From 0061fd31737b5e12e2252181c78fc9ac30740a7d Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 8 Jan 2010 00:44:26 +0100 Subject: some whitespace cleanup --- manifests/web/repo.pp | 62 +++++++++++++++++++++--------------------- manifests/web/repo/lighttpd.pp | 12 ++++---- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/manifests/web/repo.pp b/manifests/web/repo.pp index ce6ab15..5ecf27b 100644 --- a/manifests/web/repo.pp +++ b/manifests/web/repo.pp @@ -2,41 +2,41 @@ # projectroot: where the git repos are listened # projects_list: which repos to export define git::web::repo( - $ensure = 'present', - $projectroot, - $projects_list, - $sitename='absent' + $ensure = 'present', + $projectroot, + $projects_list, + $sitename='absent' ){ - include git::web - $gitweb_url = $name - case $gitweb_sitename { - 'absent': { $gitweb_sitename = "${name} git repository" } - default: { $gitweb_sitename = $sitename } + include git::web + $gitweb_url = $name + case $gitweb_sitename { + 'absent': { $gitweb_sitename = "${name} git repository" } + default: { $gitweb_sitename = $sitename } + } + $gitweb_config = "/etc/gitweb.d/${name}.conf" + file{"${gitweb_config}": } + if $ensure == 'present' { + File["${gitweb_config}"]{ + content => template("git/web/config") } - $gitweb_config = "/etc/gitweb.d/${name}.conf" - file{"${gitweb_config}": } - if $ensure == 'present' { - File["${gitweb_config}"]{ - content => template("git/web/config") - } - } else { - File["${gitweb_config}"]{ - ensure => absent, + } else { + File["${gitweb_config}"]{ + ensure => absent, + } + } + case $gitweb_webserver { + 'lighttpd': { + git::web::repo::lighttpd{$name: + ensure => $ensure, + gitweb_url => $gitweb_url, + gitweb_config => $gitweb_config, } } - case $gitweb_webserver { - 'lighttpd': { - git::web::repo::lighttpd{$name: - ensure => $ensure, - gitweb_url => $gitweb_url, - gitweb_config => $gitweb_config, - } - } - 'apache': { - apache::vhost::gitweb{$gitweb_url: - ensure => $ensure, - } + 'apache': { + apache::vhost::gitweb{$gitweb_url: + ensure => $ensure, } - default: { fail("no supported \$gitweb_webserver defined on ${fqdn}, so can't do git::web::repo: ${name}") } } + default: { fail("no supported \$gitweb_webserver defined on ${fqdn}, so can't do git::web::repo: ${name}") } + } } diff --git a/manifests/web/repo/lighttpd.pp b/manifests/web/repo/lighttpd.pp index f740290..413bb72 100644 --- a/manifests/web/repo/lighttpd.pp +++ b/manifests/web/repo/lighttpd.pp @@ -1,15 +1,15 @@ define git::web::repo::lighttpd( - ensure = 'present', - $gitweb_url, - $gitweb_config + $ensure = 'present', + $gitweb_url, + $gitweb_config ){ file{"/etc/lighttpd/gitweb.d/${name}.conf": } if $ensure == 'present' { include git::web::lighttpd File["/etc/lighttpd/gitweb.d/${name}.conf"]{ - content => template("git/web/lighttpd"), - notify => Service['lighttpd'], - owner => root, group => 0, mode => 0644; + content => template("git/web/lighttpd"), + notify => Service['lighttpd'], + owner => root, group => 0, mode => 0644; } } else { File["/etc/lighttpd/gitweb.d/${name}.conf"]{ -- cgit v1.2.3