Skip to content

Commit 2f6306e

Browse files
committed
fix: Use become on potential cross-user actions
1 parent ed4b47a commit 2f6306e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tasks/install_runner_unix.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
mode: "0755"
77
owner: "{{ runner_user_id.stdout }}"
88
group: "{{ runner_user_group_id.stdout }}"
9+
become: true
910

1011
- name: Set runner_version variable (If latest)
1112
ansible.builtin.set_fact:
@@ -36,6 +37,7 @@
3637
group: "{{ runner_user_group_id.stdout }}"
3738
remote_src: true
3839
mode: "0755"
40+
become: true
3941
environment:
4042
PATH: /usr/local/bin:/opt/homebrew/bin/:{{ ansible_facts.user_dir }}/bin:{{ ansible_facts.env.PATH }}
4143
when: runner_version not in runner_installed.stdout or reinstall_runner
@@ -49,6 +51,7 @@
4951
mode: "0755"
5052
marker_begin: "# BEGIN ANSIBLE MANAGED BLOCK"
5153
marker_end: "# END ANSIBLE MANAGED BLOCK"
54+
become: true
5255
when: custom_env is defined
5356

5457
- name: Check if runner service name file exist

0 commit comments

Comments
 (0)