Puppet Class: r_profile::motd

Defined in:
manifests/motd.pp

Overview

R_profile::Motd

Simple MOTD support for POSIX and Windows. To ensure file permissions are explicitly set, I had to use a resource collector against the files that the ‘puppetlabs-motd` module creates.

Parameters:

  • template (Any) (defaults to: hiera("r_profile::motd::template", "${module_name}/motd.erb"))

    Process this tempalate and pass the evaluated string to the ‘puppetlabs-motd` module

  • content (Any) (defaults to: hiera("r_profile::motd::content", undef))

    Complete message as to insert into /etc/motd

  • issue_content (Any) (defaults to: hiera("r_profile::motd::issue_content", undef))

    Complete message as to insert into /etc/issue

  • issue_net_content (Any) (defaults to: hiera("r_profile::motd::issue_net_content", undef))

    Complete message as to insert into /etc/issue.net



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'manifests/motd.pp', line 12

class r_profile::motd(
    $template           = hiera("r_profile::motd::template", "${module_name}/motd.erb"),
    $content            = hiera("r_profile::motd::content", undef),
    $issue_content      = hiera("r_profile::motd::issue_content", undef),
    $issue_net_content  = hiera("r_profile::motd::issue_net_content", undef),
) {

  # content overrides template
  $_content = pick($content, template($template))
  class { "motd":
    content           => $_content,
    issue_content     => $issue_content,
    issue_net_content => $issue_net_content,
  }
}