]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
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 9c89dac2ec062ba382b5a5e34eece6cd1536ff2f..7c1f74e9beb6f6a72259a36a3c3706b7e6ff3834 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"
+        }
 }