Skip to content

Commit

Permalink
Udate README to best practice layout
Browse files Browse the repository at this point in the history
  • Loading branch information
okopop committed Nov 30, 2024
1 parent b56119e commit e5563d3
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 11 deletions.
54 changes: 44 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,59 @@
[![Puppet Forge quality score](https://img.shields.io/puppetforge/qualityscore/okopop/motd)](https://forge.puppet.com/modules/okopop/motd)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/okopop/puppet-motd/pdk.yml)](https://github.com/okopop/puppet-motd/actions/workflows/pdk.yml)

# motd

#### Table of Contents

# motd
Template based /etc/motd which shows only the most crucial info about the server.
The ambition is to keep this module simple but relevant and not add values that change often.
I have not tested on all different distros myself but should work if you have normal facter values and the uptime --since command.
Feel free to contribute!
1. [Overview](#overview)
1. [Module Description](#module-description)
1. [Setup - The basics of getting started](#setup)
1. [Usage - Configuration options](#usage)
1. [Example output](#example)
1. [Development - Guide for contributing to the module](#development)

## Overview

This module creates a /etc/motd file which is displayed to users that login.
It shows the most relevant info about the server by default and you can add your own
messages as either information or WARNING.

## Module description

This module i templated based and does the following.

- Show a simple server summary.
- Add custom server information with hiera.
- 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.
- 'Last reboot' is a more static value than showing number of days uptime, which create unnecessary change noise everyday.
The value could be used to get a hint when a server most likely got updated and rebooted, or if the server is forgotten because of high uptime and need some attention.
- 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 everyday.
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

## Hiera example
Any of these will include motd and create the /etc/motd file with default values from facts.

```puppet
include motd
```
or hiera

```yaml
---
classes:
- motd
```
## Usage
Add your own messages with hiera to be displayed in /etc/motd
```yaml
motd::info: "Product X | Production | Team Y"
motd::warn: "This OS version is EOL since XX-YY-ZZ"
```
## Motd example
## Example
```
================== Motd by Puppet ==============================
Expand All @@ -41,3 +68,10 @@ Information......: Product X | Production | Team Y
WARNING..........: This OS version is EOL since XX-YY-ZZ
================================================================
```

## Development

The ambition is to keep this module simple but relevant 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!
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "okopop-motd",
"version": "1.1.3",
"version": "1.1.4",
"author": "okopop",
"summary": "Template based /etc/motd which shows only the most crucial info about the server.",
"license": "Apache-2.0",
Expand Down

0 comments on commit e5563d3

Please sign in to comment.