From b3c5347143c594e19a5f4808b271047f79c3dd36 Mon Sep 17 00:00:00 2001
From: Marty Oehme <marty.oehme@gmail.com>
Date: Sat, 22 Feb 2025 17:11:58 +0100
Subject: [PATCH] feat(inventory): Change to yaml definition

---
 ansible.cfg        |  2 +-
 host.yaml          |  2 +-
 inventory          |  5 -----
 inventory.yaml     | 14 ++++++++++++++
 void_packages.yaml |  1 +
 5 files changed, 17 insertions(+), 7 deletions(-)
 delete mode 100644 inventory
 create mode 100644 inventory.yaml

diff --git a/ansible.cfg b/ansible.cfg
index b4a6d4b..bcc2050 100644
--- a/ansible.cfg
+++ b/ansible.cfg
@@ -1,2 +1,2 @@
 [defaults]
-inventory=inventory
+inventory=inventory.yaml
diff --git a/host.yaml b/host.yaml
index ea1fb00..6b4b92f 100644
--- a/host.yaml
+++ b/host.yaml
@@ -28,7 +28,7 @@
  #        - { fstype: 'vfat',  src: '/dev/disk/by-uuid/{{ boot_dev_uuid }}', path: '{{ mount_dir }}/boot' }
  
 - name: Create voidlinux guest
-  hosts: host
+  hosts: hostsystem
   become: true
   vars:
     mount_dir: /mnt/void
diff --git a/inventory b/inventory
deleted file mode 100644
index da1d422..0000000
--- a/inventory
+++ /dev/null
@@ -1,5 +0,0 @@
-[host]
-127.0.0.1 ansible_connection=local
-
-[chroot]
-/mnt/void ansible_connection=community.general.chroot
diff --git a/inventory.yaml b/inventory.yaml
new file mode 100644
index 0000000..bf9f2de
--- /dev/null
+++ b/inventory.yaml
@@ -0,0 +1,14 @@
+hostsystem:
+  hosts:
+    127.0.0.1:
+      ansible_connection: local
+
+chroot:
+  hosts:
+    void:
+      ansible_host: /mnt/void
+      ansible_connection: community.general.chroot
+
+interface:
+  hosts:
+    void:
diff --git a/void_packages.yaml b/void_packages.yaml
index 7f80c28..be7926e 100644
--- a/void_packages.yaml
+++ b/void_packages.yaml
@@ -1,6 +1,7 @@
 - name: Install void customizations
   hosts: void
   become: true
+  tags: interface
   vars:
     ansible_chroot_exe: arch-chroot
   tasks: