📥️ Various nice improvements
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Install packages
|
||||
when: update
|
||||
block:
|
||||
@@ -7,7 +8,7 @@
|
||||
block:
|
||||
- name: Install the good stuff (pacman)
|
||||
pacman: name={{ item }} state=latest
|
||||
ignore_errors: yes
|
||||
ignore_errors: true
|
||||
with_items:
|
||||
- "{{ extra_packages }}"
|
||||
- "{{ packages }}"
|
||||
@@ -24,7 +25,7 @@
|
||||
block:
|
||||
- name: Install the good stuff (apk)
|
||||
apk: name={{ item }} state=latest
|
||||
ignore_errors: yes
|
||||
ignore_errors: true
|
||||
with_items:
|
||||
- "{{ extra_packages }}"
|
||||
- "{{ packages }}"
|
||||
@@ -41,7 +42,7 @@
|
||||
block:
|
||||
- name: Install the good stuff (apt)
|
||||
apt: package={{ item }} state=latest
|
||||
ignore_errors: yes
|
||||
ignore_errors: true
|
||||
with_items:
|
||||
- "{{ extra_packages }}"
|
||||
- "{{ packages }}"
|
||||
|
@@ -1,13 +1,14 @@
|
||||
#!/bin/sh
|
||||
which lsd>/dev/null
|
||||
if [ "$?" = "0" ]; then
|
||||
alias ls="lsd -h --color=auto --group-dirs first"
|
||||
else
|
||||
([ $? -eq 0 ] && \
|
||||
alias ls="lsd -h --color=auto --group-dirs first") || \
|
||||
alias ls="ls -h --color=auto --group-directories-first"
|
||||
fi
|
||||
# ([ "$?" = "0" ] && \
|
||||
# alias ls="lsd -h --color=auto --group-dirs first") || \
|
||||
# if [ $? -eq 0 ]; then
|
||||
# alias ls="lsd -h --color=auto --group-dirs first"
|
||||
# else
|
||||
# alias ls="ls -h --color=auto --group-directories-first"
|
||||
# fi
|
||||
which doas>/dev/null && [ $? -eq 0 ] && alias doas="sudo"
|
||||
alias\
|
||||
ll="ls -l"\
|
||||
la="ls -a"\
|
||||
|
21
roles/shell/files/bin/vault.sh
Executable file
21
roles/shell/files/bin/vault.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
[ -z "$REMOTE" ] && REMOTE=siv@archy.42069.no:/home/coder
|
||||
run_rsync() {
|
||||
rsync "$1" "$2" "$3"
|
||||
[ $? -eq 12 ] && echo -e "\e[0;31mRsync is missing on the remote server!\e[0," && exit 0
|
||||
}
|
||||
pull() {
|
||||
run_rsync "$1" "$3" "$2"
|
||||
}
|
||||
push() {
|
||||
run_rsync "$1" "$2" "$3"
|
||||
}
|
||||
sync() {
|
||||
pull "$1" "$2" "$3"
|
||||
push "$1" "$2" "$3"
|
||||
}
|
||||
case "$1" in
|
||||
mount) cryfs ~/.vault ~/vault -o allow_root ;;
|
||||
push|pull|sync) $1 "-aze ssh" "$HOME/.vault" "$REMOTE" ;;
|
||||
*) echo "Usage: $0 [ push | pull | sync | mount ]" ;;
|
||||
esac
|
@@ -3,6 +3,8 @@
|
||||
- name: Add .bat.conf
|
||||
copy: src=bat.conf dest={{ home }}/.bat.conf owner={{ name }} group={{ group }} mode=0644
|
||||
when: "'bat' in packages or 'bat' in extra_packages"
|
||||
- name: Add ~/.local/bin
|
||||
copy: src=bin dest={{ home }}/.local/bin owner={{ name }} group={{ group }} mode=0755
|
||||
|
||||
- name: Install zsh syntax highlighting (~/.zshrc.d folder)
|
||||
when: not zsh_opt_config
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Update and upgrade package managed stuff
|
||||
# when: update
|
||||
when: update
|
||||
block:
|
||||
# - name: Install yay (AUR helper)
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
when: "'alpine' in group_names"
|
||||
tags: update alpine
|
||||
|
||||
- name: Update and upgrade xbps packages
|
||||
- name: Update, upgrade and autoremove xbps packages
|
||||
become: true
|
||||
shell: xbps-install -Suv
|
||||
shell: xbps-install -Suv && xbps-remove -ROo
|
||||
when: package_manager == 'xbps' or 'xbps' in group_names
|
||||
tags: update
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
apk:
|
||||
update_cache: true
|
||||
upgrade: true
|
||||
state: 'latest'
|
||||
when: package_manager == 'apk' or 'apk' in group_names
|
||||
tags: update
|
||||
|
||||
@@ -42,6 +43,7 @@
|
||||
become: true
|
||||
apt:
|
||||
update_cache: true
|
||||
autoremove: true
|
||||
upgrade: true
|
||||
when: package_manager == 'apt' or 'apt' in group_names
|
||||
tags: update
|
||||
|
Reference in New Issue
Block a user