Added Podman
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
{{- $editor := promptBoolOnce . "features.editor" "Do you want to install Neovim" true }}
|
{{- $editor := promptBoolOnce . "features.editor" "Do you want to install Neovim" true }}
|
||||||
{{- $nix := promptBoolOnce . "features.nix" "Do you want to install the Nix package manager" true }}
|
{{- $nix := promptBoolOnce . "features.nix" "Do you want to install the Nix package manager" true }}
|
||||||
{{- $terminal := promptBoolOnce . "features.terminal" "Do you want to install Wezterm" true }}
|
{{- $terminal := promptBoolOnce . "features.terminal" "Do you want to install Wezterm" true }}
|
||||||
|
{{- $podman := promptBoolOnce . "features.podman" "Do you want to install Podman" true }}
|
||||||
|
|
||||||
{{- $paru := false -}}
|
{{- $paru := false -}}
|
||||||
{{ if eq .chezmoi.osRelease.id "arch" -}}
|
{{ if eq .chezmoi.osRelease.id "arch" -}}
|
||||||
@@ -23,3 +24,4 @@ editor = {{ $editor }}
|
|||||||
nix = {{ $nix }}
|
nix = {{ $nix }}
|
||||||
paru = {{ $paru }}
|
paru = {{ $paru }}
|
||||||
terminal = {{ $terminal }}
|
terminal = {{ $terminal }}
|
||||||
|
podman = {{ $podman }}
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[engine]
|
||||||
|
compose_warning_logs = false
|
||||||
@@ -35,3 +35,5 @@
|
|||||||
when: chezmoi.osRelease.id == "arch" and features.paru == true
|
when: chezmoi.osRelease.id == "arch" and features.paru == true
|
||||||
- role: terminal
|
- role: terminal
|
||||||
when: chezmoi.osRelease.id == "arch" and features.terminal == true
|
when: chezmoi.osRelease.id == "arch" and features.terminal == true
|
||||||
|
- role: podman
|
||||||
|
when: chezmoi.osRelease.id == "arch" and features.podman == true
|
||||||
|
|||||||
@@ -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