From: Stephen Gran Date: Sun, 16 Dec 2012 11:31:38 +0000 (+0000) Subject: make the lint gods happy X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=commitdiff_plain;h=b5b17876a34290b9816805a274c81a2ffc209145 make the lint gods happy Signed-off-by: Stephen Gran --- diff --git a/modules/bacula/manifests/storage.pp b/modules/bacula/manifests/storage.pp index 7b1c1a83..5a0132d3 100644 --- a/modules/bacula/manifests/storage.pp +++ b/modules/bacula/manifests/storage.pp @@ -15,7 +15,7 @@ class bacula::storage inherits bacula { # jobs exec { 'bacula-sd reload': path => '/usr/bin:/usr/sbin:/bin:/sbin', - command => 'true', + command => '/bin/true', refreshonly => true, } diff --git a/modules/munin/manifests/init.pp b/modules/munin/manifests/init.pp index 8258f9b1..9684a294 100644 --- a/modules/munin/manifests/init.pp +++ b/modules/munin/manifests/init.pp @@ -62,12 +62,12 @@ class munin { @@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', } diff --git a/modules/roles/manifests/static_base.pp b/modules/roles/manifests/static_base.pp index 267c8ba6..e062a9e5 100644 --- a/modules/roles/manifests/static_base.pp +++ b/modules/roles/manifests/static_base.pp @@ -1,17 +1,12 @@ 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: diff --git a/modules/roles/manifests/static_master.pp b/modules/roles/manifests/static_master.pp index df11d6a4..0816754d 100644 --- a/modules/roles/manifests/static_master.pp +++ b/modules/roles/manifests/static_master.pp @@ -1,26 +1,23 @@ -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: diff --git a/modules/roles/manifests/static_mirror.pp b/modules/roles/manifests/static_mirror.pp index 60aa0743..1aa20d77 100644 --- a/modules/roles/manifests/static_mirror.pp +++ b/modules/roles/manifests/static_mirror.pp @@ -1,41 +1,38 @@ -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: diff --git a/modules/roles/manifests/static_source.pp b/modules/roles/manifests/static_source.pp index e44624b9..821a6cf0 100644 --- a/modules/roles/manifests/static_source.pp +++ b/modules/roles/manifests/static_source.pp @@ -1,14 +1,10 @@ -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: