# jobs
exec { 'bacula-sd reload':
path => '/usr/bin:/usr/sbin:/bin:/sbin',
- command => 'true',
+ command => '/bin/true',
refreshonly => true,
}
@@munin::master-per-node {
$::fqdn:
- ipaddress => $::ipaddress,
+ ipaddress => $::ipaddress,
munin_async => $::munin_async,
;
}
- if $munin_async and $munin_async == 'true' {
+ if $::munin_async and str2bool($::munin_async) == true {
file { '/etc/ssh/userkeys/munin-async':
source => 'puppet:///modules/munin/munin-async-authkeys',
}
class roles::static_base {
- if ! $::staticsync_key {
- exec { 'create-staticsync-key':
- command => '/bin/su - staticsync -c \'mkdir -p -m 02700 .ssh && ssh-keygen -C "`whoami`@`hostname` (`date +%Y-%m-%d`)" -P "" -f .ssh/id_rsa -q\'',
- onlyif => '/usr/bin/getent passwd staticsync > /dev/null && ! [ -e /home/staticsync/.ssh/id_rsa ]'
- }
- }
+ if ! $::staticsync_key {
+ exec { 'create-staticsync-key':
+ command => '/bin/su - staticsync -c \'mkdir -p -m 02700 .ssh && ssh-keygen -C "`whoami`@`hostname` (`date +%Y-%m-%d`)" -P "" -f .ssh/id_rsa -q\'',
+ onlyif => '/usr/bin/getent passwd staticsync > /dev/null && ! [ -e /home/staticsync/.ssh/id_rsa ]'
+ }
+ }
- file {
- '/etc/static-components.conf':
- source => "puppet:///modules/roles/static-mirroring/static-components.conf",
- ;
- }
+ file { '/etc/static-components.conf':
+ source => 'puppet:///modules/roles/static-mirroring/static-components.conf',
+ }
}
-# vim:set et:
-# vim:set sts=4 ts=4:
-# vim:set shiftwidth=4:
-class roles::static_master inherits roles::static_base {
- file {
- '/etc/ssh/userkeys/staticsync':
- content => template('roles/static-mirroring/static-master-authorized_keys.erb'),
- ;
- '/usr/local/bin/static-master-run':
- source => "puppet:///modules/roles/static-mirroring/static-master-run",
- mode => 555,
- ;
- '/usr/local/bin/static-master-ssh-wrap':
- source => "puppet:///modules/roles/static-mirroring/static-master-ssh-wrap",
- mode => 555,
- ;
- '/usr/local/bin/static-master-update-component':
- source => "puppet:///modules/roles/static-mirroring/static-master-update-component",
- mode => 555,
- ;
+class roles::static_master {
- '/etc/static-clients.conf':
- content => template('roles/static-mirroring/static-clients.conf.erb'),
- ;
- }
+ include roles::static_base
+
+ file { '/etc/ssh/userkeys/staticsync':
+ content => template('roles/static-mirroring/static-master-authorized_keys.erb'),
+ }
+ file { '/usr/local/bin/static-master-run':
+ source => 'puppet:///modules/roles/static-mirroring/static-master-run',
+ mode => '0555',
+ }
+ file {'/usr/local/bin/static-master-ssh-wrap':
+ source => 'puppet:///modules/roles/static-mirroring/static-master-ssh-wrap',
+ mode => '0555',
+ }
+ file { '/usr/local/bin/static-master-update-component':
+ source => 'puppet:///modules/roles/static-mirroring/static-master-update-component',
+ mode => '0555',
+ }
+ file { '/etc/static-clients.conf':
+ content => template('roles/static-mirroring/static-clients.conf.erb'),
+ }
}
-# vim:set et:
-# vim:set sts=4 ts=4:
-# vim:set shiftwidth=4:
-class roles::static_mirror inherits roles::static_source {
- include apache2
-
- package { 'libapache2-mod-macro':
- ensure => installed,
- }
-
- apache2::module { 'macro': require => Package['libapache2-mod-macro']; }
- apache2::module { 'rewrite': }
- apache2::module { 'expires': }
-
- file {
- '/usr/local/bin/static-mirror-run':
- source => "puppet:///modules/roles/static-mirroring/static-mirror-run",
- mode => 555,
- ;
-
- "/srv/static.debian.org":
- ensure => directory,
- owner => staticsync,
- group => staticsync,
- mode => '02755'
- ;
- "/etc/cron.d/puppet-static-mirror":
- content => "PATH=/usr/local/bin:/usr/bin:/bin\n@reboot staticsync sleep 60; static-mirror-run --one-stage /srv/static.debian.org bizet.debian.org:-live- > /dev/null\n",
- ;
- }
-
- $vhost_listen = $::hostname ? {
- klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80',
- default => '*:80',
- }
-
- apache2::site { '010-planet.debian.org':
- site => 'planet.debian.org',
- content => template('roles/static-mirroring/vhost/planet.debian.org.erb'),
- }
+class roles::static_mirror {
+
+ include roles::static_source
+
+ package { 'libapache2-mod-macro':
+ ensure => installed,
+ }
+
+ apache2::module { 'macro': require => Package['libapache2-mod-macro']; }
+ apache2::module { 'rewrite': }
+ apache2::module { 'expires': }
+
+ file { '/usr/local/bin/static-mirror-run':
+ source => 'puppet:///modules/roles/static-mirroring/static-mirror-run',
+ mode => '0555',
+ }
+
+ file { '/srv/static.debian.org':
+ ensure => directory,
+ owner => staticsync,
+ group => staticsync,
+ mode => '02755'
+ }
+
+ file { '/etc/cron.d/puppet-static-mirror':
+ content => "PATH=/usr/local/bin:/usr/bin:/bin\n@reboot staticsync sleep 60; static-mirror-run --one-stage /srv/static.debian.org bizet.debian.org:-live- > /dev/null\n",
+ }
+
+ $vhost_listen = $::hostname ? {
+ klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80',
+ default => '*:80',
+ }
+
+ apache2::site { '010-planet.debian.org':
+ site => 'planet.debian.org',
+ content => template('roles/static-mirroring/vhost/planet.debian.org.erb'),
+ }
}
-# vim:set et:
-# vim:set sts=4 ts=4:
-# vim:set shiftwidth=4:
-class roles::static_source inherits roles::static_base {
- file {
- '/etc/ssh/userkeys/staticsync':
- content => template('roles/static-mirroring/static-mirror-authorized_keys.erb'),
- ;
- '/usr/local/bin/static-mirror-ssh-wrap':
- source => "puppet:///modules/roles/static-mirroring/static-mirror-ssh-wrap",
- mode => 555,
- ;
- }
+class roles::static_source {
+ include roles::static_base
+ file { '/etc/ssh/userkeys/staticsync':
+ content => template('roles/static-mirroring/static-mirror-authorized_keys.erb'),
+ }
+ file { '/usr/local/bin/static-mirror-ssh-wrap':
+ source => 'puppet:///modules/roles/static-mirroring/static-mirror-ssh-wrap',
+ mode => '0555',
+ }
}
-# vim:set et:
-# vim:set sts=4 ts=4:
-# vim:set shiftwidth=4: