2.1 KiB
2.1 KiB
Gitea Runner Automation with Ansible
This repository contains an Ansible playbook and configuration files to automate the deployment and configuration of a Gitea Runner on a Rocky Linux 10 VM.
To deploy a Rocky Linux virtual machine, please go to this repository.
Repository Structure
.
├── ansible.cfg # Ansible configuration settings
├── inventory.ini # Host inventory definition
├── setup.yml # Main playbook for Gitea Runner configuration
├── update.yml # Playbook to ensure system is up-to-date
Prerequisites
- Ansible installed on your control machine
- Access to a Rocky Linux 10 VM with IP
10.17.3.36 - SSH key authentication configured with
~/.ssh/terraform_key - Root privileges or sudo access on the target VM
How to Use
-
Install Ansible (if not already installed):
# For CentOS/RHEL/Fedora sudo yum install ansible # For Ubuntu/Debian sudo apt update && sudo apt install ansible -
Ensure SSH key exists:
ls ~/.ssh/terraform_key -
Run the playbook:
ansible-playbook site.yml
What This Does
This automation will:
- Connect to the specified Rocky Linux VM
- Update the system packages
- Install necessary dependencies (git)
- Create a dedicated gitea-runner user
- Set hostname to rocky10
- Download and install Gitea Runner v0.2.13
- Configure systemd service for automatic startup
- Start the Gitea Runner service
The result is a fully configured Gitea Runner that will automatically start on system boot, ready to execute Gitea Actions workflows.
Troubleshooting
If you encounter issues:
- Verify SSH connectivity to the target VM
- Ensure Ansible can reach the specified IP address
- Check that
~/.ssh/terraform_keyhas correct permissions - Review output logs for specific error messages
For additional help with Ansible configuration, consult the official Ansible documentation.