aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorPhilipp Herzog2022-09-14 12:38:08 +0200
committerPhilipp Herzog2022-11-18 13:41:54 +0100
commitd0c86650424ae60209767a90d5c93012c95b0fec (patch)
tree105f43d6190a650b151be3826a101e289b730703 /src/lib.rs
parentbe40823735bbdc40c1f6b7725c8b74d5a85d8023 (diff)
Add option to build on the remote host
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 39bc3aa..738fa81 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -163,6 +163,7 @@ pub struct CmdOverrides {
pub confirm_timeout: Option<u16>,
pub sudo: Option<String>,
pub dry_activate: bool,
+ pub remote_build: bool,
}
#[derive(PartialEq, Debug)]
@@ -395,10 +396,10 @@ impl<'a> DeployData<'a> {
}
fn get_sudo(&'a self) -> String {
- return match self.merged_settings.sudo {
- Some(ref x) => x.clone(),
- None => "sudo -u".to_string()
- };
+ match self.merged_settings.sudo {
+ Some(ref x) => x.clone(),
+ None => "sudo -u".to_string(),
+ }
}
}
@@ -416,6 +417,10 @@ pub fn make_deploy_data<'a, 's>(
merged_settings.merge(node.generic_settings.clone());
merged_settings.merge(top_settings.clone());
+ // build all machines remotely when the command line flag is set
+ if cmd_overrides.remote_build {
+ merged_settings.remote_build = Some(cmd_overrides.remote_build);
+ }
if cmd_overrides.ssh_user.is_some() {
merged_settings.ssh_user = cmd_overrides.ssh_user.clone();
}