Ansible Update MOTD Role

An Ansible role for managing the dynamic MOTD scripts on Debian 9, 10, 11 and Ubuntu 14.04, 16.04, 18.04 and 20.04.

Example Usage

The following example disables MOTD scripts by removing their execute bit.

- hosts: all
  roles:
    - gibbs.update_motd
  vars:
    update_motd_disable_scripts:
      - 88-esm-announce
      - 91-release-upgrade
      - 91-contract-ua-esm-status

Default Variables

# When true the /etc/motd will be removed if it exists
update_motd_remove_motd_directory: false
 
# Manage the MOTD package and service (Ubuntu only)
update_motd_package_name: "update-motd"
update_motd_package_state: present
update_motd_service_state: start
update_motd_service_enabled: true
 
# The Ubuntu Landscape package state (Ubuntu only)
update_motd_landscape_state: present
 
# Disable the "motd" service if it exists
update_motd_disable_motd_service: true
 
# An array of scripts in /etc/update-motd.d/ to disable
update_motd_disable_scripts:
  - 98-cloudguest

MOTD scripts

A list of dynamic MOTD scripts usually shipped with Debian and Ubuntu:

Filename Releases
00-header Ubuntu 14, 16, 18, 20
10-help-text Ubuntu 14, 16, 18, 20
10-uname Debian 9, 10, 11
50-landscape-sysinfo Ubuntu 14, 18, 20
50-motd-news Ubuntu 16, 18, 20
85-fwupd Ubuntu 20
88-esm-announce Ubuntu 16, 18, 20
90-updates-available Ubuntu 14, 16, 18
91-contract-ua-esm-status Ubuntu 16, 18, 20
91-release-upgrade Ubuntu 14, 16, 18, 20
92-unattended-upgrades Ubuntu 16, 18, 20
95-hwe-eol Ubuntu 14, 18, 20
97-overlayroot Ubuntu 14, 16, 18, 20
98-cloudguest Ubuntu 14
98-fsck-at-reboot Ubuntu 14, 16, 18, 20
98-reboot-required Ubuntu 14, 16, 18, 20
Previous
Back to Projects