add runner user groups

This commit is contained in:
2025-01-29 22:03:43 +01:00
parent 11e78b704e
commit ad655be4f7
2 changed files with 4 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ RUNNER_TOKEN:
RUNNER_INSTANCE: https://git.exampe.com/
RUNNER_NAME: gitea-runner
RUNNER_USER: svc-gitea-runner
RUNNER_USER_GROUPS:
- docker
RUNNER_GROUP: "{{ RUNNER_USER }}"
RUNNER_DIR: "/opt/{{ RUNNER_USER }}"
RUNNER_SERVICE_NAME: "{{ RUNNER_NAME }}.service"

View File

@@ -14,6 +14,8 @@
ansible.builtin.user:
name: "{{ RUNNER_USER }}"
create_home: yes
groups: "{{ RUNNER_USER_GROUPS }}"
append: true
home: "{{ RUNNER_DIR }}"
- name: download runner