- Refactor Makefile to enhance command structure, including clearer descriptions and usage examples for targets related to development, inventory, and monitoring tasks. - Update inventory files to ensure correct host configurations and user settings, including adjustments to ansible_user for specific hosts. - Modify group_vars to streamline Tailscale configuration and ensure proper handling of authentication keys. These changes improve the clarity and usability of the Makefile and inventory setup, facilitating smoother operations across the infrastructure.
55 lines
1.7 KiB
Bash
55 lines
1.7 KiB
Bash
#!/bin/bash
|
|
# Show installed software on this system
|
|
# Part of the Ansible shell role
|
|
|
|
BOLD='\033[1m'
|
|
GREEN='\033[32m'
|
|
YELLOW='\033[33m'
|
|
RED='\033[31m'
|
|
RESET='\033[0m'
|
|
|
|
echo -e "${BOLD}=== Installed Software ===${RESET}\n"
|
|
|
|
echo -e "${YELLOW}Development:${RESET}"
|
|
for tool in git node python3 docker; do
|
|
if command -v $tool >/dev/null 2>&1; then
|
|
version=$(case $tool in
|
|
node) node --version 2>/dev/null ;;
|
|
python3) python3 --version 2>/dev/null | awk '{print $2}' ;;
|
|
git) git --version 2>/dev/null | awk '{print $3}' ;;
|
|
docker) docker --version 2>/dev/null | awk '{print $3}' | tr -d ',' ;;
|
|
esac)
|
|
printf " ${GREEN}✓${RESET} %-15s %s\n" "$tool" "$version"
|
|
fi
|
|
done
|
|
|
|
echo -e "\n${YELLOW}Data Science:${RESET}"
|
|
for tool in conda jupyter R; do
|
|
if command -v $tool >/dev/null 2>&1; then
|
|
version=$(case $tool in
|
|
conda) conda --version 2>/dev/null | awk '{print $2}' ;;
|
|
jupyter) echo "installed" ;;
|
|
R) R --version 2>/dev/null | head -1 | awk '{print $3}' ;;
|
|
esac)
|
|
printf " ${GREEN}✓${RESET} %-15s %s\n" "$tool" "$version"
|
|
fi
|
|
done
|
|
|
|
echo -e "\n${YELLOW}Editors:${RESET}"
|
|
for tool in cursor code vim nvim nano; do
|
|
command -v $tool >/dev/null 2>&1 && printf " ${GREEN}✓${RESET} %s\n" "$tool"
|
|
done
|
|
|
|
echo -e "\n${YELLOW}CLI Tools:${RESET}"
|
|
for tool in tmux fzf htop btop jq yq rg fd; do
|
|
command -v $tool >/dev/null 2>&1 && printf " ${GREEN}✓${RESET} %s\n" "$tool"
|
|
done
|
|
|
|
echo -e "\n${YELLOW}Shell:${RESET}"
|
|
echo -e " ${GREEN}✓${RESET} current: $SHELL"
|
|
[ -d "$HOME/.oh-my-zsh" ] && echo -e " ${GREEN}✓${RESET} oh-my-zsh"
|
|
[ -d "$HOME/.oh-my-zsh/custom/themes/powerlevel10k" ] && echo -e " ${GREEN}✓${RESET} powerlevel10k"
|
|
|
|
echo ""
|
|
|