From: Peter Palfrader Date: Mon, 13 Jul 2015 14:51:59 +0000 (+0200) Subject: git.dgit X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=77fbd7921cd9a7815e713345c574771617ddd4d3;p=mirror%2Fdsa-puppet.git git.dgit --- diff --git a/hieradata/common.yaml b/hieradata/common.yaml index dfb82e1cf..b4e63df66 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -40,6 +40,8 @@ roles: - coccia.debian.org dgit_browse: - cgi-grnet-01.debian.org + dgit_git: + - cgi-grnet-01.debian.org git_master: - adayevskaya.debian.org keyring: diff --git a/modules/roles/files/dgit/git.dgit.debian.org b/modules/roles/files/dgit/git.dgit.debian.org new file mode 100644 index 000000000..4eafe3fa1 --- /dev/null +++ b/modules/roles/files/dgit/git.dgit.debian.org @@ -0,0 +1,37 @@ +#Use common-dsa-vhost-https-redirect git.dgit.debian.org + + + ServerName git.dgit.debian.org + ServerAdmin dgit-owner@debian.org + + ErrorLog /var/log/apache2/git.dgit.debian.org-ssl-error.log + CustomLog /var/log/apache2/git.dgit.debian.org-ssl-access.log privacy + + #Use common-debian-service-ssl git.dgit.debian.org + #Use common-ssl-HSTS + + + UserDir disabled + + + DocumentRoot /srv/dgit.debian.org/unpriv/repos + + AllowOverride None + Options SymlinksIfOwnerMatch Indexes + IndexOptions FancyIndexing NameWidth=* + + + SetEnv GIT_PROJECT_ROOT /srv/dgit.debian.org/unpriv/repos + AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /srv/dgit.debian.org/unpriv/repos/$1 + AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /srv/dgit.debian.org/unpriv/repos/$1 + ScriptAlias /git/ /usr/lib/git-core/git-http-backend/ + + RewriteEngine On + RewriteRule ^/$ http://browse.dgit.debian.org/ [L,R=301] + RewriteRule ^/git/?$ http://browse.dgit.debian.org/ [L,R=301] + + RewriteRule ^/git/ - [L] + RewriteRule ^/(.*) /git/$1 [PT,L] + + +# vim:set syntax=apache: diff --git a/modules/roles/manifests/dgit_git.pp b/modules/roles/manifests/dgit_git.pp new file mode 100644 index 000000000..33838cd9f --- /dev/null +++ b/modules/roles/manifests/dgit_git.pp @@ -0,0 +1,11 @@ +class roles::dgit_browse { + #ssl::service { 'git.dgit.debian.org': + # notify => Service['apache2'], + #} + + apache2::site { '010-git.dgit.debian.org': + site => 'git.dgit.debian.org', + source => 'puppet:///modules/roles/dgit/git.dgit.debian.org', + } + +} diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index 09de1f91e..edf4d3e9f 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -251,4 +251,7 @@ class roles { if has_role('dgit_browse') { include dgit_browse } + if has_role('dgit_git') { + include dgit_git + } }