From: David Galloway Date: Mon, 22 Jun 2026 17:18:43 +0000 (-0400) Subject: builder.yml: Check for dir before running restorecon on it X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d6506dad05cd042aab02eb883d0e3977ad444104;p=ceph-build.git builder.yml: Check for dir before running restorecon on it Signed-off-by: David Galloway --- diff --git a/ansible/examples/builder.yml b/ansible/examples/builder.yml index a9c3f8602..12800f390 100644 --- a/ansible/examples/builder.yml +++ b/ansible/examples/builder.yml @@ -846,10 +846,17 @@ path: "/home/{{ jenkins_user }}/.local/share/containers/cache" state: absent + - name: Check for rootless containers directory + stat: + path: "/home/{{ jenkins_user }}/.local/share/containers" + register: containers_dir + - name: Restore SELinux labels on containers directory (if applicable) command: > restorecon -R -T0 -x /home/{{ jenkins_user }}/.local/share/containers - when: ansible_selinux.status == "enabled" + when: + - ansible_selinux.status == "enabled" + - containers_dir.stat.exists tags: - podman-reset