From 785c6fe5d515f0d9f6a8ec183337e8fdd8e62da6 Mon Sep 17 00:00:00 2001 From: ArkadiuszX Szczepanek Date: Mon, 24 Jul 2023 09:17:59 +0200 Subject: [PATCH] Corrected user and group separator, added loop for variables add --- utils/ansible/configure-self-hosted-runner.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utils/ansible/configure-self-hosted-runner.yml b/utils/ansible/configure-self-hosted-runner.yml index 986b4a24b59..8365e6b0626 100644 --- a/utils/ansible/configure-self-hosted-runner.yml +++ b/utils/ansible/configure-self-hosted-runner.yml @@ -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: |