feat: add infrastructure automation scripts and master improvement plan
This commit is contained in:
13
scripts/inspect_service_mounts.py
Normal file
13
scripts/inspect_service_mounts.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import paramiko
|
||||
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect('140.44.4.71', username='snarf', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
|
||||
services = ['gotify_gotify', 'homebox_homebox', 'peanut_peanut', 'nginx-proxy-manager_app', 'nginx-proxy-manager_backup']
|
||||
for svc in services:
|
||||
stdin, stdout, stderr = ssh.exec_command(f'sudo docker service inspect {svc} --format "{{{{.Spec.Name}}}}: {{{{.Spec.TaskTemplate.ContainerSpec.Mounts}}}}"')
|
||||
print(stdout.read().decode())
|
||||
|
||||
ssh.close()
|
||||
|
||||
Reference in New Issue
Block a user