It would be nice to put in place a /etc/profile for our servers that sets the prompt based on what the env is (staging, production, dev, cloud, etc).
This would let you notice really easily that you were on a prod machine or a stg machine, etc.
Ideally it wouldn't be too long, but would be noticeable.
If someone else is working on this, please let me know.
test script - proof of concept hostprompt.sh
Wrote this as a little proof of concept. It just a grep for a few different terms. It's not in a .profile format or J2 format yet. To set your prompt, PS1="$(sh hostprompt.sh) "
If there are different hostnames we want to look for; cloud, builder, etc. Let me know. We can also look at making a two-line prompt that indicates what git branch you are working on when you are in a tracked repo.
Maybe look at in our meeting this week.
Thanks, Zach
screenshot example screenshot.png
PS1 template setps1.sh.j2
shows change to roles/base/tasks/main.yml and PS1 template prodprompt.patch
Closing - let me know if I should re-open.
Login to comment on this ticket.