From 98b93f6a1ee83010442b12d4f26b5471ab3bdf48 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 31 May 2017 19:48:48 -0300 Subject: Motd: support for additional message --- manifests/subsystem/motd.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/manifests/subsystem/motd.pp b/manifests/subsystem/motd.pp index 0ed8cbe..ae59f9b 100644 --- a/manifests/subsystem/motd.pp +++ b/manifests/subsystem/motd.pp @@ -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}", } } -- cgit v1.2.3