ansible/roles/shell/files/showapps.sh
ilia 3415340e26
All checks were successful
CI / skip-ci-check (pull_request) Successful in 1m18s
CI / lint-and-test (pull_request) Successful in 1m21s
CI / ansible-validation (pull_request) Successful in 2m43s
CI / secret-scanning (pull_request) Successful in 1m19s
CI / dependency-scan (pull_request) Successful in 1m23s
CI / sast-scan (pull_request) Successful in 2m28s
CI / license-check (pull_request) Successful in 1m20s
CI / vault-check (pull_request) Successful in 2m21s
CI / playbook-test (pull_request) Successful in 2m19s
CI / container-scan (pull_request) Successful in 1m48s
CI / sonar-analysis (pull_request) Successful in 1m26s
CI / workflow-summary (pull_request) Successful in 1m17s
Refactor playbooks: servers/workstations, split monitoring, improve shell
2025-12-31 23:13:03 -05:00

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 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 ""