Skip to the content.

Gitea Ansible playbook

Deploy Gitea, your light weight git server on Debian System with ansible playbook

Getting Started

Inventory

cp example.inventory.ini inventory.ini

Variables

Copy sample variable file located in vars directory example.vars.yml to vars.yml using cp example.vars.yml vars.yml

Ansible Installation

Install ansible with the following

Install python3 & pip3

sudo apt install python3 python3-pip -y`

Install ansible

python3 -m pip install ansible

install required modules

ansible-galaxy collection install -r requirements.yml

Deployment

Run the playbook with

  ansible-playbook main.yml

Append -K if ansible users needs sudo password to elevate sudo privileges

Configuration

After succesful Deployment visit IP:3000 and fill out the details

Database Settings

We are using SQLite for Database. If you are planning on running gitea with multiple teams and members it is recomended to use MySql.

Gitea Database Settings

Gitea General Settings

Admin Account

Expand Optional settings and add details for admin account.

Gitea Admin Settings

To complete the installation click on install and it’ll redirect to the login page.

Post Deployment

/etc/gitea is temporary set with write rights for user git. After installation is done, it is recommended to set rights to read-only using:

ansible-playbook post_install.yml

Append -K if ansible users needs sudo password to elevate sudo privileges

Service management

License

MIT

Authors

@kdpuvvadi

twitter