Add bashrc

This commit is contained in:
Tunui Franken 2024-11-29 17:04:48 +01:00
parent 563ac1b664
commit 7f6e45f841
3 changed files with 38 additions and 3 deletions

View file

@ -26,6 +26,17 @@
mode: "644"
when: (item.value | last) == '/bin/bash'
- name: Copy bashrc for accounts using bash
become: true
loop: "{{ ansible_facts.getent_passwd | dict2items }}"
ansible.builtin.template:
src: bashrc.j2
dest: "{{ item.value.4 }}/.bashrc"
owner: "{{ item.key }}"
group: "{{ item.key }}"
mode: "644"
when: (item.value | last) == '/bin/bash'
- name: Setup etckeeper
ansible.builtin.include_role:
name: etckeeper

View file

@ -2,6 +2,13 @@
eval "$(dircolors)"
alias ll='ls --color=auto -lArth'
alias la='ls --color=auto -A'
alias l='ls --color=auto -CF'
alias ls='ls --color=auto'
alias ll='ls -lArth'
alias la='ls -A'
alias l='ls -CF'
alias grep='grep --color=auto'
alias ip='ip --color=auto'
alias diff='diff --color=auto'
alias rm='rm -I --preserve-root'

View file

@ -0,0 +1,17 @@
# {{ ansible_managed }}
HISTCONTROL=ignoreboth # don't put duplicate lines or lines starting with space in the history.
shopt -s histappend # append to the history file, don't overwrite it
HISTSIZE=10000
HISTFILESIZE=10000
stty -ixon # Disable Ctrl-S and Ctrl-Q
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi