aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorRoman Melnikov2024-02-16 14:49:44 +0100
committerGitHub2024-02-16 14:49:44 +0100
commit0a0187794ac7f7a1e62cda3dabf8dc041f868790 (patch)
tree57e0fed6d50a149c6d5c808f671495191977d80d /src/lib.rs
parent1776009f1f3fb2b5d236b84d9815f2edee463a9b (diff)
parent5f694ef481610e8c4c77bb963b49e2d3b0d4db3c (diff)
Merge pull request #257 from n-hass/feature/interactive-sudo
Add support for entering sudo password interactively
Diffstat (limited to '')
-rw-r--r--src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 663e26e..61fac6a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -165,6 +165,7 @@ pub struct CmdOverrides {
pub confirm_timeout: Option<u16>,
pub activation_timeout: Option<u16>,
pub sudo: Option<String>,
+ pub interactive_sudo: Option<bool>,
pub dry_activate: bool,
pub remote_build: bool,
}
@@ -334,6 +335,7 @@ pub struct DeployDefs {
pub ssh_user: String,
pub profile_user: String,
pub sudo: Option<String>,
+ pub sudo_password: Option<String>,
}
enum ProfileInfo {
ProfilePath {
@@ -369,6 +371,7 @@ impl<'a> DeployData<'a> {
ssh_user,
profile_user,
sudo,
+ sudo_password: None,
})
}
@@ -448,6 +451,9 @@ pub fn make_deploy_data<'a, 's>(
if let Some(activation_timeout) = cmd_overrides.activation_timeout {
merged_settings.activation_timeout = Some(activation_timeout);
}
+ if let Some(interactive_sudo) = cmd_overrides.interactive_sudo {
+ merged_settings.interactive_sudo = Some(interactive_sudo);
+ }
DeployData {
node_name,