diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-02 13:06:57 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-06 12:23:51 -0700 |
commit | 41b04c179964b7cc6a83e6749c436b3ba6cb0d39 (patch) | |
tree | 97216f221effbaea3ca1762cc0b2fcdf0b8efe25 /src/deployment.lisp | |
parent | 0f9b6517daad070a144baae9925f12b15fec3ff7 (diff) | |
download | consfigurator-41b04c179964b7cc6a83e6749c436b3ba6cb0d39.tar.gz |
replace WITH-LOCAL-... with an EVALS property
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/deployment.lisp')
-rw-r--r-- | src/deployment.lisp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/deployment.lisp b/src/deployment.lisp index 104a810..0703c37 100644 --- a/src/deployment.lisp +++ b/src/deployment.lisp @@ -271,3 +271,20 @@ different user." (pushnew system (slot-value (host-propspec *host*) 'systems))) (dolist (attr (getf (hostattrs host) :data)) (push-hostattrs :data attr))) + +(defprop evals :posix (&rest forms) + "Property which just evaluates each of FORMS using EVAL. Only for testing +newly defined functions and programmatic applications of properties at the +REPL with DEPLOY-THESE/HOSTDEPLOY-THESE -- do not add to hosts. + +For example, to sudo to root to test your new function which needs root +privileges to do anything at all, + + (deploy-these :sudo melete.silentflame.com (evals '(my-new-function))) + +where melete.silentflame.com is your laptop. + +Note that while this property is declared to be :POSIX for flexibility, +whether it is actually :POSIX depends on what input and output FORMS perform." + (:desc (format nil "Evaluated ~{~S~^ ~}" forms)) + (:apply (eval `(progn ,@forms)))) |