aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/motd.pp
blob: 1ce0038d0d99f3db77200202b84f137d2f33756a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class nodo::subsystem::motd(
  $message      = lookup('nodo::subsystem::motd::message', undef, undef, ''),
  $network_name = lookup('nodo::subsystem::motd::network_name', undef, undef, '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}",
  }
}