From 1ee398f327b8845725a52e99cc49d6e0edc88fe3 Mon Sep 17 00:00:00 2001 From: LinuxSquare <7436714-OfficialLinuxSquare@users.noreply.gitlab.com> Date: Fri, 20 Oct 2023 16:30:44 +0200 Subject: [PATCH] Podman rootless --- applications/podman.sls | 37 +++++++++++++++++++++++++++++++++++++ system/base.sls | 1 + 2 files changed, 38 insertions(+) diff --git a/applications/podman.sls b/applications/podman.sls index 12e705e..1e24499 100644 --- a/applications/podman.sls +++ b/applications/podman.sls @@ -9,3 +9,40 @@ applications_podman_enable: - name: podman - require: - applications_podman_pkgs + +applications_podman_rootless_cgroups: + service.enabled: + - name: cgroups + +applications_podman_user: + user.present: + - name: puser + - uid: 2000 + - gid: 2000 + - shell: /bin/zsh + - home: /home/puser + - usergroup: True + - createhome: True + - require: + - applications_podman_pkgs + +applications_podman_rootless_modules: + file.append: + - name: /etc/modules + - text: + - tun + - fuse + +applications_podman_rootless_subgid: + file.append: + - name: /etc/subgid + - text: puser:200000:65536 + - require: + - applications_podman_user + +applications_podman_rootless_subuid: + file.append: + - name: /etc/subuid + - text: puser:200000:65536 + - require: + - applications_podman_user diff --git a/system/base.sls b/system/base.sls index c4e1dae..5782e0f 100644 --- a/system/base.sls +++ b/system/base.sls @@ -8,6 +8,7 @@ system_base_pkgs: - vim - git - findmnt + - util-linux system_base_bin_dir: file.directory: