diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:05:56 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:05:56 +0000 |
commit | 255c868d79be6b2725570a70c51ce9e54e9313bd (patch) | |
tree | b9816e304b8d54bb6dcb701721dc38a67425b9b7 /modules/buildsystem/templates | |
parent | 283e0a113727d6af901537a3b481683b3379112b (diff) | |
download | puppet-255c868d79be6b2725570a70c51ce9e54e9313bd.tar puppet-255c868d79be6b2725570a70c51ce9e54e9313bd.tar.gz puppet-255c868d79be6b2725570a70c51ce9e54e9313bd.tar.bz2 puppet-255c868d79be6b2725570a70c51ce9e54e9313bd.tar.xz puppet-255c868d79be6b2725570a70c51ce9e54e9313bd.zip |
buildsystem: don't hardcode distros in vhost_repository.conf
Use buildsystem::var::distros settings in vhost_repository.conf
template.
The URLs for the infra_1 and infra_2 repositories have been changed, and
will need to be updated in urpmi configuration on servers using those
repositories.
The old URLs were :
- http://repository.mageia.org/distrib/infra_1/
- http://repository.mageia.org/distrib/infra_2/
The new URLs are now :
- http://repository.mageia.org/bootstrap/infra_1/
- http://repository.mageia.org/bootstrap/infra_2/
Diffstat (limited to 'modules/buildsystem/templates')
-rw-r--r-- | modules/buildsystem/templates/vhost_repository.conf | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/modules/buildsystem/templates/vhost_repository.conf b/modules/buildsystem/templates/vhost_repository.conf index cc0e437a..167c026e 100644 --- a/modules/buildsystem/templates/vhost_repository.conf +++ b/modules/buildsystem/templates/vhost_repository.conf @@ -1,40 +1,45 @@ -<% -# FIXME: add a reverse lookup for IPv6 adresses -# allowed hosts are: valstar, ecosse, jonund -# Which ip is 2a02:2178:2:7::5/64 ? -buildsystem_nodes = "2a02:2178:2:7::3/64 2a02:2178:2:7::4/64 2a02:2178:2:7::5/64 fe80::230:48ff:fecf:101c/64" +<%- mirror_root = scope.lookupvar('buildsystem::var::repository::mirror_root') -%> - +mirror_reporoot = scope.lookupvar('buildsystem::var::repository::mirror_reporoot') +bootstrap_reporoot = scope.lookupvar('buildsystem::var::repository::bootstrap_reporoot') +distros = scope.lookupvar('buildsystem::var::distros::distros') +-%> <VirtualHost *:80> ServerName <%= scope.lookupvar('buildsystem::var::repository::hostname') %> DocumentRoot <%= mirror_root %> - Alias /distrib/infra_1/ "/distrib/bootstrap/distrib/infra_1/" - Alias /distrib/infra_2/ "/distrib/bootstrap/distrib/infra_2/" - - <Directory <%= mirror_root %>> - Order deny,allow - Deny from all - Allow from localhost, 127.0.0.1 - Allow from <%= buildsystem_nodes %> - Allow from .<%= @domain %> - Allow from 10.42.0 - # FIXME: add a reverse lookup for rabbit - Allow from 212.85.158.152 212.85.158.149 - Options Indexes FollowSymLinks - </Directory> +<%- + distros.each{|distroname,distro| + allow_from = distro['repo_allow_from'] != nil ? distro['repo_allow_from'] : [ 'all' ] +%> + Alias /bootstrap/<%= distroname %>/ "<%= bootstrap_reporoot %>/<%= distroname %>/" - <Directory /distrib/bootstrap/distrib/infra_1> + <Directory <%= bootstrap_reporoot %>/<%= distroname %>> Header append Cache-Control "public, must-revalidate" Order deny,allow - Allow from all +<%- + for allow in allow_from do +-%> + Allow from <%= allow %> +<%- + end +-%> Options Indexes FollowSymLinks </Directory> - <Directory /distrib/bootstrap/distrib/infra_2> + <Directory <%= mirror_reporoot %>/<%= distroname %>> Header append Cache-Control "public, must-revalidate" Order deny,allow - Allow from all + Deny from all +<%- + for allow in allow_from do +-%> + Allow from <%= allow %> +<%- + end +-%> Options Indexes FollowSymLinks </Directory> +<%- + } +-%> </VirtualHost> |