motd: squeeze cleanup
[mirror/dsa-puppet.git] / modules / motd / manifests / init.pp
1 # = Class: motd
2 #
3 # This class configures a sensible motd
4 #
5 # == Sample Usage:
6 #
7 #   include motd
8 #
9 class motd {
10         file { '/etc/update-motd.d':
11                 ensure => directory,
12                 mode   => '0755'
13         }
14         file { '/etc/motd.tail':
15                 ensure => absent,
16         }
17
18         file { '/etc/motd':
19                 ensure => link,
20                 target => '/var/run/motd'
21         }
22
23         file { '/etc/update-motd.d/puppet-motd':
24                 notify  => undef,
25                 mode    => '0555',
26                 content => template('motd/motd.erb')
27         }
28
29         exec { 'updatemotd':
30                 command     => 'uname -snrvm > /var/run/motd && cat /etc/motd.tail >> /var/run/motd',
31                 refreshonly => true,
32         }
33 }