feat: add cluster auditing, management, and upgrade scripts

This commit is contained in:
2026-11-04 17:58:07 -05:00
parent 8117326b14
commit 1b378b29f3
128 changed files with 4744 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
import paramiko
import sys
import time
sys.stdout.reconfigure(encoding='utf-8')
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('140.44.4.11', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
py_launch = """
from awx.main.models import JobTemplate
jt = JobTemplate.objects.get(id=10)
job = jt.create_unified_job()
job.signal_start()
print(f"Launched Job [{job.id}] for Template '{jt.name}': Status={job.status}")
"""
cmd = f"kubectl exec -i -n awx -c awx-task deployment/awx-task -- awx-manage shell_plus --quiet << 'EOF'\n{py_launch}\nEOF"
stdin, stdout, stderr = ssh.exec_command(cmd)
print(stdout.read().decode())
ssh.close()