1.1 KiB
1.1 KiB
📖 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 and Ansible
🚀 Features
- Declarative infrastructure management with OpenTofu and Ansible
- Remote state stored in PostgreSQL backend
- Secure injection of secrets into
terraform.auto.tfvars
🔄 Usage
🛠️ Opentofu
- Checkout repo
- From the opentofu folder, generate
terraform.auto.tfvars
using the suppliedprepareEnv.sh
- Run
tofu init
,tofu fmt
,tofu validate
- Execute
tofu plan
- If successful, run
tofu apply
- From the ansible folder, run
ansible-playbook main.yml
🧩 Ansible
- Checkout repo
- From the ansible folder, run
export GITEA_RUNNER_TOKEN="{{ YOUR_GITEA_RUNNER_TOKEN }}"
- Run
ansible-playbook main.yml -e "GITEA_RUNNER_TOKEN=$GITEA_RUNNER_TOKEN"