Skip to content

Commit f7a0e93

Browse files
committed
fix podman containers failing with 'invalid internal status' after hard reboot
1 parent 9d1d84a commit f7a0e93

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ansible/roles/podman/tasks/config.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,19 @@
4444
with_items: "{{ podman_users }}"
4545
register: podman_user_info
4646
become: yes
47+
48+
- name: Clear up podman temporary files on startup
49+
copy:
50+
content: |
51+
# {{ ansible_managed }}
52+
# Delete ephemeral podman files to avoid issues where /tmp is not of type tmpfs and persists across reboots.
53+
# See tmpfiles.d(5) man page, note "R" specifies recursive removal and "!" marks as happening only on boot.
54+
#
55+
# Type Path Mode User Group Age Argument
56+
R! /tmp/containers-user-*
57+
R! /tmp/podman-run-*
58+
dest: /etc/tmpfiles.d/podman-local.conf
59+
owner: root
60+
group: root
61+
mode: 0660
62+
become: true

0 commit comments

Comments
 (0)