Puppet Class: motd

Defined in:
modules/motd/manifests/init.pp

Overview

Class: motd

Module for customizing MOTD (Message of the Day) banners.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'modules/motd/manifests/init.pp', line 5

class motd {
    # This was incomplete & buggy in jessie, as detailed in
    # https://lists.debian.org/debian-devel/2014/12/msg00368.html
    #
    # This has been fixed since in stretch onwards.
    if os_version('debian jessie') {
        file { '/etc/motd':
            ensure => link,
            target => '/var/run/motd',
            force  => true,
        }
    } else {
        # Kill Debian's default copyright/warranty banner
        file { '/etc/motd':
            ensure => absent,
        }
    }

    file { '/etc/update-motd.d':
        ensure  => directory,
        owner   => 'root',
        group   => 'root',
        mode    => '0755',
        recurse => true,
        purge   => true,
    }

    include motd::defaults
}