X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmotd%2Fmanifests%2Finit.pp;h=e8e6bcc0fa2033c1ea1411375b2852d275a187d0;hb=339ca9bfbfe7a777689ac438e19c4762cc7d16f7;hp=0de4936028982dcef035393442d4fe724e922ba0;hpb=7f86914b9cb237cb1cf8c720f86902bef717cfaa;p=mirror%2Fdsa-puppet.git diff --git a/modules/motd/manifests/init.pp b/modules/motd/manifests/init.pp index 0de493602..e8e6bcc0f 100644 --- a/modules/motd/manifests/init.pp +++ b/modules/motd/manifests/init.pp @@ -1,15 +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/motd.erb") ; - "/etc/motd": - ensure => "/var/run/motd"; + + 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", - refreshonly => true - } } -# vim:set et: -# vim:set sts=4 ts=4: -# vim:set shiftwidth=4: