- Overview
- Module Description
- Setup - The basics of getting started
- Usage - Configuration options
- Example output
- Development - Guide for contributing to the module
Show the most relevant server information in /etc/motd
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.
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
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"
================== 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
================================================================
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!