From cf9e8165dfa265374f4e5ae4460050c2a6038da1 Mon Sep 17 00:00:00 2001
From: Marty Oehme <marty.oehme@gmail.com>
Date: Sun, 23 Feb 2025 10:55:19 +0100
Subject: [PATCH] ref(inventory): Create target type indirection

Allows setting the current target to any of the groups sorted by target
type (i.e. 'what' type of machine it is). For example, we currently
target our system to a 'workstation' type machine. But we could switch
it to a headless machine which would not install any of the DE/GUI
grouped packages.
---
 inventory.yaml | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/inventory.yaml b/inventory.yaml
index f01fe28..6872282 100644
--- a/inventory.yaml
+++ b/inventory.yaml
@@ -1,3 +1,17 @@
+# example separation of packages: GUIs and DEs in workstation, only terminal in headless
+workstation:
+  children:
+    target_system: # mark this the current target system
+
+headless:
+  children:
+
+target_system:
+  children:
+    chroot_target:
+  vars:
+    desired_package_state: latest
+
 hostsystem:
   hosts:
     127.0.0.1:
@@ -15,15 +29,9 @@ local_target:
     void_local:
       ansible_host: 127.0.0.1
 
-target_system:
-  children:
-    chroot_target:
-  vars:
-    desired_package_state: latest
-
 interface:
   children:
-    target_system:
+    workstation:
   vars:
     fonts:
       - nerd-fonts-otf
@@ -47,7 +55,8 @@ interface:
 
 terminal:
   children:
-    target_system:
+    workstation:
+    headless:
   vars:
     packages_terminal:
       - abduco