Added Podman
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
- name: Install Podman and related packages
|
||||
become: true
|
||||
ansible.builtin.pacman:
|
||||
name:
|
||||
- podman
|
||||
- podman-compose
|
||||
- slirp4netns # rootless mode networking (without slirp4netns, rootless containers have no network access)
|
||||
- fuse-overlayfs # overlay storage driver for rootless mode (without it, rootless Podman uses a slower/less efficient driver)
|
||||
state: present
|
||||
|
||||
- name: Ensure the user has subuid/subgid configured
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- usermod
|
||||
- --add-subuids
|
||||
- 100000-165535
|
||||
- --add-subgids
|
||||
- 100000-165535
|
||||
- "{{ lookup('env', 'USER') }}"
|
||||
when: lookup('env', 'USER') != "root"
|
||||
changed_when: false
|
||||
|
||||
- name: Enable the podman.socket service for the user (Docker-compatible API)
|
||||
ansible.builtin.systemd:
|
||||
name: podman.socket
|
||||
scope: user
|
||||
enabled: true
|
||||
state: started
|
||||
become: false
|
||||
Reference in New Issue
Block a user