Rebuild motd when the tail changes
authorStephen Gran <steve@lobefin.net>
Wed, 22 Apr 2009 23:12:15 +0000 (00:12 +0100)
committerStephen Gran <steve@lobefin.net>
Wed, 22 Apr 2009 23:12:15 +0000 (00:12 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/motd/manifests/init.pp

index 9c89dac..7c1f74e 100644 (file)
@@ -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"
+        }
 }