X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmotd%2Fmanifests%2Finit.pp;h=e8e6bcc0fa2033c1ea1411375b2852d275a187d0;hb=551d65d18436977c93a2ba7f4aa985a42bb41315;hp=7c1f74e9beb6f6a72259a36a3c3706b7e6ff3834;hpb=a85df2bee6c3751cb0ebe0a382ddd819da7e7f44;p=mirror%2Fdsa-puppet.git diff --git a/modules/motd/manifests/init.pp b/modules/motd/manifests/init.pp index 7c1f74e9b..e8e6bcc0f 100644 --- a/modules/motd/manifests/init.pp +++ b/modules/motd/manifests/init.pp @@ -1,9 +1,24 @@ +# = Class: motd +# +# This class configures a sensible motd +# +# == Sample Usage: +# +# include motd +# class motd { - file { "/etc/motd.tail": - notify => Exec["updatemotd"], - content => template("motd.erb") ; + + file { '/etc/motd.tail': + notify => Exec['updatemotd'], + content => template('motd/motd.erb') + } + file { '/etc/motd': + ensure => link, + target => '/var/run/motd' + } + + exec { 'updatemotd': + command => 'uname -snrvm > /var/run/motd && cat /etc/motd.tail >> /var/run/motd', + refreshonly => true, } - exec { "updatemotd": - command => "uname -snrvm > /var/run/motd && cat /etc/motd.tail >> /var/run/motd" - } }