Skip to content

totaldebug/ansible-role-motd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An Ansible role for creating an MOTD banner when logging into yout server.

GitHub last commit GitHub issues GitHub pull requests

ConfigurationFeaturesContributingAuthorSupportDonateLicense


Configuration

Role Variables

  • motd_template: modify this to change the ASCII Art or possible options
  • motd_modification: should the motd be modified defaults true
  • motd_server_role: What role the server plays e.g. WebServer
  • motd_info: List of additional information to show under the ASCII art. Look into the defaults for an example.

Custom Template

The templates packaged with this role are meant to be very generic.

If the default template does not suit your needs, you can replace it with yours. What you need to do:

create a templates directory at the same level as your playbook create a templates\mymotd.j2 file (just choose a different name from the default template) in your playbook set the var motd_template: mymotd.j2

Example Playbook

---

- host: all
  roles:
    - totaldebug/motd

Features

🔰
Custom Template ✔️
Server information ✔️

Example Output

[root@localhost ~]# cat /etc/motd
     _              _ _     _
    / \   _ __  ___(_) |__ | | ___
   / _ \ | '_ \/ __| | '_ \| |/ _ \
  / ___ \| | | \__ \ | |_) | |  __/
 /_/   \_\_| |_|___/_|_.__/|_|\___|

 FQDN:    localhost.localdomain - WebServer
 Distro:  CentOS 7.7 Final
 Last Change: 2019-12-18, 16:41:04
 CPUs:    1
 RAM:     0.49GB

Contributing

Got something interesting you'd like to share? Learn about contributing.

Author

TotalDebug
marksie1988 (Steven Marks)

Support

Reach out to me at one of the following places:

  • via Discord
  • Raise an issue in GitHub

Donate

License

License: CC BY-NC-SA 4.0