move things from modules/roles/static* to modules/static*
[mirror/dsa-puppet.git] / modules / staticsync / manifests / static_master.pp
1 # static master
2 #
3 # each component defines exactly one static master.  Content is copied from the source host
4 # to the master, and from there to all the mirrors.
5 #
6 class roles::static_master {
7   include roles::static::base
8   include roles::static::srvdir
9
10   # masters need to talk to mirrors and sources and themselves
11   class { 'roles::static::ssh':
12     add_tag     => [ 'staticsync-mirror', 'staticsync-source', 'staticsync-master' ],
13     collect_tag => 'staticsync-master',
14   }
15
16   file { '/usr/local/bin/static-master-run':
17     source => 'puppet:///modules/roles/static-mirroring/static-master-run',
18     mode   => '0555',
19   }
20   file { '/usr/local/bin/static-master-update-component':
21     source => 'puppet:///modules/roles/static-mirroring/static-master-update-component',
22     mode   => '0555',
23   }
24   file { '/etc/static-clients.conf':
25     content => template('roles/static-mirroring/static-clients.conf.erb'),
26   }
27
28   file { '/home/staticsync/static-master':
29     ensure => link,
30     target => '/srv/static.debian.org',
31   }
32   file { '/srv/static.debian.org/master':
33     ensure => directory,
34     mode   => '0755',
35     owner  => 'staticsync',
36     group  => 'staticsync',
37   }
38 }