feat: initial installation role for gitea

This commit is contained in:
2026-05-24 17:13:35 +02:00
commit 88e3f01895
6 changed files with 175 additions and 0 deletions

39
README.md Normal file
View File

@@ -0,0 +1,39 @@
# ansible-role-gitea
Installs the Gitea binary from GitHub releases and sets up a systemd service.
Architecture is auto-detected. The role is idempotent.
The service user and group (default: `git`) must be created beforehand.
Application configuration (`app.ini`) is out of scope for this role.
## Requirements
- Ansible >= 2.14
## Role Variables
| Variable | Default | Description |
|---|---|---|
| `gitea_version` | `""` | Version to install (empty = latest) |
| `gitea_user` | `git` | User to run Gitea |
| `gitea_group` | `git` | Group to run Gitea |
| `gitea_install_dir` | `/usr/local/bin` | Directory for the Gitea binary |
| `gitea_home_dir` | `/var/lib/gitea` | Gitea work directory |
| `gitea_config_dir` | `/etc/gitea` | Directory for `app.ini` |
| `gitea_service_enabled` | `true` | Enable service at boot |
| `gitea_service_state` | `started` | Service state after installation |
## Example Playbook
```yaml
- hosts: git_servers
roles:
- role: ansible-role-gitea
vars:
gitea_user: git
gitea_group: git
```
## License
MIT