This commit is contained in:
2025-08-16 01:54:30 +00:00
parent 0958ef8440
commit bb0cd7a496
2 changed files with 28 additions and 11 deletions

View File

@@ -54,9 +54,26 @@ nomad_exec_bash SERVICE:
nomad_exec_sh SERVICE:
ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc exec -task {{SERVICE}} -t ${ID} /bin/sh
nomad_log SERVICE TASK:
ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc logs -task {{TASK}} ${ID}
run_nicotine:
mullvad connect
-nix-shell -p nicotine-plus --command nicotine-plus
mullvad disconnect
# Define your hosts here
HOSTS := "odroid6 odroid7 odroid8 opti1"
# Run a command on all predefined hosts
ssh_all COMMAND:
@for host in {{HOSTS}}; do echo "=== Running on $host ==="; ssh "$host" '{{COMMAND}}'; echo ""; done
# Run a command on a specific host
ssh_host HOST COMMAND:
@ssh "{{HOST}}" '{{COMMAND}}'
# Show the list of predefined hosts
ssh_list_hosts:
@echo "Predefined hosts:"
@echo "{{HOSTS}}" | tr ' ' '\n' | sed 's/^/ - /'

View File

@@ -141,7 +141,7 @@
user = "git";
identityFile = "~/.ssh/id_rsa_git";
};
"192.168.1.*" = {
"192.168.4.*" = {
user = "root";
extraOptions = {
StrictHostKeyChecking = "no";
@@ -158,15 +158,6 @@
PubkeyAcceptedKeyTypes = "+ssh-rsa"; ##needed to allow the USG to login with ssh key
};
};
##USG
"192.168.1.1" = {
user = "fbleagh";
extraOptions = {
StrictHostKeyChecking = "no";
UpdateHostKeys = "yes";
PubkeyAcceptedKeyTypes = "+ssh-rsa"; ##needed to allow the USG to login with ssh key
};
};
"router" = {
user = "fbleagh";
extraOptions = {
@@ -183,6 +174,15 @@
UserKnownHostsFile = "/dev/null";
};
};
"opti*" = {
user = "root";
extraOptions = {
StrictHostKeyChecking = "no";
UpdateHostKeys = "yes";
UserKnownHostsFile = "/dev/null";
};
};
};
};
};