Forge Home

motd

Template based /etc/motd which shows only the most crucial info about the server.

180 downloads

10 latest version

5.0 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.

Version information

  • 1.1.5 (latest)
  • 1.1.4 (deleted)
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.1
released Nov 30th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , CentOS, Gentoo, , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'okopop-motd', '1.1.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install okopop-motd --version 1.1.5

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
Tags: motd

Documentation

okopop/motd — version 1.1.5 Nov 30th 2024

Puppet Forge version Puppet Forge - PDK version Puppet Forge quality score GitHub Actions Workflow Status

motd

Table of Contents

  1. Overview
  2. Module Description
  3. Setup - The basics of getting started
  4. Usage - Configuration options
  5. Example output
  6. Development - Guide for contributing to the module

Overview

Show the most relevant server information in /etc/motd

Module description

This module creates a /etc/motd file. It shows the most relevant information about the server by default and you can add your own messages as either Information or WARNING when needed. The content displayed from this module in motd is a good foundation for all servers out there.

This module is templated based and does the following:

  • Show a simple server summary.
  • Add information message with hiera.
  • Add warning message with hiera, when you want to get an important message out to the users that log in.
  • Show when server was last rebooted. The value 'Last reboot' is very static and is a better option than showing uptime in days, which create unnecessary change noise every day. The value could be used to get a hint when a server most likely was patched and rebooted, or if the server is forgotten because of high uptime and need some attention.

Setup

Any of these will include motd to the catalog and create the /etc/motd file with default values from facts.

include motd

or hiera

---
classes:
  - motd

Usage

Add your own messages with hiera to be displayed in /etc/motd

motd::info: "Product X | Production | Team Y"
motd::warn: "This OS version is EOL since XX-YY-ZZ"

Example

================== Motd by Puppet ==============================
Hostname.........: testhest.example.com
Platform.........: vmware, 2 CPU, 3.47 GiB RAM
Operating System.: Red Hat Enterprise Linux release 8.10 (Ootpa)
Puppet Agent.....: 7.18.0
Last reboot......: 2024-10-19 01:22
Information......: Product X | Production | Team Y
WARNING..........: This OS version is EOL since XX-YY-ZZ
================================================================

Development

The ambition is to keep the motd file short and simple and not add values that change often. I have not tested on all different distros myself but should work if you have normal fact values.

Feel free to contribute with ideas!