diff --git a/src/executor.rs b/src/executor.rs index a13739d..4f05ffa 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -20,6 +20,7 @@ impl DefaultExecutor { let child = Command::new(command[0].clone()) .args(&command[1..]) + .stdin(Stdio::piped()) .stdout(Stdio::piped()) .stderr(Stdio::piped()) .spawn() diff --git a/src/options.rs b/src/options.rs index 0f16d4d..e02852d 100644 --- a/src/options.rs +++ b/src/options.rs @@ -48,15 +48,15 @@ impl Default for AnsibleConnectionOptions { } impl AnsibleConnectionOptions { - const ASK_PASS_FLAG: &str = "--ask-pass"; - const CONNECTION_FLAG: &str = "--connection"; - const PRIVATE_KEY_FLAG: &str = "--private-key"; - const SCP_EXTRA_ARGS_FLAG: &str = "--scp-extra-args"; - const SFTP_EXTRA_ARGS_FLAG: &str = "--sftp-extra-args"; - const SSH_COMMON_ARGS_FLAG: &str = "--ssh-common-args"; - const SSH_EXTRA_ARGS_FLAG: &str = "--ssh-extra-args"; - const TIMEOUT_FLAG: &str = "--timeout"; - const USER_FLAG: &str = "--user"; + const ASK_PASS_FLAG: &'static str = "--ask-pass"; + const CONNECTION_FLAG: &'static str = "--connection"; + const PRIVATE_KEY_FLAG: &'static str = "--private-key"; + const SCP_EXTRA_ARGS_FLAG: &'static str = "--scp-extra-args"; + const SFTP_EXTRA_ARGS_FLAG: &'static str = "--sftp-extra-args"; + const SSH_COMMON_ARGS_FLAG: &'static str = "--ssh-common-args"; + const SSH_EXTRA_ARGS_FLAG: &'static str = "--ssh-extra-args"; + const TIMEOUT_FLAG: &'static str = "--timeout"; + const USER_FLAG: &'static str = "--user"; /// Returns a list of connection options flags to be used on /// ansible-playbook execution @@ -146,10 +146,10 @@ pub struct AnsiblePrivilegeEscalationOptions { } impl AnsiblePrivilegeEscalationOptions { - const ASK_BECOME_PASS_FLAG: &str = "--ask-become-pass"; - const BECOME_FLAG: &str = "--become"; - const BECOME_METHOD_FLAG: &str = "--become-method"; - const BECOME_USER_FLAG: &str = "--become-user"; + const ASK_BECOME_PASS_FLAG: &'static str = "--ask-become-pass"; + const BECOME_FLAG: &'static str = "--become"; + const BECOME_METHOD_FLAG: &'static str = "--become-method"; + const BECOME_USER_FLAG: &'static str = "--become-user"; /// returns a list of privilege escalation options flags to be used on /// ansible-playbook execution diff --git a/src/playbook.rs b/src/playbook.rs index b2f9b20..3cfb588 100644 --- a/src/playbook.rs +++ b/src/playbook.rs @@ -73,32 +73,32 @@ impl Default for AnsiblePlaybookOptions { } impl AnsiblePlaybookOptions { - const ASK_VAULT_PASSWORD_FLAG: &str = "--ask-vault-password"; - const CHECK_FLAG: &str = "--check"; - const DIFF_FLAG: &str = "--diff"; - const EXTRA_VARS_FLAG: &str = "--extra-vars"; - const FLUSH_CACHE_FLAG: &str = "--flush-cache"; - const FORCE_HANDLERS_FLAG: &str = "--force-handlers"; - const FORKS_FLAG: &str = "--forks"; - const INVENTORY_FLAG: &str = "--inventory"; - const LIMIT_FLAG: &str = "--limit"; - const LIST_HOSTS_FLAG: &str = "--list-hosts"; - const LIST_TAGS_FLAG: &str = "--list-tags"; - const LIST_TASKS_FLAG: &str = "--list-tasks"; - const MODULE_PATH_FLAG: &str = "--module-path"; - const SKIP_TAGS_FLAG: &str = "--skip-tags"; - const START_AT_TASK_FLAG: &str = "--start-at-task"; - const STEP_FLAG: &str = "--step"; - const SYNTAX_CHECK_FLAG: &str = "--syntax-check"; - const TAGS_FLAG: &str = "--tags"; - const VAULT_ID_FLAG: &str = "--vault-id"; - const VAULT_PASSWORD_FILE_FLAG: &str = "--vault-password-file"; - const VERSION_FLAG: &str = "--version"; - const VERBOSE_FLAG: &str = "-vvvv"; - const VERBOSE_V_FLAG: &str = "-v"; - const VERBOSE_VV_FLAG: &str = "-vv"; - const VERBOSE_VVV_FLAG: &str = "-vvv"; - const VERBOSE_VVVV_FLAG: &str = "-vvvv"; + const ASK_VAULT_PASSWORD_FLAG: &'static str = "--ask-vault-password"; + const CHECK_FLAG: &'static str = "--check"; + const DIFF_FLAG: &'static str = "--diff"; + const EXTRA_VARS_FLAG: &'static str = "--extra-vars"; + const FLUSH_CACHE_FLAG: &'static str = "--flush-cache"; + const FORCE_HANDLERS_FLAG: &'static str = "--force-handlers"; + const FORKS_FLAG: &'static str = "--forks"; + const INVENTORY_FLAG: &'static str = "--inventory"; + const LIMIT_FLAG: &'static str = "--limit"; + const LIST_HOSTS_FLAG: &'static str = "--list-hosts"; + const LIST_TAGS_FLAG: &'static str = "--list-tags"; + const LIST_TASKS_FLAG: &'static str = "--list-tasks"; + const MODULE_PATH_FLAG: &'static str = "--module-path"; + const SKIP_TAGS_FLAG: &'static str = "--skip-tags"; + const START_AT_TASK_FLAG: &'static str = "--start-at-task"; + const STEP_FLAG: &'static str = "--step"; + const SYNTAX_CHECK_FLAG: &'static str = "--syntax-check"; + const TAGS_FLAG: &'static str = "--tags"; + const VAULT_ID_FLAG: &'static str = "--vault-id"; + const VAULT_PASSWORD_FILE_FLAG: &'static str = "--vault-password-file"; + const VERSION_FLAG: &'static str = "--version"; + const VERBOSE_FLAG: &'static str = "-vvvv"; + const VERBOSE_V_FLAG: &'static str = "-v"; + const VERBOSE_VV_FLAG: &'static str = "-vv"; + const VERBOSE_VVV_FLAG: &'static str = "-vvv"; + const VERBOSE_VVVV_FLAG: &'static str = "-vvvv"; fn gen_verbosity(&self) -> &str { if self.verbose {