roles(system/podman): create podman configuration
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
23d24dc342
commit
b4a1a63982
2 changed files with 28 additions and 0 deletions
9
roles/system/podman/tasks/install.yml
Normal file
9
roles/system/podman/tasks/install.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- name: Install Podman and dependencies
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- podman
|
||||
- crun
|
||||
- podman-compose
|
||||
- distrobox
|
||||
state: present
|
19
roles/system/podman/tasks/main.yml
Normal file
19
roles/system/podman/tasks/main.yml
Normal 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
|
Loading…
Reference in a new issue