ci: add ansible and CICD deployment
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
---
|
||||
# Expands one project entry into `count` runner instances.
|
||||
- name: "Read registration token for {{ project_spec.project }} from env var"
|
||||
ansible.builtin.set_fact:
|
||||
project_token: "{{ lookup('ansible.builtin.env', project_spec.token_env) }}"
|
||||
|
||||
- name: "Warn and skip {{ project_spec.project }} — token missing"
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
Skipping {{ project_spec.project }}: env var {{ project_spec.token_env }} is empty/unset.
|
||||
Export a fresh registration token (Gitea repo → Settings → Actions → Runners → Create new runner token).
|
||||
when: project_token | length == 0
|
||||
|
||||
- name: "Install {{ project_spec.count }} runner(s) for {{ project_spec.project }}"
|
||||
ansible.builtin.include_tasks: install_one_runner.yml
|
||||
loop: "{{ range(1, project_spec.count | int + 1) | list }}"
|
||||
loop_control:
|
||||
loop_var: idx
|
||||
label: "{{ project_spec.project }}-{{ idx }}"
|
||||
when: project_token | length > 0
|
||||
Reference in New Issue
Block a user