Skip to content

Commit

Permalink
Corrected user and group separator, added loop for variables add
Browse files Browse the repository at this point in the history
  • Loading branch information
szczepax committed Jul 24, 2023
1 parent 5cf829c commit 785c6fe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions utils/ansible/configure-self-hosted-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,18 @@
remote_src: yes

- name: "Change owner to {{ testUser }}"
shell: chown -R $(id -u {{ testUser }}).$(id -g {{ testUser }}) {{ runner_folder }}
shell: chown -R $(id -u {{ testUser }}):$(id -g {{ testUser }}) {{ runner_folder }}

# Make sure the following environment variables are present in the env
# to ensure propagation to the actions-runner environment.
# to ensure propagation to the actions-runner's environment.
- name: "Add env variables into env.sh checklist"
lineinfile:
path: "{{ runner_folder }}/env.sh"
line: " 'PKG_CONFIG_PATH'\n 'HOME'"
line: " '{{ item.line }}'"
insertafter: "^varCheckList=\\("
loop:
- line: PKG_CONFIG_PATH
- line: HOME

- name: "Add runner to GHA"
shell: |
Expand Down

0 comments on commit 785c6fe

Please sign in to comment.