class nodo::subsystem::motd( $message = hiera('nodo::subsystem::motd::message', ''), $network_name = hiera('nodo::subsystem::motd::network_name', 'Nodo') ) { if $message != '' { $append = "${message}\n" } else { $append = '' } file { "/etc/motd": owner => "root", group => "root", mode => '0644', ensure => file, content => "This is ${::fqdn} from the ${network_name}.\n${append}", } }