ref(inventory): Make chroot target one child of target systems

This should allow just having a general 'target' system for ansible
which will take all the modifications - but not care whether we connect
to it locally (i.e. running from void) or through chroot.

We can set the connection method for the specific system(s) in whatever
we group as part of the target group then. For local installation we
simply add locally connected hosts and for chroot set up chrooted hosts.
This commit is contained in:
Marty Oehme 2025-02-23 10:18:22 +01:00
parent 9138d7b66b
commit 996560410e
Signed by: Marty
GPG key ID: 4E535BC19C61886E
7 changed files with 18 additions and 8 deletions

View file

@ -3,7 +3,7 @@ hostsystem:
127.0.0.1:
ansible_connection: local
chroot:
chroot_target:
hosts:
void:
ansible_host: /mnt/void
@ -11,6 +11,16 @@ chroot:
ansible_chroot_exe: arch-chroot
desired_package_state: latest
local_target:
hosts:
void:
ansible_host: 127.0.0.1
desired_package_state: latest
target_system:
children:
chroot_target:
interface:
hosts:
void: