Added expansion of hosts list.

This commit is contained in:
Alexandr Bogomyakov
2023-06-20 02:46:02 +03:00
parent af0c005b92
commit ee507ac4b4

View File

@ -6,12 +6,12 @@ use env_logger::Env;
use itertools::Itertools; use itertools::Itertools;
use log::{error, info}; use log::{error, info};
use massh::{MasshClient, MasshConfig, MasshHostConfig, SshAuth}; use massh::{MasshClient, MasshConfig, MasshHostConfig, SshAuth};
use regex::{Error, Regex}; use regex::{Regex};
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap};
use std::fs::read_to_string; use std::fs::read_to_string;
use std::hash::Hash; use std::hash::Hash;
use std::net::IpAddr; use std::net::IpAddr;
use std::str::FromStr;
use std::process; use std::process;
#[macro_use] #[macro_use]
@ -116,7 +116,7 @@ fn main() {
}; };
// Dedup hosts from known_hosts file // Dedup hosts from known_hosts file
let mut matched_hosts: Vec<_> = hosts.into_iter().unique().collect(); let matched_hosts: Vec<_> = hosts.into_iter().unique().collect();
// Build MasshHostConfig hostnames list // Build MasshHostConfig hostnames list
let mut massh_hosts: Vec<MasshHostConfig> = vec![]; let mut massh_hosts: Vec<MasshHostConfig> = vec![];