From 3e93903ea5de19f75713134966ec49597464a436 Mon Sep 17 00:00:00 2001 From: Michael Skrynski Date: Sun, 15 Feb 2026 16:19:10 +0100 Subject: [PATCH] Update inventory and remove multi-ssh script - Add cm5-01 as a worker node in inventory - Update k3s_version to v1.35.1+k3s1 - Remove the multi-ssh.sh helper script --- inventory/hosts.ini | 3 ++- multi-ssh.sh | 55 --------------------------------------------- 2 files changed, 2 insertions(+), 56 deletions(-) delete mode 100755 multi-ssh.sh diff --git a/inventory/hosts.ini b/inventory/hosts.ini index 1e64858..4c9702a 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -9,6 +9,7 @@ cm4-03 ansible_host=192.168.30.103 ansible_user=pi k3s_server_init=false [worker] # K3s worker nodes cm4-04 ansible_host=192.168.30.104 ansible_user=pi +cm5-01 ansible_host=192.168.30.105 ansible_user=pi [k3s_cluster:children] master @@ -17,7 +18,7 @@ worker [k3s_cluster:vars] # K3s version to install # Use 'latest' for auto-updates, or specify a version like 'v1.29.0+k3s1' -k3s_version=v1.35.0+k3s1 +k3s_version=v1.35.1+k3s1 # Network settings ansible_user=pi diff --git a/multi-ssh.sh b/multi-ssh.sh deleted file mode 100755 index 93f87a3..0000000 --- a/multi-ssh.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# multi-ssh.sh — Connect to multiple Raspberry Pi nodes in tmux - -# ---- CONFIG ---- -HOSTS=( - 192.168.30.101 - 192.168.30.102 - 192.168.30.103 - 192.168.30.104 -) - -USER_NAME="${USER_NAME:-pi}" # default to 'pi' user for Raspberry Pi -SESSION="multi-ssh" - -# ---- CHECKS ---- -if ! command -v tmux >/dev/null 2>&1; then - echo "tmux not found. Install with: brew install tmux" >&2 - exit 1 -fi -if [ ${#HOSTS[@]} -eq 0 ]; then - echo "No hosts configured." >&2 - exit 1 -fi - -# Kill existing session if it exists -tmux kill-session -t "$SESSION" 2>/dev/null - -# ---- CREATE SESSION WITH FIRST HOST ---- -echo "Creating tmux session and connecting to hosts..." -tmux new-session -d -s "$SESSION" "ssh ${USER_NAME}@${HOSTS[0]}" - -# ---- ADD PANES FOR REMAINING HOSTS ---- -for host in "${HOSTS[@]:1}"; do - tmux split-window -t "$SESSION" -d "ssh ${USER_NAME}@${host}" -done - -# Tile evenly -tmux select-layout -t "$SESSION" tiled - -# Optional visuals -tmux set-option -t "$SESSION" pane-border-status top -tmux set-option -t "$SESSION" pane-border-format "#{pane_index} #{pane_current_command}" - -# Enable synchronized input (type once → all panes) -tmux set-window-option -t "$SESSION" synchronize-panes on - -# Display message -tmux display-message -t "$SESSION" "Connected to ${#HOSTS[@]} hosts. Synchronized input enabled. Press Ctrl-b + Shift-E to toggle sync." - -# ---- ATTACH OR SWITCH ---- -if [ -n "$TMUX" ]; then - tmux switch-client -t "$SESSION" -else - tmux attach-session -t "$SESSION" -fi \ No newline at end of file