mirror of
https://github.com/roles-ansible/ansible_role_forgeo_runner.git
synced 2024-08-16 10:29:50 +02:00
improve forgejo runner configuration and instalaltion
This commit is contained in:
parent
64cb843527
commit
a38bda55ee
3 changed files with 16 additions and 3 deletions
|
@ -9,9 +9,22 @@
|
||||||
msg: "Please set forgejo_runner__token"
|
msg: "Please set forgejo_runner__token"
|
||||||
when: 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
|
- name: Register Forgejo runner
|
||||||
|
become: true
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
chdir: "{{ forgejo_runner__user_home }}"
|
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'"
|
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"
|
creates: "{{ forgejo_runner__user_home }}/.runner"
|
||||||
|
|
||||||
|
- name: Change Owner of config
|
||||||
become: true
|
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 }}"
|
src: "{{ _runner_tmp.path }}/{{ forgejo_runner__filename }}"
|
||||||
dest: "{{ forgejo_runner__full_executable_path }}"
|
dest: "{{ forgejo_runner__full_executable_path }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
owner: "{{ forgejo_runner__user }}"
|
owner: "root"
|
||||||
group: "{{ forgejo_runner__group }}"
|
group: "root"
|
||||||
remote_src: true
|
remote_src: true
|
||||||
when: not _runner_signature.failed
|
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'
|
forgejo_runner__git_repo: 'https://code.forgejo.org/forgejo/runner'
|
||||||
|
|
||||||
# versionscheck
|
# 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'
|
playbook_version_path: 'role-l3d.git-forgejo_runner.version'
|
||||||
|
|
Loading…
Reference in a new issue