roles(system/podman): create podman configuration

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2023-08-29 11:13:58 +02:00
parent 23d24dc342
commit b4a1a63982
Signed by: mfocko
GPG key ID: 7C47D46246790496
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,9 @@
---
- name: Install Podman and dependencies
ansible.builtin.package:
name:
- podman
- crun
- podman-compose
- distrobox
state: present

View file

@ -0,0 +1,19 @@
---
- name: Packages
ansible.builtin.include_tasks: install.yml
tags: install
# UIDs/GIDs for rootless containers
- name: Set multiple gids for target user
ansible.builtin.lineinfile:
path: "/etc/subgid"
regexp: "^{{ target_user }}:"
line: "{{ target_user }}:100000:65536"
tags: podman/rootless
- name: Set multiple uids for target user
ansible.builtin.lineinfile:
path: "/etc/subuid"
regexp: "^{{ target_user }}:"
line: "{{ target_user }}:100000:65536"
tags: podman/rootless