dynmotd/README.md

94 lines
3.6 KiB
Markdown
Raw Normal View History

2015-01-23 16:18:55 +01:00
# dynmotd
#### Table of Contents
1. [Overview](#overview)
2015-02-03 11:27:30 +01:00
2. [Module Description](#module-description)
3. [Setup](#setup)
* [What Motd affects](#what-motd-affects)
2015-02-03 11:27:30 +01:00
4. [Usage](#usage)
5. [Reference](#reference)
* [Classes](#classes)
* [Parameters](#parameters)
6. [Limitations](#limitations)
7. [Development](#development)
8. [License](#license)
2015-01-23 16:18:55 +01:00
## Overview
2015-02-03 11:27:30 +01:00
This module allows to generate a dynamic Motd `/var/run/motd` with simples
scripts.
2015-01-23 16:18:55 +01:00
## Module Description
2015-02-03 11:27:30 +01:00
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.
2015-01-23 16:18:55 +01:00
## Setup
### What dynmotd affects
2015-02-03 11:27:30 +01:00
* 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.
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
## Usage
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
To begin using Motd module with defaults parameters:
2015-02-09 11:07:27 +01:00
```
include dynmotd
```
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
If you don't want to display the Motd upon ssh login:
2015-02-09 11:07:27 +01:00
```
class { 'motd':
print_motd_ssh => false,
}
```
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
## Reference
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
### Classes
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
* `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'.
* `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'.
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
Limitations
-----------
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
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.
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
Development
-----------
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
Free to send contributions, fork it, ...
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
License
-------
2015-01-23 16:18:55 +01:00
2015-02-03 11:27:30 +01:00
WTFPL (http://wtfpl.org/)
2015-01-23 16:18:55 +01:00