From a85df2bee6c3751cb0ebe0a382ddd819da7e7f44 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Thu, 23 Apr 2009 00:12:15 +0100 Subject: [PATCH] Rebuild motd when the tail changes Signed-off-by: Stephen Gran --- modules/motd/manifests/init.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/motd/manifests/init.pp b/modules/motd/manifests/init.pp index 9c89dac2..7c1f74e9 100644 --- a/modules/motd/manifests/init.pp +++ b/modules/motd/manifests/init.pp @@ -1,5 +1,9 @@ class motd { file { "/etc/motd.tail": + notify => Exec["updatemotd"], content => template("motd.erb") ; } + exec { "updatemotd": + command => "uname -snrvm > /var/run/motd && cat /etc/motd.tail >> /var/run/motd" + } } -- 2.39.2