Skip to content

Commit 135ce70

Browse files
committed
fix(tmachine): preserve packaged Podman tmpfiles rules
Signed-off-by: Evan Lezar <[email protected]>
1 parent 3a950a9 commit 135ce70

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎tests/ansible/playbooks/podman-rootful.yaml‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,19 @@
2222
- /etc/subgid
2323

2424
# Allow fixture clients to use the rootful API without elevating the test runner.
25+
- name: Read the packaged Podman tmpfiles rules
26+
become: true
27+
ansible.builtin.slurp:
28+
src: /usr/lib/tmpfiles.d/podman.conf
29+
register: podman_rootful_tmpfiles
30+
2531
- name: Persist rootful Podman runtime directory access across guest boots
2632
become: true
2733
ansible.builtin.copy:
2834
dest: /etc/tmpfiles.d/podman.conf
29-
content: |
30-
d /run/podman 0710 root tmachine -
35+
content: >-
36+
{{ (podman_rootful_tmpfiles.content | b64decode)
37+
| regex_replace('(?m)^D! /run/podman 0700 root root$', 'D! /run/podman 0710 root tmachine') }}
3138
mode: "0644"
3239

3340
- name: Allow the tmachine group to traverse the rootful Podman runtime directory

0 commit comments

Comments
 (0)