Forge Home

motd

Manage the MOTD message

17,071 downloads

10,104 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.2.4 (latest)
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Oct 28th 2016
This version is compatible with:
  • Puppet 3.x
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'jgazeley-motd', '0.2.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jgazeley-motd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jgazeley-motd --version 0.2.4

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

jgazeley/motd — version 0.2.4 Oct 28th 2016

motd

Table of Contents

  1. Overview
  2. Usage - Configuration options and additional functionality
  3. Limitations - OS compatibility, etc.
  4. Development - Guide for contributing to the module

Overview

This module manages the /etc/motd on Unix-like systems. Unlike other motd modules, this one created a bulleted list of services offered by that system by specifying a resource anywhere that needs it.

Sample output:

  ******************************************************************************
  *                                                                            *
  *   DEMO.BRIS.AC.UK                                                          *
  *                                                                            *
  *   Queries about this system to: demo-help@bristol.ac.uk                    *
  *                                                                            *
  *   This system is managed by Puppet. Check before editing!                  *
  *                                                                            *
  *   Puppet environment: production                                           *
  *                                                                            *
  *   "640K ought to be enough for anyone."                                    *
  *          Bill Gates                                                        *
  *                                                                            *
  *   This server provides the following services:                             *
  *     - DNS                                                                  *
  *     - DHCP                                                                 *
  *     - TFTP                                                                 *
  *                                                                            *
  ******************************************************************************

Usage

motd

To include the basic motd message on your system, call the base class like this:

class motd {
  path                   => '/etc/motd',
  display_hostname       => true,
  display_puppet_warning => true,
  display_puppet_env     => false,
  display_qotd           => false,
  contact_email          => undef,
  qotd_text              => undef,
  qotd_author            => undef,
  char                   => '*',
  width                  => 76,
}

path

Path to the motd file. Default: /etc/motd

display_hostname

Whether to display the server's hostname on the motd message. Default: true

display_puppet_warning

Whether to display a generic warning that this server is managed by Puppet. Default: true

display_puppet_env

Whether to display which Puppet environment the node is in

display_qotd

Whether to display a fun quote. Default: false

contact_email

Contact email address for this system. If defined, it will be displayed on the motd. Default: undef

qotd_text

If display_qotd is set to true, provide the text for your quotation here. Default: undef. Example: 640K ought to be enough for anybody

qotd_author

If display_qotd is set to true, give the author for your quotation here. Default: undef. Example: Bill Gates

char

Set the character to be used to draw a box around the motd. Default: *

width

Set the width of the motd message. Default: 80

motd::register

To include a service on the bulleted service list in the motd, call the defined resource like this from within the relevant class.

class { 'dns':
  ...
  ...
  motd::register { 'DNS': }
}

Limitations

This module should be compatible with any system that supports an motd. The formatting is pretty basic. Getting it to use Puppet's sprintf function is on the roadmap.

Development

Feel free to send pull requests to make this module more flexible.

Release Notes/Contributors/Etc

0.1.0

Initial release

0.1.1

Packaging release, simply to take account of concat 2.x being deleted from the Forge

0.1.2

Add support for displaying the Puppet environment

0.2.0

Add support for varible width, four-sided box, customisable characters

0.2.1

Add trailing newline

0.2.2

Fix ambiguous ordering Add validation for single character input

0.2.3

Quote numbers for future parser validation

0.2.4

Access variables properly