Skip to content

Commit e3b23fd

Browse files
author
Danny Verbeek
committed
Add option to overwrite service_name
1 parent 222bd87 commit e3b23fd

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ runner_org: no
3535
# Name to assign to this runner in GitHub (System hostname as default)
3636
runner_name: "{{ ansible_hostname }}"
3737

38+
# Custom service name whe usign Github Enterprise server
39+
# service_name: actions.runner._services.{{ runner_name }}.service
40+
3841
# GitHub Repository user or Organization owner used for Runner registration
3942
# github_account: "youruser"
4043

tasks/collect_info_org.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@
3838
- name: Build service name
3939
set_fact:
4040
runner_service: "actions.runner.{{ (github_owner | default(github_account))[:45] }}.{{ runner_name }}.service"
41+
when: service_name is not defined
4142
tags:
4243
- install
4344
- uninstall
45+
46+
- name: Build service name
47+
set_fact:
48+
runner_service: "{{ service_name }}"
49+
when: service_name is defined
50+
tags:
51+
- install
52+
- uninstall

tasks/collect_info_repo.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@
4545
- name: Build service name
4646
set_fact:
4747
runner_service: "actions.runner.{{ svc_name[:45] }}.{{ runner_name }}.service"
48+
when: service_name is not defined
49+
tags:
50+
- install
51+
- uninstall
52+
53+
- name: Build service name
54+
set_fact:
55+
runner_service: "{{ service_name }}"
56+
when: service_name is defined
4857
tags:
4958
- install
5059
- uninstall

0 commit comments

Comments
 (0)