![Header Image](https://miro.medium.com/v2/resize:fit:4000/1*16DgdobhWUUXKzF4fwjOdw.png) ## 📖 Overview This repository provisions and manages the Gitea Self-Hosted Runner for the Comprofix Homelab Infrastructure. This repo is designed to be run manually to build and setup the runner when requuired. Built using Infrastructure as Code (IaC) with [OpenTofu](https://opentofu.org/) and [Ansible](https://ansible.com) --- ## 🚀 Features - Declarative infrastructure management with OpenTofu and Ansible - Remote state stored in PostgreSQL backend - Secure injection of secrets into `terraform.auto.tfvars` --- ## 🔄 Usage ### 🛠️ Opentofu 1. Checkout repo 2. From the opentofu folder, generate `terraform.auto.tfvars` using the supplied `prepareEnv.sh` 3. Run `tofu init`, `tofu fmt`, `tofu validate` 4. Execute `tofu plan` 5. If successful, run `tofu apply` 6. From the ansible folder, run `ansible-playbook main.yml` ### 🧩 Ansible 1. Checkout repo 2. From the ansible folder, run `export GITEA_RUNNER_TOKEN="{{ YOUR_GITEA_RUNNER_TOKEN }}"` 3. Run `ansible-playbook main.yml -e "GITEA_RUNNER_TOKEN=$GITEA_RUNNER_TOKEN"`