inspector/.justfile

38 lines
975 B
Makefile

# set dotenv-load := true
set shell := ["bash","-eu","-o","pipefail","-c"]
NOW := `date +%Y%m%d%H%M%S`
gather: build
mkdir -p "runs/{{ NOW }}"
cd "runs/{{ NOW }}"
# sudo dmidecode --string system-uuid
sudo dmidecode > "runs/{{ NOW }}/dmidecode"
inxi --full > "runs/{{ NOW }}/inxi.expanded"
sudo dmesg > "runs/{{NOW}}/dmesg"
sudo lshw > "runs/{{NOW}}/lshw"
rye run ansible localhost -m ansible.builtin.setup > "runs/{{ NOW }}/ansible.builtin.setup.json"
dash:
# open screen session with multiple commands
screen -S mysession -d -m
screen -S mysession -X screen -t "top" top
screen -S mysession -X screen -t "htop" htop
screen -S mysession -X screen -t "iostat" iostat
screen -S mysession -X screen -t "sysstat" sysstat
killdash:
screen -S mysession -X quit
build:
rye sync
clean: killdash
rm -rf runs
update:
# git reset if local changes?
git fetch && git pull
./install.sh
just setup