Add custom motd

This commit is contained in:
gilex-dev 2024-06-14 10:13:51 +02:00
parent 6aeea6f57e
commit c103aa984f
Signed by: gilex-dev
GPG Key ID: 9A2BEC7B5188D2E3
2 changed files with 19 additions and 0 deletions

View File

@ -35,6 +35,16 @@
daemon_reload: true daemon_reload: true
tasks: tasks:
- name: Ensure custom motd is latest
tags: debug
become: true
ansible.builtin.template:
src: ./templates/motd.sh.j2
dest: /etc/profile.d/motd.sh
owner: root
group: root
mode: u=rw,g=r,o=r
- name: Ensure valid apt cache and required tools are present - name: Ensure valid apt cache and required tools are present
become: true become: true
ansible.builtin.apt: ansible.builtin.apt:

View File

@ -0,0 +1,9 @@
RED='\033[0;31m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
if [ "${USER}" == "{{ ansible_user }}" ]; then
echo -e "\nYou are logged in as user ${RED}${USER}${NC} used by ansible to manage this linux installation.
${YELLOW}Make sure to reflect all manual changes in the playbook found at
https://somepi.ddns.net/gites/gilex-dev/GisServer${NC}";
fi