aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/motd.pp
blob: ae59f9bcf42c05e8baa768f510a4d61908fcf338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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${append}",
  }
}