ci + ansible

This commit is contained in:
sangnn
2026-06-20 11:24:27 +07:00
parent 966578ed58
commit 78de3601c8
5 changed files with 17 additions and 21 deletions
+4 -6
View File
@@ -1,18 +1,16 @@
---
# Expands one project entry into `count` runner instances.
- name: "Read registration token for {{ project_spec.project }} from .env"
- name: "Read registration token for {{ project_spec.project }} from env var"
ansible.builtin.set_fact:
project_token: >-
{{ lookup('ansible.builtin.ini', project_spec.token_env,
file=env_file, type='properties') }}
project_token: "{{ lookup('ansible.builtin.env', project_spec.token_env) }}"
- name: "Fail if token missing for {{ project_spec.project }}"
ansible.builtin.assert:
that:
- project_token | length > 0
fail_msg: >-
{{ project_spec.token_env }} not found in {{ env_file }}.
Mint a fresh registration token (Settings > Actions > Runners) and set it.
Env var {{ project_spec.token_env }} is empty/unset.
Export a fresh registration token (Settings > Actions > Runners) before running.
- name: "Install {{ project_spec.count }} runner(s) for {{ project_spec.project }}"
ansible.builtin.include_tasks: install_one_runner.yml