diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-05 15:22:20 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-05 15:23:42 -0700 |
commit | deb8cb652cb9f41ee19312ec25582478c0d08311 (patch) | |
tree | f05c038916a89e854f2f53c865b7df33fc020c57 /src/deployment.lisp | |
parent | 8b94832ca03015061f4bc43ddcc52d6b2fb39919 (diff) | |
download | consfigurator-deb8cb652cb9f41ee19312ec25582478c0d08311.tar.gz |
add HOSTDEPLOY, HOSTDEPLOY-THESE
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/deployment.lisp')
-rw-r--r-- | src/deployment.lisp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/deployment.lisp b/src/deployment.lisp index 3b77168..cd5c5a7 100644 --- a/src/deployment.lisp +++ b/src/deployment.lisp @@ -161,6 +161,36 @@ You can then eval (NAME) to execute this deployment." `(defun ,name () (deploy-these ,connections ,host ,@properties))) +(defun hostdeploy* (host &optional additional-properties) + "Like DEPLOY*, but use the host's default deployment." + (deploy* (or (host-deployment host) + (simple-program-error "Host has no default deployment")) + host + additional-properties)) + +(defun hostdeploy-these* (host properties) + "Like DEPLOY-THESE*, but use the host's default deployment." + (deploy-these* (or (host-deployment host) + (simple-program-error "Host has no default deployment")) + host + properties)) + +(defmacro hostdeploy (host &body additional-properties) + "Like DEPLOY, but use the host's default deployment." + (once-only (host) + `(hostdeploy* ,host + (let ((*host* (shallow-copy-host ,host))) + (make-propspec + :propspec (props eseqprops ,@additional-properties)))))) + +(defmacro hostdeploy-these (host &body properties) + "Like DEPLOY-THESE, but use the host's default deployment." + (once-only (host) + `(hostdeploy-these* ,host + (let ((*host* (shallow-copy-host ,host))) + (make-propspec + :propspec (props eseqprops ,@properties)))))) + (defprop deploys :posix (connections host &optional additional-properties) "Execute the deployment which is defined by the pair (CONNECTIONS . HOST), except possibly with the property application specification |