Note that exim contains tracker-specific configuration
[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 staticsync::static_master (
7 ) {
8   include staticsync::base
9   include staticsync::srvdir
10
11   # masters need to talk to mirrors and sources and themselves
12   class { 'staticsync::ssh':
13     add_tag     => [ 'staticsync-mirror', 'staticsync-source', 'staticsync-master' ],
14     collect_tag => 'staticsync-master',
15   }
16
17   file { '/usr/local/bin/static-master-run':
18     source => 'puppet:///modules/staticsync/static-master-run',
19     mode   => '0555',
20   }
21   file { '/usr/local/bin/static-master-update-component':
22     source => 'puppet:///modules/staticsync/static-master-update-component',
23     mode   => '0555',
24   }
25   concat { '/etc/static-clients.conf':
26     ensure_newline => true,
27     warn           => @(EOF),
28     ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
29     | EOF
30   }
31   Concat::Fragment <<| tag == 'staticsync::static-mirrors-to-trigger' |>>
32
33   file { "/home/${staticsync::user}/static-master":
34     ensure => link,
35     target => $staticsync::basedir,
36   }
37   file { "${staticsync::basedir}/master":
38     ensure => directory,
39     mode   => '0755',
40     owner  => $staticsync::user,
41     group  => $staticsync::user,
42   }
43 }