Migrated to ansible

This commit is contained in:
2024-04-02 00:59:42 +02:00
parent c53268e307
commit 0ccf6427f2
136 changed files with 5157 additions and 1407 deletions

47
roles/bash/files/.bashrc Normal file
View File

@@ -0,0 +1,47 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Load starship prompt if starship is installed
eval "$(starship init bash)"
## Aliases
# Replace ls with eza
alias ls='eza -al --color=always --group-directories-first' # preferred listing
alias la='eza -a --color=always --group-directories-first' # all files and dirs
alias ll='eza -l --color=always --group-directories-first' # long format
alias lt='eza -aT --color=always --group-directories-first' # tree listing
alias l.='eza -ald --color=always --group-directories-first .*' # show only dotfiles
# Replace cat with bat
alias cat='bat --style header --style snip --style changes --style header'
# Replace yay with paru
[ ! -x /usr/bin/yay ] && [ -x /usr/bin/paru ] && alias yay='paru'
# Aliases
alias cls='clear'
alias dir='dir --color=auto'
alias egrep='grep -E --color=auto'
alias fgrep='grep -F --color=auto'
alias igrep='grep -i --color=auto'
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
alias grep='grep --color=auto'
alias grubup="sudo update-grub"
alias hw='hwinfo --short'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
alias psmem='ps auxf | sort -nr -k 4'
alias rmpkg="sudo pacman -Rdd"
alias tarnow='tar -acf '
alias untar='tar -zxvf '
alias upd='/usr/bin/update'
alias vdir='vdir --color=auto'
alias wget='wget -c '
# Cleanup orphaned packages
alias cleanup='sudo pacman -Rns `pacman -Qtdq`'
# Get the error messages from journalctl
alias jctl="journalctl -p 3 -xb"
# Recent installed packages
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"

12
roles/bash/tasks/main.yml Normal file
View File

@@ -0,0 +1,12 @@
---
- name: "[Bash] Install"
ansible.builtin.package:
name:
- bash
state: latest
become: yes
- name: "[Bash] Configure"
ansible.builtin.copy:
src: "./"
dest: "{{ ansible_user_dir }}/"