testing a change to PS1

This commit is contained in:
aikidouke 2016-04-05 18:43:37 +00:00
parent 9b5b631745
commit f5cbec16e6
2 changed files with 24 additions and 0 deletions

View file

@ -167,3 +167,19 @@
- scripts
- badges
- badges/backend
#Set PS1 to show prod/stage environment at PS1
#Should work in sh/bash. Needs tested in other shells
#
- name: set PS1 for prod and stage in /etc/profile.d
copy: >
src=templates/setps1.sh.j2
dest=/etc/profile.d/setps1.sh
owner=root
group=sysadmin-badges
mode=644
when: {{ env in ['production','staging'] }}
tags:
- base
- config

View file

@ -0,0 +1,8 @@
# Set PS1 based on env:
#
{% if {{ env }} in 'production' %}
PS1="\e[0;31m[PROD]\e[m[\u@\h \W]\$ "
{% elif {{ env }} in 'staging' %}
PS1="[STG]\e[m[\u@\h \W]\$ "
{% endif }%