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.
This commit is contained in:
Marty Oehme 2025-02-23 10:55:19 +01:00
parent 38a4425d94
commit cf9e8165df
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -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