1 # the base class defining things common for all three static classes (master, mirror, source)
2 class staticsync::base inherits staticsync {
4 # fetch the list of static mirrors from PuppetDB
6 # This list is necessary so we can both do "include only these
7 # mirrors" but also "exclude these mirrors and include all others"
9 $query = 'nodes[certname] { resources { type = "Class" and title = "Staticsync::Static_mirror" } }'
10 $static_mirrors = sort(puppetdb_query($query).map |$value| { $value["certname"] })
12 file { '/etc/static-components.conf':
13 content => template('staticsync/static-components.conf.erb'),
16 file { '/usr/local/bin/staticsync-ssh-wrap':
17 source => 'puppet:///modules/staticsync/staticsync-ssh-wrap',
21 file { '/usr/local/bin/static-update-component':
22 source => 'puppet:///modules/staticsync/static-update-component',
26 file { '/etc/staticsync.conf':
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}