Can be used to have the ansible playbook run on the currently running
(host) machine, using a local connection instead of a chroot.
TODO: This _will_ change your host machine so be careful running this.
Additionally, we need to find a way to deduplicate the inventory
variables since we have them doubled for chroot/local now.
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.
If assigning a list of 'host's to a group those become actual hosts and
have their own host variables. What we want to use groups with
child/parent relationships to group things is to not directly use hosts.
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.
It does not work like I want it to - presumably since it counts for
tasks _within_ the play while it is the connection for the play itself
which requires root?
Working from a chroot we need to manually look for the existing kernels
and build an initramfs from them. We can not just use the auto detection
functionality since it will detect the _HOST_ system's running kernel.
Instead we get the kernel module dir(s) and manually build a booster
initramfs for each one found.