add projects/ - standalone scripts alongside the Docker stacks
Two real, working scripts: an Ansible playbook run-menu (the same pattern used identically across both the fleet-config and infra- provisioning repos), and cuesplit, a frame-accurate FLAC/.cue splitting utility. Sanitized paths only, logic untouched. README gets a new "Scripts & Tooling" section pointing at it, placed right after "What's Running" alongside the other repo-structure pointer.
This commit is contained in:
7 files changed
+348
No files matched your search
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
PLAYBOOK="$1"
|
||||
|
||||
if [ -z "$PLAYBOOK" ]; then
|
||||
echo "Usage: run <provisioning|initialization|compliance>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ANSIBLE_DIR="/path/to/iac/ansible"
|
||||
VENV="$HOME/ansible-modern"
|
||||
SSH_KEY="$HOME/.ssh/auto"
|
||||
VAULT_FILE="$ANSIBLE_DIR/.vault_pass.txt"
|
||||
|
||||
# Decide inventory based on playbook
|
||||
case "$PLAYBOOK" in
|
||||
initialization)
|
||||
INVENTORY="$ANSIBLE_DIR/inventory_initialization.yml"
|
||||
;;
|
||||
provisioning|compliance)
|
||||
INVENTORY="$ANSIBLE_DIR/inventory.yml"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown playbook: $PLAYBOOK"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
cd "$ANSIBLE_DIR"
|
||||
|
||||
exec "$VENV/bin/ansible-playbook" \
|
||||
-i "$INVENTORY" \
|
||||
"playbooks/${PLAYBOOK}.yml" \
|
||||
--vault-password-file "$VAULT_FILE"
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Path to your existing wrapper
|
||||
WRAPPER="/path/to/iac/ansible/run"
|
||||
|
||||
# List of playbooks
|
||||
PLAYBOOKS=("initialization" "provisioning" "compliance" "Quit")
|
||||
|
||||
# Interactive menu
|
||||
PS3="Select playbook to run (number): "
|
||||
|
||||
# Colored header (yellow)
|
||||
YELLOW="\033[1;33m"
|
||||
RESET="\033[0m"
|
||||
echo -e "${YELLOW}=== Ansible Playbook Runner ===${RESET}"
|
||||
|
||||
select opt in "${PLAYBOOKS[@]}"; do
|
||||
case $opt in
|
||||
"initialization"|"provisioning"|"compliance")
|
||||
echo "Running playbook: $opt"
|
||||
"$WRAPPER" "$opt"
|
||||
break
|
||||
;;
|
||||
"Quit")
|
||||
echo "Exiting."
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Invalid selection. Please choose a number from the list."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
Reference in new issue
Block a user