feat: add scripts for k3s cluster upgrade and health checks via AWX and SSH
This commit is contained in:
13
scripts/check_13_boot.py
Normal file
13
scripts/check_13_boot.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import paramiko, sys
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
try:
|
||||
ssh.connect('140.44.4.13', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
stdin, stdout, stderr = ssh.exec_command('hostname; uptime; k3s --version')
|
||||
print("SSH SUCCESS TO .13:\n", stdout.read().decode())
|
||||
ssh.close()
|
||||
except Exception as e:
|
||||
print(f"SSH Failed: {e}")
|
||||
|
||||
Reference in New Issue
Block a user