mirror of
https://github.com/roles-ansible/ansible_role_dotfiles.git
synced 2024-08-16 16:09:49 +02:00
files -> gameplay
This commit is contained in:
parent
a8afabbfa5
commit
5f942d2330
6 changed files with 14 additions and 8 deletions
|
@ -5,8 +5,8 @@ Ansible role to deploy some dotfiles which may be useful
|
|||
Affected files:
|
||||
```ini
|
||||
/etc/bash.bashrc
|
||||
.bashrc
|
||||
.vimrc
|
||||
~/.bashrc
|
||||
~/.vimrc
|
||||
```
|
||||
needed vars:
|
||||
---------------
|
||||
|
|
|
@ -4,3 +4,7 @@ bash:
|
|||
bashrc: ''
|
||||
nextcloud: false
|
||||
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\] '
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
- name: Create a global bashrc configuration
|
||||
copy:
|
||||
src: 'files/bash.bashrc'
|
||||
src: 'templates/bash.bashrc'
|
||||
dest: '/etc/bash.bashrc'
|
||||
owner: root
|
||||
group: root
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
- name: Copy bashrc configuration to admin users
|
||||
template:
|
||||
src: 'files/bashrc'
|
||||
src: 'templates/bashrc'
|
||||
dest: '/home/{{ item }}/.bashrc'
|
||||
owner: '{{ item }}'
|
||||
group: wheel
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
- name: Copy vimrc configuration to root
|
||||
copy:
|
||||
src: 'files/vimrc'
|
||||
src: 'templates/vimrc'
|
||||
dest: '/root/.vimrc'
|
||||
owner: root
|
||||
group: root
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
- name: Copy vimrc configuration to admin users
|
||||
copy:
|
||||
src: 'files/vimrc'
|
||||
src: 'templates/vimrc'
|
||||
dest: '/home/{{ item }}/.vimrc'
|
||||
owner: '{{ item }}'
|
||||
group: wheel
|
||||
|
|
|
@ -47,7 +47,7 @@ if [ -z "$BASHRCSOURCED" ]; then
|
|||
# and console windows
|
||||
# If you want to do so, just add e.g.
|
||||
if [ "$PS1" ]; then
|
||||
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\] '
|
||||
PS1='{{ bash.ps1 }}'
|
||||
fi
|
||||
# to your custom modification shell script in /etc/profile.d/ directory
|
||||
fi
|
||||
|
@ -77,7 +77,7 @@ if [ -z "$BASHRCSOURCED" ]; then
|
|||
umask 022
|
||||
fi
|
||||
|
||||
SHELL=/bin/bash
|
||||
SHELL={{ bash.shell }}
|
||||
# Only display echos from profile.d scripts if we are no login shell
|
||||
# and interactive - otherwise just process them to set envvars
|
||||
for i in /etc/profile.d/*.sh; do
|
||||
|
@ -111,4 +111,6 @@ alias ll='ls -la'
|
|||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
{% 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
|
Loading…
Reference in a new issue