manala.motd
#######################################################################################################
⚠️ DEPRECATION ⚠️
This repository and its role are no longer supported. Please use the Manala Ansible Collection
You can find usage information in the collection repository
#######################################################################################################
Ansible Role: Message Of The Day 
⚠️ Report issues and send Pull Requests in the main Ansible Role repository ⚠️
This role helps set up the Message Of The Day.
It is part of the Manala Ansible stack but can be used alone.
Requirements
None.
Dependencies
None.
Installation
Ansible 2+
Using the ansible galaxy command line:
ansible-galaxy install manala.motd
Using an ansible galaxy requirements file:
- src: manala.motd
Role Handlers
None.
Role Variables
| Name | Default | Type | Description |
|---|---|---|---|
manala_motd_scripts_exclusive |
false | Boolean | Only use specified scripts |
manala_motd_scripts_dir |
'/etc/update-motd.d' | String | Directory for scripts |
manala_motd_scripts_defaults |
{} | Array | Default parameters for scripts |
manala_motd_scripts |
[] | Array | List of scripts |
manala_motd_template |
'template/_default.j2' | String | Path to the template |
manala_motd_message |
~ | String | Custom message |
Configuration example
Using scripts (recommended)
manala_motd_scripts_exclusive: true # Keep only the defined scripts
manala_motd_scripts:
# Template based (file name matches the template)
- template: scripts/uname.j2
# Template based (specific file name)
- file: 10-uname
template: scripts/uname.j2
# Simple custom message
- file: 20-message
message: Hello world!
# Predefined template with a 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 a script is not present
- file: 50-absent
message: Look mum no hands!
state: absent # "present" by default
# Ignore a 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 (not recommended)
manala_motd_template: template/turkey.j2 # Predefined template
manala_motd_message: My awesome message # Custom message
Example playbook
- hosts: servers
roles:
- role: manala.motd
License
MIT
Author information
Manala (http://www.manala.io/)
Installa
ansible-galaxy install manala.motdLicenza
Unknown
Download
76.1k
Proprietario
Manala is an open source project supported by the french web agency ELAO providing advanced ansible roles for website's infrastructures and far more.
