mullholland.motd

Ansible role motd

Creates a motd for Linux systems.

GitHub Downloads Version
github downloads Version

Example Playbook

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true
  # vars:
  #   example_var: "value"
  roles:
    - role: "mullholland.motd"

Role Variables

The default values for the variables are set in defaults/main.yml:

---
# EXAMPLE (/etc/motd)
# Details what will be shown 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
motd_remove_dynamic_motd: true

# Interface filter
motd_interfaces_startswith:
  # - "lo"
  - "eth"
  - "ens"
  - "eno"
  - "vmbr"
  - "wg"
  - "wire"

Requirements

Context

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

Compatibility

This role has been tested on these container images:

container tags
EL all
Amazon Candidate
Fedora all
Ubuntu all
Debian all

The minimum version of Ansible required is 2.10, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

If you find issues, please register them in GitHub.

License

MIT.

Author Information

Mullholland

About

Creates a motd for Linux systems.

Install
ansible-galaxy install mullholland.motd
GitHub repository
License
apache-2.0
Downloads
4.6k