Page MenuHomeDevCentral

No OneTemporary

diff --git a/roles/core/motd/files/motd b/roles/core/motd/files/motd
new file mode 100644
index 0000000..49b7a26
--- /dev/null
+++ b/roles/core/motd/files/motd
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ -f /etc/motd ]; then
+ cat /etc/motd
+else
+ echo "No MOTD."
+fi
diff --git a/roles/core/motd/init.sls b/roles/core/motd/init.sls
index 2b57b56..c2685ee 100644
--- a/roles/core/motd/init.sls
+++ b/roles/core/motd/init.sls
@@ -1,21 +1,26 @@
# -------------------------------------------------------------
# Salt — MOTD
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2016-04-10
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
motd:
file.managed:
{% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
- name: /etc/motd.tail
{% else %}
- name: /etc/motd
{% endif %}
- source: salt://roles/core/motd/files/{{ grains['id'] }}
# Fixes T858
get_rid_of_scaleway_motd:
file.absent:
- name: /etc/update-motd.d/50-scw
+
+/usr/local/bin/motd:
+ file.managed:
+ - source: salt://roles/core/motd/files/motd
+ - mode: 755

File Metadata

Mime Type
text/x-diff
Expires
Fri, Sep 19, 00:43 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2991988
Default Alt Text
(1 KB)

Event Timeline