mirror of
https://github.com/roles-ansible/ansible_role_dotfiles.git
synced 2024-08-16 16:09:49 +02:00
Change variable style
This commit is contained in:
parent
c3fc3d3c54
commit
075c4a8209
4 changed files with 12 additions and 7 deletions
|
@ -6,5 +6,6 @@ bash:
|
|||
nm: false
|
||||
pwgen: true
|
||||
shell: "/bin/bash"
|
||||
ps1: '$(if [[ $(id -u) -ne 0 ]];then echo "\[\033[01;33m\]"; else echo "\[\033[01;31m\]"; fi) $(if [[ $? == 0 ]]; then printf "\xE2\x9D\xA4"; fi) \[\033[01;32m\]\u\[\033[01;36m\]@\[\033[01;32m\]\H\[\033[01;34m\] <\A> \[\033[01;35m\] \j \[\033[01;36m\] \w \[\033[01;33m\]\n\[\033[01;33m\] $(git branch 2>/dev/null | sed -n "s/* \(.*\)/\1 /p")$\[\033[01;00m\] '
|
||||
keyboard: '$(if [[ $(id -u) -ne 0 ]];then echo "\[\033[01;33m\]"; else echo "\[\033[01;31m\]"; fi) $(if [[ $? == 0 ]]; then printf "\xE2\x9D\xA4"; fi) \[\033[01;32m\]\u\[\033[01;36m\]@\[\033[01;32m\]\H\[\033[01;34m\] <\A> \[\033[01;35m\] \j \[\033[01;36m\] \w \[\033[01;33m\]\n\[\033[01;33m\] $(git branch 2>/dev/null | sed -n "s/* \(.*\)/\1 /p")$\[\033[01;00m\] '
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
- debug: var=bash
|
||||
|
||||
- name: install the latest libselinux-python package
|
||||
dnf:
|
||||
name: libselinux-python
|
||||
|
|
|
@ -47,16 +47,16 @@ if [ -z "$BASHRCSOURCED" ]; then
|
|||
# Turn on checkwinsize
|
||||
shopt -s checkwinsize
|
||||
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
|
||||
{% endraw %}
|
||||
# You might want to have e.g. tty in prompt (e.g. more virtual machines)
|
||||
# and console windows
|
||||
# If you want to do so, just add e.g.
|
||||
if [ "$PS1" ]; then
|
||||
PS1='{{ bash.ps1 }}'
|
||||
{% endraw %}
|
||||
PS1="{{ bash['keyboard'] }}"
|
||||
{% raw %}
|
||||
fi
|
||||
# to your custom modification shell script in /etc/profile.d/ directory
|
||||
fi
|
||||
{% raw %}
|
||||
|
||||
if ! shopt -q login_shell ; then # We're not a login shell
|
||||
# Need to redefine pathmunge, it gets undefined at the end of /etc/profile
|
||||
|
@ -84,7 +84,8 @@ if ! shopt -q login_shell ; then # We're not a login shell
|
|||
fi
|
||||
{% endraw %}
|
||||
|
||||
SHELL={{ bash.shell }}
|
||||
SHELL="{{ bash['shell'] }}"
|
||||
{% raw %}
|
||||
|
||||
# Only display echos from profile.d scripts if we are no login shell
|
||||
# and interactive - otherwise just process them to set envvars
|
||||
|
@ -118,7 +119,8 @@ export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quo
|
|||
alias ll='ls -la'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
{% endraw %}
|
||||
|
||||
{% if bash.pwgen %}alias pwgen="/usr/bin/pwgen --num-passwords=3000 --numerals --capitalize --secure --no-vowels --symbols 42 | grep -v '0' | grep -v 'o' | grep -v 'O' | grep -v '\"' | grep -v 'I' | grep -v 'l' | grep -v '1' | grep -v '´' | grep -v '@' | tail -1 "{% endif %}
|
||||
{% if bash['pwgen'] %}alias pwgen="/usr/bin/pwgen --num-passwords=3000 --numerals --capitalize --secure --no-vowels --symbols 42 | grep -v '0' | grep -v 'o' | grep -v 'O' | grep -v '\"' | grep -v 'I' | grep -v 'l' | grep -v '1' | grep -v '´' | grep -v '@' | tail -1 "{% endif %}
|
||||
|
||||
# vim:ts=4:sw=4
|
||||
|
|
|
@ -14,7 +14,7 @@ export PATH
|
|||
|
||||
PS1='$(if [[ $(id -u) -ne 0 ]];then echo "\[\033[01;33m\]"; else echo "\[\033[01;31m\]"; fi) $(if [[ $? == 0 ]]; then printf "\xE2\x9D\xA4"; fi) \[\033[01;32m\]\u\[\033[01;36m\]@\[\033[01;32m\]\H\[\033[01;34m\] <\A> \[\033[01;35m\] \j \[\033[01;36m\] \w \[\033[01;33m\]\n\[\033[01;33m\] $(git branch 2>/dev/null | sed -n "s/* \(.*\)/\1 /p")$\[\033[01;00m\] '
|
||||
|
||||
{{ bash.bashrc }}
|
||||
{{ bash['bashrc'] }}
|
||||
|
||||
# User specific aliases and functions
|
||||
alias ll="ls -all"
|
||||
|
|
Loading…
Reference in a new issue