From ff62f4a66fec522fe2c3b24d9b984f49599bc846 Mon Sep 17 00:00:00 2001
From: Attila Farkas <ati@mail.muni.cz>
Date: Wed, 1 Jul 2020 12:23:09 +0200
Subject: [PATCH] add groups attribute

---
 modules/vagrant_generator.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/vagrant_generator.py b/modules/vagrant_generator.py
index 44dc52d..069fd0c 100644
--- a/modules/vagrant_generator.py
+++ b/modules/vagrant_generator.py
@@ -96,6 +96,9 @@ def _create_ansible_commands(playbook_location, input_definitions, flags):
     for router in input_definitions["routers"]:
         router_names.append(router["name"])
     groups["groups"]["routers"] = router_names
+    if "groups" in input_definitions:
+        for group in input_definitions["groups"]:
+            groups["groups"][group["name"]] = group["nodes"]
     commands.append(groups)
 
     if "ansible_local" in flags and flags["ansible_local"]:
-- 
GitLab