Add custom motd
This commit is contained in:
parent
6aeea6f57e
commit
c103aa984f
@ -35,6 +35,16 @@
|
||||
daemon_reload: true
|
||||
|
||||
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
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
|
9
playbooks/templates/motd.sh.j2
Normal file
9
playbooks/templates/motd.sh.j2
Normal 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
|
Loading…
Reference in New Issue
Block a user