Skip to content

Commit 97f4100

Browse files
Merge pull request #150 from domask/group-permissions
Set the right group permissions.
2 parents 251abb4 + 696312c commit 97f4100

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tasks/collect_info.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,9 @@
3737
- name: Check service facts
3838
ansible.builtin.service_facts:
3939

40+
- name: Get Runner User IDs
41+
ansible.builtin.getent:
42+
database: passwd
43+
key: "{{ runner_user }}"
44+
4045
check_mode: false

tasks/install_runner.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
path: "{{ runner_dir }}"
55
state: directory
66
mode: 0755
7-
owner: "{{ runner_user }}"
7+
owner: "{{ ansible_facts.getent_passwd[runner_user].1 }}"
8+
group: "{{ ansible_facts.getent_passwd[runner_user].2 }}"
89

910
- name: Find the latest runner version (RUN ONCE)
1011
ansible.builtin.uri:
@@ -39,7 +40,8 @@
3940
src: "https://github.com/{{ runner_download_repository }}/releases/download/v{{ runner_version }}/\
4041
actions-runner-linux-{{ github_actions_architecture }}-{{ runner_version }}.tar.gz"
4142
dest: "{{ runner_dir }}/"
42-
owner: "{{ runner_user }}"
43+
owner: "{{ ansible_facts.getent_passwd[runner_user].1 }}"
44+
group: "{{ ansible_facts.getent_passwd[runner_user].2 }}"
4345
remote_src: yes
4446
mode: 0755
4547
become: true

0 commit comments

Comments
 (0)