fix: install podman root
This commit is contained in:
parent
3da794db8c
commit
2c6f09aaa2
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
podman_version_check: true
|
podman_version_check: true
|
||||||
|
podman_rootless: false
|
||||||
podman_version: "v4.6.2"
|
podman_version: "v4.6.2"
|
||||||
podman_netavark_version: "v1.7.0"
|
podman_netavark_version: "v1.7.0"
|
||||||
podman_conmon_version: "v2.1.7"
|
podman_conmon_version: "v2.1.7"
|
||||||
|
@ -62,3 +62,8 @@
|
|||||||
dest: /etc/profile.d/podman.sh
|
dest: /etc/profile.d/podman.sh
|
||||||
content: 'PATH=$PATH:/usr/libexec/podman'
|
content: 'PATH=$PATH:/usr/libexec/podman'
|
||||||
|
|
||||||
|
- name: Set Sysctl Permanent
|
||||||
|
shell: sysctl kernel.unprivileged_userns_clone=1
|
||||||
|
|
||||||
|
- name: Set Sysctl Permanent
|
||||||
|
shell: echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/userns.conf
|
||||||
|
@ -2,22 +2,19 @@
|
|||||||
- name: Gather variables for each operating system
|
- name: Gather variables for each operating system
|
||||||
include_vars: "{{ ansible_distribution | lower }}.yml"
|
include_vars: "{{ ansible_distribution | lower }}.yml"
|
||||||
|
|
||||||
|
- name: Set values for root or rootless running
|
||||||
|
set_fact:
|
||||||
|
become: "{{ podman_rootless }}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: "Get Podman version"
|
- name: "Get Podman version"
|
||||||
become: yes
|
ansible.builtin.shell: "echo v$(podman --version | cut -d' ' -f 3)"
|
||||||
become_user: podman_rootless
|
|
||||||
ansible.builtin.shell: "XDG_RUNTIME_DIR=/run/user/2534 echo v$(podman --version | cut -d' ' -f 3)"
|
|
||||||
register: podman_active_version
|
register: podman_active_version
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: podman_version_check|bool
|
when: podman_version_check|bool
|
||||||
|
|
||||||
- name: "test"
|
|
||||||
debug:
|
|
||||||
msg: "{{ podman_active_version }}"
|
|
||||||
|
|
||||||
- include_tasks: setup_user.yml
|
|
||||||
when: (not podman_version_check|bool) or podman_active_version.stdout is not defined or podman_active_version.stdout != podman_version
|
|
||||||
|
|
||||||
- include_tasks: install.yml
|
- include_tasks: install.yml
|
||||||
when: (not podman_version_check|bool) or podman_active_version.stdout is not defined or podman_active_version.stdout != podman_version
|
when: (not podman_version_check|bool) or podman_active_version.stdout is not defined or podman_active_version.stdout != podman_version
|
||||||
|
@ -2,18 +2,10 @@
|
|||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
||||||
- name: Exec lingur
|
|
||||||
shell: loginctl enable-linger 2534
|
|
||||||
|
|
||||||
- name: Setup podman.socket
|
- name: Setup podman.socket
|
||||||
become: yes
|
|
||||||
become_user: podman_rootless
|
|
||||||
systemd_service:
|
systemd_service:
|
||||||
enabled: true
|
enabled: true
|
||||||
name: podman.socket
|
name: podman.socket
|
||||||
state: started
|
state: started
|
||||||
scope: "user"
|
|
||||||
environment:
|
|
||||||
XDG_RUNTIME_DIR: /run/user/2534
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
[storage]
|
[storage]
|
||||||
driver = "overlay"
|
driver = "overlay"
|
||||||
|
runroot = "/var/run/containers/storage"
|
||||||
|
graphroot = "/var/run/containers/graphroot"
|
||||||
|
|
||||||
[storage.options.overlay]
|
[storage.options.overlay]
|
||||||
mount_program = "/usr/bin/fuse-overlayfs"
|
mount_program = "/usr/bin/fuse-overlayfs"
|
||||||
|
Loading…
Reference in New Issue
Block a user