summaryrefslogtreecommitdiff
path: root/gnu/machine
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-08-07 08:44:18 -0400
committerChristopher Lemmer Webber <cwebber@dustycloud.org>2019-08-07 18:29:07 -0400
commitd84e9b75b2aba98583531f2876d9298871389585 (patch)
tree1f5ab1d6a3c53810b9659968db715a56b7cca994 /gnu/machine
parent9bd1333e587c92fb3f0c12e080cb89e41713df01 (diff)
machine: Add 'build-locally?' field for managed hosts.
* gnu/machine/ssh.scm (machine-ssh-configuration-build-locally?): New variable. (managed-host-remote-eval): Pass 'build-locally?' to 'remote-eval'.
Diffstat (limited to 'gnu/machine')
-rw-r--r--gnu/machine/ssh.scm26
1 files changed, 16 insertions, 10 deletions
diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index 274d56db269..ba3e33c9222 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -44,6 +44,7 @@
44 machine-ssh-configuration 44 machine-ssh-configuration
45 45
46 machine-ssh-configuration-host-name 46 machine-ssh-configuration-host-name
47 machine-ssh-configuration-build-locally?
47 machine-ssh-configuration-port 48 machine-ssh-configuration-port
48 machine-ssh-configuration-user 49 machine-ssh-configuration-user
49 machine-ssh-configuration-session)) 50 machine-ssh-configuration-session))
@@ -66,15 +67,17 @@
66 make-machine-ssh-configuration 67 make-machine-ssh-configuration
67 machine-ssh-configuration? 68 machine-ssh-configuration?
68 this-machine-ssh-configuration 69 this-machine-ssh-configuration
69 (host-name machine-ssh-configuration-host-name) ; string 70 (host-name machine-ssh-configuration-host-name) ; string
70 (port machine-ssh-configuration-port ; integer 71 (build-locally? machine-ssh-configuration-build-locally?
71 (default 22)) 72 (default #t))
72 (user machine-ssh-configuration-user ; string 73 (port machine-ssh-configuration-port ; integer
73 (default "root")) 74 (default 22))
74 (identity machine-ssh-configuration-identity ; path to a private key 75 (user machine-ssh-configuration-user ; string
75 (default #f)) 76 (default "root"))
76 (session machine-ssh-configuration-session ; session 77 (identity machine-ssh-configuration-identity ; path to a private key
77 (default #f))) 78 (default #f))
79 (session machine-ssh-configuration-session ; session
80 (default #f)))
78 81
79(define (machine-ssh-session machine) 82(define (machine-ssh-session machine)
80 "Return the SSH session that was given in MACHINE's configuration, or create 83 "Return the SSH session that was given in MACHINE's configuration, or create
@@ -100,7 +103,10 @@ one from the configuration's parameters if one was not provided."
100 "Internal implementation of 'machine-remote-eval' for MACHINE instances with 103 "Internal implementation of 'machine-remote-eval' for MACHINE instances with
101an environment type of 'managed-host." 104an environment type of 'managed-host."
102 (maybe-raise-unsupported-configuration-error machine) 105 (maybe-raise-unsupported-configuration-error machine)
103 (remote-eval exp (machine-ssh-session machine))) 106 (remote-eval exp (machine-ssh-session machine)
107 #:build-locally?
108 (machine-ssh-configuration-build-locally?
109 (machine-configuration machine))))
104 110
105 111
106;;; 112;;;