1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! DevOps Armory
//!
//! Library created to improve DevOps work.
//!
//! ## Example Standalone
//!
//! ```rust
//! use devops_armory::{
//! rustible::vm::vm_remote::vm_remote::exec_command_on_remote,
//! toml_parser::parser::toml_parser
//! };
//! use actix_web;
//!
//! #[actix_web::main]
//! async fn test_function() -> Result<(), std::io::Error> {
//!
//! let ssh_user = "user".to_string();
//! let ssh_key_location = "path_to_your_private_ssh_key".to_string();
//! let toml_file = "path_to_your_config.toml".to_string();
//! let toml_data = toml_parser(toml_file);
//! let f = toml_data.unwrap_or_default();
//! let g = &f.rustible[0];
//! let slack_vm_address_list = &g.vm[0].slackware.ip_address_list;
//! let slack_vm_commands = &g.vm[0].slackware.commands;
//! exec_command_on_remote(ssh_user, ssh_key_location, slack_vm_address_list.to_vec(), slack_vm_commands.to_vec()).await;
//! Ok(())
//!
//! }
//! ```
//!
//! ## Example Interactive - Clap Cli
//!
//! ```rust
//! use devops_armory::rustible::vm::vm_remote::vm_remote::exec_command_on_remote_cli;
//! use actix_web;
//!
//! #[actix_web::main]
//! async fn main() -> Result<(), std::io::Error> {
//!
//! let x = exec_command_on_remote_cli().await;
//!
//! match x {
//! Ok(s) => s,
//! Err(e) => println!("{}", e)
//! }
//! Ok(())
//!
//! }
//! ```