From da6d44c95b02e7fcdfa0387b78c0d7eef7e17ccd Mon Sep 17 00:00:00 2001
From: June <june@jsts.xyz>
Date: Sun, 23 Feb 2025 23:21:58 +0100
Subject: [PATCH] add thinkcccore0 to hosts and relevant groups

Especially add it to the proxmox_vm_template_hosts group to ensure
Proxmox VM template generation.
---
 inventories/z9/hosts.yaml        | 8 ++++++++
 playbooks/deploy_hypervisor.yaml | 7 +++++++
 2 files changed, 15 insertions(+)

diff --git a/inventories/z9/hosts.yaml b/inventories/z9/hosts.yaml
index 0dde922..13e2cc9 100644
--- a/inventories/z9/hosts.yaml
+++ b/inventories/z9/hosts.yaml
@@ -6,6 +6,11 @@ all:
     authoritative-dns:
       ansible_host: authoritative-dns.z9.ccchh.net
       ansible_user: chaos
+    thinkcccore0:
+      ansible_host: thinkcccore0.z9.ccchh.net
+hypervisors:
+  hosts:
+    thinkcccore0:
 nginx_hosts:
   hosts:
     light:
@@ -19,3 +24,6 @@ infrastructure_authorized_keys_hosts:
   hosts:
     light:
     authoritative-dns:
+proxmox_vm_template_hosts:
+  hosts:
+    thinkcccore0:
diff --git a/playbooks/deploy_hypervisor.yaml b/playbooks/deploy_hypervisor.yaml
index 0739d35..4d3200f 100644
--- a/playbooks/deploy_hypervisor.yaml
+++ b/playbooks/deploy_hypervisor.yaml
@@ -1,6 +1,13 @@
 - name: Ensure the VM template generation is set up
   hosts: proxmox_vm_template_hosts
   tasks:
+    - name: Ensure dependencies are present
+      ansible.builtin.apt:
+        name:
+          - git
+          - libguestfs-tools
+      become: true
+
     - name: Ensure /usr/local/{lib,sbin} exist
       ansible.builtin.file:
         path: "{{ item }}"