]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Motd: support for additional message
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 31 May 2017 22:48:48 +0000 (19:48 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 31 May 2017 22:48:48 +0000 (19:48 -0300)
manifests/subsystem/motd.pp

index 0ed8cbe83cfd23b3fbba5a66f4137c48c049ceb4..ae59f9bcf42c05e8baa768f510a4d61908fcf338 100644 (file)
@@ -1,11 +1,16 @@
 class nodo::subsystem::motd(
+  $message      = hiera('nodo::subsystem::motd::message', ''),
   $network_name = hiera('nodo::subsystem::motd::network_name', 'Nodo')
 ) {
+  if $message != '' {
+    $append = "${message}\n"
+  }
+
   file { "/etc/motd":
     owner   => "root",
     group   => "root",
     mode    => 0644,
     ensure  => file,
-    content => "This is ${::fqdn} from the ${network_name}.\n",
+    content => "This is ${::fqdn} from the ${network_name}.\n${append}",
   }
 }