Skip to content

Commit f03c5dc

Browse files
committed
builder.yml: Do not recursively chown everything
`chown`ing the podman storage directory is problematic when using rootless podman Signed-off-by: David Galloway <david.galloway@ibm.com>
1 parent cf17ce0 commit f03c5dc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ansible/examples/builder.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,14 @@
785785
become_user: "{{ jenkins_user }}"
786786
when: ansible_os_family == "Suse"
787787

788-
- name: Ensure the home dir has the right owner permissions
789-
command: "sudo chown -R {{ jenkins_user }}:{{ jenkins_user }} /home/{{ jenkins_user}}"
788+
# Do NOT try to chown the podman storage dirs. This breaks all subsequent builds.
789+
- name: Ensure the build dir has the right owner permissions
790+
become: true
791+
ansible.builtin.file:
792+
path: "/home/{{ jenkins_user }}/build"
793+
owner: "{{ jenkins_user }}"
794+
group: "{{ jenkins_user }}"
795+
recurse: true
790796
tags: chown
791797

792798
- name: Set system locale (systemd)

0 commit comments

Comments
 (0)