From a5507b083ff91445d300ca95ae57f8251580ef1d Mon Sep 17 00:00:00 2001 From: Attila Farkas <394097@mail.muni.cz> Date: Tue, 6 Oct 2020 16:06:17 +0200 Subject: [PATCH] Add function for finding windows hosts --- modules/preprocessing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/preprocessing.py b/modules/preprocessing.py index 06deecd..2562f20 100644 --- a/modules/preprocessing.py +++ b/modules/preprocessing.py @@ -71,6 +71,15 @@ def _delete_dummy_router(definitions): return +def _find_windows_boxes(definitions): + """Find and return list of host names with windows boxes.""" + windows_hosts = [] + for host in definitions["hosts"]: + if "windows" in host["base_box"]["image"].lower(): + windows_hosts.append(host["name"]) + return windows_hosts + + def preprocess(definitions, flags): """Run preprocessing. -- GitLab