mirror of
https://github.com/roles-ansible/ansible_role_forgeo_runner.git
synced 2024-08-16 10:29:50 +02:00
Merge pull request #3 from roles-ansible/cfg
improve forgejo runner configuration and instalaltion
This commit is contained in:
commit
04a7ba381e
3 changed files with 16 additions and 3 deletions
|
@ -9,9 +9,22 @@
|
|||
msg: "Please set forgejo_runner__token"
|
||||
when: forgejo_runner__token == ''
|
||||
|
||||
- name: Check if website is reachable
|
||||
ansible.builtin.uri:
|
||||
url: "{{ forgejo_runner__instance_address }}"
|
||||
method: GET
|
||||
|
||||
- name: Register Forgejo runner
|
||||
become: true
|
||||
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"
|
||||
|
||||
- name: Change Owner of config
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ forgejo_runner__user_home }}/.runner"
|
||||
owner: "{{ forgejo_runner__user }}"
|
||||
group: "{{ forgejo_runner__group }}"
|
||||
mode: '0644'
|
||||
|
|
|
@ -58,8 +58,8 @@
|
|||
src: "{{ _runner_tmp.path }}/{{ forgejo_runner__filename }}"
|
||||
dest: "{{ forgejo_runner__full_executable_path }}"
|
||||
mode: "0755"
|
||||
owner: "{{ forgejo_runner__user }}"
|
||||
group: "{{ forgejo_runner__group }}"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
remote_src: true
|
||||
when: not _runner_signature.failed
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@ forgejo_runner__arch: "{{ forgejo_runner__go_arch_map[ansible_architecture] | de
|
|||
forgejo_runner__git_repo: 'https://code.forgejo.org/forgejo/runner'
|
||||
|
||||
# versionscheck
|
||||
playbook_version_number: 04 # should be a integer
|
||||
playbook_version_number: 5 # should be a integer
|
||||
playbook_version_path: 'role-l3d.git-forgejo_runner.version'
|
||||
|
|
Loading…
Reference in a new issue