alvistack / ansible-role-podman

Ansible Role for Podman Installation
Apache License 2.0
62 stars 6 forks source link

Give the user the ability to choose if podman service should be enabled+restarted #20

Closed dmotte closed 1 year ago

dmotte commented 1 year ago

Hi, first of all I want to thank you for this role! It's very useful :)

Your role enables and starts the podman.service systemd unit at the end, but in my setup I'm using Podman only as an unprivileged user and I don't want the Podman socket running in the background as root.

A possible solution to this problem is to implement a enable_and_start_podman_service variable in the Ansible role to let the user choose. I'm going to make a pull request for you. Let me know what you think :wink:

hswong3i commented 1 year ago

Nice for suggestion but I had additional concern:

  1. My podman related packaging and Ansible Roles are not fully tested with unprivileged user, yet
  2. Sometime unprivileged user mode couldn't working as expected, see https://github.com/alvistack/ansible-role-podman/issues/9
  3. As a fail-safe and fallback, I mainly use privileged mode with sudo for my daily operation, see https://github.com/alvistack/docker-ubuntu/blob/master/molecule/ubuntu-22.04-docker/molecule.yml#L17-L23
  4. This Ansible Role share AS MUCH AS possible homogeneous coding style and logic with else my ~120 Ansible Roles; this systemd service enable + start logic is designed with KISS, ensure functioning in most cases if possible (i.e. without additional configuration, both functioning for privileged or unprivileged mode)

Usually it looks like sexy for an additional configuration parameter; BTW, unless around 20~50% use case need this ability for switching, else I will not add a new parameters that I am not going to use daily, for myself and both my paid clients.

dmotte commented 1 year ago

Ok no problem, I understand. Thanks for your time and for the detailed explanation :)