Make staticsync a module and update references
[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   file { '/etc/static-clients.conf':
26     content => template('staticsync/static-clients.conf.erb'),
27   }
28 #  concat { '/etc/static-clients.conf':
29 #    ensure_newline => true,
30 #    warn           => @(EOF),
31 #    ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
32 #    | EOF
33 #  }
34 #  Concat::Fragment <<| tag == 'staticsync::static-mirrors-to-trigger' |>>
35
36   file { "/home/${staticsync::user}/static-master":
37     ensure => link,
38     target => $staticsync::basedir,
39   }
40   file { "${staticsync::basedir}/master":
41     ensure => directory,
42     mode   => '0755',
43     owner  => $staticsync::user,
44     group  => $staticsync::user,
45   }
46 }