ci + ansible
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user