Skip to content

Commit 8f710ad

Browse files
committed
Add local
1 parent 5fd4ac2 commit 8f710ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rpad/core/autobot.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ def execute_command_chain_on_node(node_name, commands, username=None, local=Fals
174174
def execute_command_on_node(node_name, command, username=None, local=False):
175175
# If we're running this locally on autobot, no need to double-ssh.
176176
if local:
177-
raise ValueError("Not supported yet")
177+
cmd = ["ssh", node_name, command]
178+
if DEBUG:
179+
logging.info(" ".join(cmd))
180+
output = subprocess.check_output(cmd, text=True)
181+
return output
178182
else:
179183
if username is None:
180184
raise ValueError("username must be provided if local=True")

0 commit comments

Comments
 (0)