exim blacklist: add more recent spammers
[mirror/dsa-puppet.git] / modules / staticsync / manifests / base.pp
1 # the base class defining things common for all three static classes (master, mirror, source)
2 class staticsync::base inherits staticsync {
3
4   # fetch the list of static mirrors from PuppetDB
5   #
6   # This list is necessary so we can both do "include only these
7   # mirrors" but also "exclude these mirrors and include all others"
8   # in the config.
9   $query = 'nodes[certname] { resources { type = "Class" and title = "Staticsync::Static_mirror" } }'
10   $static_mirrors = sort(puppetdb_query($query).map |$value| { $value["certname"] })
11
12   file { '/etc/static-components.conf':
13     content => template('staticsync/static-components.conf.erb'),
14   }
15
16   file { '/usr/local/bin/staticsync-ssh-wrap':
17     source => 'puppet:///modules/staticsync/staticsync-ssh-wrap',
18     mode   => '0555',
19   }
20
21   file { '/usr/local/bin/static-update-component':
22     source => 'puppet:///modules/staticsync/static-update-component',
23     mode   => '0555',
24   }
25
26   file { '/etc/staticsync.conf':
27     content  => @("EOF"),
28         # This file is sourced by bash
29         # and parsed by python
30         #  - empty lines and lines starting with a # are ignored.
31         #  - other lines are key=value.  No extra spaces anywhere.  No quoting.
32         base=${staticsync::basedir}
33         masterbase=${staticsync::basedir}/master
34         staticuser=${staticsync::user}
35         | EOF
36   }
37 }