Merged from veridion-gitea and veridion-act-runner-gitea repos. nult (Null-T) - instant teleportation from Strugatsky's Noon Universe. Like Null-T, this toolkit instantly deploys infrastructure. Roles: - gitea: Gitea server with PostgreSQL (Docker Compose) - act_runner: Gitea Actions runner Playbooks: - gitea.yml: Deploy Gitea server - act-runner.yml: Deploy Act Runner - site.yml: Deploy all services Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
---
|
|
# =============================================================================
|
|
# Gitea Act Runner Deployment Playbook
|
|
# =============================================================================
|
|
#
|
|
# Deploys and configures Gitea Act Runner on Ubuntu servers.
|
|
#
|
|
# Usage:
|
|
# ansible-playbook -i inventory/hosts.yml act-runner.yml --ask-vault-pass
|
|
#
|
|
# Dry run:
|
|
# ansible-playbook -i inventory/hosts.yml act-runner.yml --check --diff --ask-vault-pass
|
|
#
|
|
# =============================================================================
|
|
|
|
- name: Deploy Gitea Act Runner
|
|
hosts: runner_servers
|
|
become: true
|
|
gather_facts: true
|
|
|
|
pre_tasks:
|
|
- name: Validate target operating system
|
|
ansible.builtin.assert:
|
|
that:
|
|
- ansible_facts['distribution'] == "Ubuntu"
|
|
- ansible_facts['distribution_major_version'] | int >= 20
|
|
fail_msg: >-
|
|
This playbook requires Ubuntu 20.04 or later.
|
|
Detected: {{ ansible_facts['distribution'] }} {{ ansible_facts['distribution_version'] }}
|
|
|
|
- name: Update apt package cache
|
|
ansible.builtin.apt:
|
|
update_cache: true
|
|
cache_valid_time: 3600
|
|
|
|
roles:
|
|
- role: act_runner
|
|
tags: [act_runner]
|
|
|
|
post_tasks:
|
|
- name: Display deployment summary
|
|
ansible.builtin.debug:
|
|
msg:
|
|
- "=============================================="
|
|
- "Gitea Act Runner - Deployment Complete"
|
|
- "=============================================="
|
|
- "Runner name: {{ act_runner_name }}"
|
|
- "Gitea instance: {{ gitea_instance_url }}"
|
|
- "Service status: {{ 'RUNNING' if act_runner_service_status.status.ActiveState == 'active' else 'NOT RUNNING' }}"
|
|
- ""
|
|
- "Verify in Gitea UI:"
|
|
- " {{ gitea_instance_url }}/-/admin/actions/runners"
|
|
- "=============================================="
|