From 34b3d3a5cc57d84f96c5a4198529a7d2d7a9f7f1 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: May 26 2022 22:05:00 +0000 Subject: openqa/worker: handle git 'safety' check for test dir Signed-off-by: Adam Williamson --- diff --git a/roles/openqa/worker/tasks/main.yml b/roles/openqa/worker/tasks/main.yml index 2bbd6b4..20eb04c 100644 --- a/roles/openqa/worker/tasks/main.yml +++ b/roles/openqa/worker/tasks/main.yml @@ -170,6 +170,12 @@ - include_tasks: tap-setup.yml when: openqa_tap|bool +- name: Tell git it's OK for _openqa-worker to run 'git' on the test dir + command: git config --global --add safe.directory /var/lib/openqa/share/tests/fedora + become: yes + become_user: _openqa-worker + when: openqa_nfs_worker|bool + # this is kinda lazy - we could have a separate openqa_swtpm var so we # we could potentially separate tap worker hosts from swtpm ones - but # it makes workers.ini templating annoyingly awkward (we need way more