set expires: headers on alioth-archive
[mirror/dsa-puppet.git] / modules / roles / manifests / static_master.pp
index 73f74c8..c16870a 100644 (file)
@@ -1,6 +1,6 @@
 class roles::static_master {
-
        include roles::static_base
+       include roles::static_srvdir
 
        file { '/usr/local/bin/static-master-run':
                source => 'puppet:///modules/roles/static-mirroring/static-master-run',
@@ -13,4 +13,34 @@ class roles::static_master {
        file { '/etc/static-clients.conf':
                content => template('roles/static-mirroring/static-clients.conf.erb'),
        }
+
+       file { "/home/staticsync/static-master":
+               ensure => link,
+               target => '/srv/static.debian.org',
+       }
+       file { '/srv/static.debian.org/master':
+               ensure => directory,
+               mode   => '0755',
+               owner  => 'staticsync',
+               group  => 'staticsync',
+       }
+
+       # export some information for the onion.debian.org build
+       if $::hostname in [dillon] {
+               file { '/srv/puppet.debian.org':
+                       ensure => directory
+               }
+               file { '/srv/puppet.debian.org/puppet-facts':
+                       ensure => directory
+               }
+               concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml':
+                       notify  => Exec["rebuild-onion-website"],
+               }
+               Concat::Fragment <<| tag == "onionbalance-services.yaml" |>>
+
+               exec { 'rebuild-onion-website':
+                       command => '/bin/su - staticsync -c \'make -C /srv/onion-master.debian.org\'',
+                       refreshonly => true,
+               }
+       }
 }