mullholland.motd

Ansible Role MOTD

This role creates a Message of the Day (MOTD) for Linux systems.

GitHub Downloads Version
GitHub Downloads Version

Example Playbook

Here’s a simple example of how to use the role. This example is tested whenever updates are made.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true
  roles:
    - role: "mullholland.motd"

Role Variables

You can find the default variable values in defaults/main.yml:

---
# This message will be displayed in /etc/motd
# More details can be found in templates/etc/motd.j2
# ---------------------------------------------------------------
# This system is managed by Ansible
# ---------------------------------------------------------------
#
# System:
#   Hostname:     default-2.12-debian9
#   FQDN:         default-2.12-debian9
#   Distribution: Debian
#   - Version:    9.13
#   - Release:    stretch
#   Virtual:      Yes (Type: docker)
#
#   CPUs:         8
#   Memory:       31.3GB
#   Swap:         24.0GB
#
#   Kernel:       5.15.18-200.fc35.x86_64
#   Timezone:     UTC(+0000)
#
# Network:
#   DNS Search:    XXX.tld
#   DNS Server(s): 8.8.8.8
#
# Interfaces:
#   Interface: eth0
#     ip: 172.17.0.2
#     mac: 02:42:ac:11:00:02
#   Interface: lo
#     ip: 127.0.0.1
#
# Mounts:
#   Mount: /dev/mapper/luks-XXX(/etc/hosts)(X.XGB)
#   Mount: /dev/mapper/luks-XXX(/etc/resolv.conf)(X.XGB)
#   Mount: /dev/mapper/luks-XXX(/etc/hostname)(X.XGB)
#
# ---------------------------------------------------------------

# Remove the folder /etc/update-motd.d if true
motd_remove_dynamic_motd: true

# Filter interfaces based on name
motd_interfaces_startswith:
  # - "lo"
  - "eth"
  - "ens"
  - "eno"
  - "vmbr"
  - "wg"
  - "wire"

Requirements

You need certain pip packages listed in requirements.txt.

Context

This role is part of a group of compatible roles. You can check this documentation for more information.

Here’s an overview of related roles: dependencies

Compatibility

This role has been tested on the following container images:

Container Tags
EL all
Amazon Candidate
Fedora all
Ubuntu all
Debian all

Ansible version 2.10 or higher is required. Tests have been done on:

  • Previous version
  • Current version
  • Development version

If you encounter issues, please report them on GitHub.

License

This role is licensed under the MIT License.

Author Information

Written by Mullholland.

Informazioni sul progetto

Creates a motd for Linux systems.

Installa
ansible-galaxy install mullholland.motd
Licenza
apache-2.0
Download
4.6k
Proprietario