mirror of
https://github.com/roles-ansible/ansible_role_forgeo_runner.git
synced 2024-08-16 10:29:50 +02:00
21 lines
760 B
YAML
21 lines
760 B
YAML
---
|
|
- name: Make Sure Forgejo runner instace address is set
|
|
ansible.builtin.fail:
|
|
msg: "Please set forgejo_runner__instance_address"
|
|
when: forgejo_runner__instance_address == ''
|
|
|
|
- name: Make Sure Forgejo runner token is set
|
|
ansible.builtin.fail:
|
|
msg: "Please set forgejo_runner__token"
|
|
when: forgejo_runner__token == ''
|
|
|
|
- name: Register Forgejo runner
|
|
ansible.builtin.command:
|
|
chdir: "{{ forgejo_runner__user_home }}"
|
|
cmd: |
|
|
{{ forgejo_runner__full_executable_path }} register --no-interactive \
|
|
--token '{{ forgejo_runner__token }}' \
|
|
--instance '{{ forgejo_runner__instance_address }}' \
|
|
--name '{{ inventory_hostname }}@ansible'
|
|
creates: "{{ forgejo_runner__user_home }}/.runner"
|
|
become: true
|