Merge remote-tracking branch 'origin/master' into staging
[mirror/dsa-puppet.git] / modules / roles / manifests / cdbuilder_local_mirror.pp
diff --git a/modules/roles/manifests/cdbuilder_local_mirror.pp b/modules/roles/manifests/cdbuilder_local_mirror.pp
new file mode 100644 (file)
index 0000000..9e9cc57
--- /dev/null
@@ -0,0 +1,21 @@
+class roles::cdbuilder_local_mirror {
+       include apache2
+
+       $apache_addr = "172.29.103.1"
+       $vhost_listen = "${apache_addr}:80"
+
+       apache2::site { '010-local-mirror.cdbuilder.debian.org':
+               site   => 'local-mirror.cdbuilder.debian.org',
+               content => template('roles/apache-local-mirror.cdbuilder.debian.org.erb'),
+       }
+
+       file { "/etc/apache2/ports.conf":
+               require => Package['apache2'],
+               content  => @("EOF"),
+                               # This file is maintained by puppet
+                               Listen 127.0.0.1:80
+                               Listen $vhost_listen
+                               | EOF
+               notify  => Service['apache2']
+       }
+}