Puppet Class: psick::motd

Defined in:
manifests/motd.pp

Overview

This class manages /etc/motd and /etc/issue files.

Parameters:

  • motd_file_ensure (String) (defaults to: 'present')

    If to create or remove /etc/motd

  • motd_file_template (String) (defaults to: 'psick/motd/motd.erb')

    The path of the erb template (as used in template()) to use for the content of /etc/motd. If empty the file is not managed.

  • motd_file_extratext

    A custom extra string to add at the end of the default template of /etc/motd

  • issue_file_ensure (String) (defaults to: 'present')

    If to create or remove /etc/issue

  • issue_file_template (String) (defaults to: 'psick/motd/issue.erb')

    The path of the erb template (as used in template()) to use for the content of /etc/issue If empty the file is not managed.

  • issue_file_extratext

    A custom extra string to add at the end of the default template of /etc/issue

  • motd_extratext (String) (defaults to: '')
  • issue_extratext (String) (defaults to: '')


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'manifests/motd.pp', line 16

class psick::motd (
  String $motd_file_ensure    = 'present',
  String $motd_file_template  = 'psick/motd/motd.erb',
  String $motd_extratext      = '',

  String $issue_file_ensure   = 'present',
  String $issue_file_template = 'psick/motd/issue.erb',
  String $issue_extratext     = '',
) {

  if $motd_file_template != '' {
    file { '/etc/motd':
      ensure  => $motd_file_ensure,
      content => template($motd_file_template),
    }
  }
  if $issue_file_template != '' {
    file { '/etc/issue':
      ensure  => $issue_file_ensure,
      content => template($issue_file_template),
    }
  }
}