manala.motd
#######################################################################################################
:exclamation: DEPRECATION :exclamation:
This repository and the role associated are deprecated in favor of the Manala Ansible Collection
You will find informations on its usage on the collection repository
#######################################################################################################
Ansible Role: Message Of The Day 
:exclamation: Report issues and send Pull Requests in the main Ansible Role repository :exclamation:
This role will deal with the setup of Message Of The Day.
It's part of the Manala Ansible stack but can be used as a stand alone component.
Requirements
None.
Dependencies
None.
Installation
Ansible 2+
Using ansible galaxy cli:
ansible-galaxy install manala.motd
Using ansible galaxy requirements file:
- src: manala.motd
Role Handlers
None
Role Variables
Name | Default | Type | Description |
---|---|---|---|
manala_motd_scripts_exclusive |
false | Boolean | Scripts exclusivity |
manala_motd_scripts_dir |
'/etc/update-motd.d' | String | Scripts dir path |
manala_motd_scripts_defaults |
{} | Array | Default scripts parameters |
manala_motd_scripts |
[] | Array | Scripts |
manala_motd_template |
'template/_default.j2' | String | Template path |
manala_motd_message |
~ | String | Message |
Configuration example
Use scripts (recommended)
manala_motd_scripts_exclusive: true # Keep only defined scripts
manala_motd_scripts:
# Template based (file name based on template)
- template: scripts/uname.j2
# Template based (force file name)
- file: 10-uname
template: scripts/uname.j2
# Simple custom message
- file: 20-message
message: Hello world!
# Predefined template (cow|dragon|stegosaurus|turkey|yoda)
# with icelandic custom message
- file: 30-template
template: scripts/cow.j2
message: Hjartað hamast
# Raw script
- file: 40-raw
script: |
#!/bin/sh
printf "Hello world!\n"
# Ensure script is absent
- file: 50-absent
message: Look mum no hands!
state: absent # "present" by default
# Ignore script
- file: 60-ignore
message: Look daddy there's an airplane up in the sky!
state: ignore
# Flatten scripts
- "{{ my_custom_scripts_array }}"
Static template (deprecated)
manala_motd_template: template/turkey.j2 # Predefined template (cow|dragon|stegosaurus|turkey|yoda)
manala_motd_message: My awesome message # Custom message
Example playbook
- hosts: servers
roles:
- role: manala.motd
Licence
MIT
Author information
Manala (http://www.manala.io/)
Install
ansible-galaxy install manala.motd
License
Unknown
Downloads
74.7k
Owner
Manala is an open source project supported by the french web agency ELAO providing advanced ansible roles for website's infrastructures and far more.