X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmotd%2Fmanifests%2Finit.pp;h=a8d35a550569e72453824e52caccaeba7b99997a;hb=44ce3cff49b71e9c60c07751088c64467fca4bb5;hp=0068a5aae9f4393e67c59f54c8f090fceae22070;hpb=bb078c190ab2c062613d4f26d105f682269af5b3;p=mirror%2Fdsa-puppet.git diff --git a/modules/motd/manifests/init.pp b/modules/motd/manifests/init.pp index 0068a5aae..a8d35a550 100644 --- a/modules/motd/manifests/init.pp +++ b/modules/motd/manifests/init.pp @@ -1,5 +1,12 @@ class motd { - file { "/etc/motd": - content => template("motd.erb") ; + file { "/etc/motd.tail": + notify => Exec["updatemotd"], + content => template("motd/motd.erb") ; + "/etc/motd": + ensure => "/var/run/motd"; } + exec { "updatemotd": + command => "uname -snrvm > /var/run/motd && cat /etc/motd.tail >> /var/run/motd", + refreshonly => true + } }