Forge Home

dynmotd

Manage a 'dynamic' MotD

12,926 downloads

10,723 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.

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.3.0 (latest)
  • 0.2.1
  • 0.2.0
released Sep 1st 2015
This version is compatible with:
  • Debian

Start using this module

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

Add this module to your Puppetfile:

mod 'gardouille-dynmotd', '0.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add gardouille-dynmotd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install gardouille-dynmotd --version 0.3.0

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

gardouille/dynmotd — version 0.3.0 Sep 1st 2015

dynmotd

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations
  7. Development
  8. License

Overview

This module allows to generate a dynamic Motd /var/run/motd with simples scripts.

Module Description

This is a simple Puppet module to manage a more advanced Motd (Message of the day) and automatically display it upon successful ssh or shadow login.

Setup

What dynmotd affects

  • Dynamic (/var/run/motd) and static (/etc/motd) Motd files.
  • The dynamic Motd generation directory and scripts (/etc/update-motd.d).
  • The pam configuration to display the Motd for ssh and shadow login.

Usage

To begin using Motd module with defaults parameters:

include dynmotd

If you don't want to display the Motd upon ssh login:

class { 'motd':
  print_motd_ssh => false,
}

Reference

Classes

  • motd: Main class calls all subclasses.
  • motd::install: Provide all scripts that display system informations.
  • motd::config: Manage the pam configuration.

Parameters

motd

  • dynmotd_path: Path to the default dynamic Motd generated by pam. Defaults to '/var/run/motd'.
  • update_motd_dir_path: Path to the directory containing the scripts to generate the dynamic Motd. Defaults to '/etc/update-motd.d'.
  • system_info_script_name: The script to display system informations (uptime, kernel, …). Defaults to '01system'.
  • system_info_script_content: Template file use to generate the previous script. Defaults to 'dynmotd/motd_system_info.erb'.
  • user_info_script_name: The script to display user informations (number of sessions, processes, …). Defaults to '02user'.
  • user_info_script_content: Template file use to generate the previous script. Defaults to 'dynmotd/motd_user_info.erb'.
  • auth_info_script_name: The script to display authentication informations (number of ssh, sudo fails, …). Defaults to '03auth'.
  • auth_info_script_content: Template file use to generate the previous script. Defaults to 'dynmotd/motd_auth_info.erb'.
  • fs_info_script_name: The script to display filesystem informations (disk space usage). Defaults to '04fs'.
  • fs_info_script_content: Template file use to generate the previous script. Defaults to 'dynmotd/motd_fs_info.erb'.
  • ceph_info_script_name: The script to display Ceph informations (Health, monitor, osd, …). Defaults to '05ceph'.
  • ceph_info_script_content: Template file use to generate the previous script. Defaults to 'dynmotd/motd_ceph_info.erb'.
  • service_info_script_name: The script to display services informations (running process, listening socket, …). Defaults to '06service'.
  • service_info_script_content: Template file use to generate the previous script. Defaults to 'dynmotd/motd_service_info.erb'.
  • static_motd_path: Path to the standard and static Motd. Defaults to '/etc/motd'.
  • static_motd_content: Template file use to generate the static motd. Defaults to 'dynmotd/static_motd.erb'.
  • print_motd_ssh: If set to 'true', the Motd will be displayed upon successful ssh login. Can be 'true' or 'false'. Defaults to 'true'.
  • print_motd_login: If set to 'true', the Motd will be displayed upon successful shadow (classic tty/shell) login. Can be 'true' or 'false'. Defaults to 'true'.

Limitations

This module has only be tested on Debian 7.x versions, but should work on Debian >7. The dynamic Motd generation with /etc/update-motd.d directory was implemented in pam by Ubuntu (in 10.04), so it should also work with Ubuntu >=10.04.

Development

Free to send contributions, fork it, ...

License

WTFPL (http://wtfpl.org/)