From 70f3a398fdac299a78c39f389fa1dab91c36c55d Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Wed, 21 Feb 2024 16:14:19 +0000 Subject: [PATCH] Move podman socket activation to podman role The expectation was that the podman role would fully configure the podman service, but we needed to run the podman_sdk role for socket activation to be enabled. It also meant that you needed to run the podman_sdk role after the podman role (as it expected that podman was already installed) which is not always desirable. For instance, in kayobe, we setup the virtualenv before configuring the container engine. Closes-Bug: #2054568 Change-Id: Ic9d3cf9ad94f0cb28f9f1073ff02842a38211a54 --- ...ove-podman-socket-activation-6b94d5be242d9879.yaml | 11 +++++++++++ roles/podman/tasks/install.yml | 7 +++++++ roles/podman_sdk/tasks/main.yml | 7 ------- 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/move-podman-socket-activation-6b94d5be242d9879.yaml diff --git a/releasenotes/notes/move-podman-socket-activation-6b94d5be242d9879.yaml b/releasenotes/notes/move-podman-socket-activation-6b94d5be242d9879.yaml new file mode 100644 index 0000000..55489c1 --- /dev/null +++ b/releasenotes/notes/move-podman-socket-activation-6b94d5be242d9879.yaml @@ -0,0 +1,11 @@ +--- +upgrade: + - | + Socket activation of podman is now enabled by the ``podman`` role and + not the ``podman_sdk`` role. +fixes: + - | + Fixes an issue where the ``podman`` role did not enable socket activation + for the podman service. + See `LP#2054568 `__ + for further details. diff --git a/roles/podman/tasks/install.yml b/roles/podman/tasks/install.yml index f9c28d6..be82fc1 100644 --- a/roles/podman/tasks/install.yml +++ b/roles/podman/tasks/install.yml @@ -21,6 +21,13 @@ # If any packages were updated, and any containers were running, wait for the # daemon to come up and start all previously running containers. +- name: Start podman.socket + become: true + service: + name: podman.socket + state: started + enabled: yes + - block: - name: Wait for Podman to start command: podman info diff --git a/roles/podman_sdk/tasks/main.yml b/roles/podman_sdk/tasks/main.yml index 66ebf0d..dbd99db 100644 --- a/roles/podman_sdk/tasks/main.yml +++ b/roles/podman_sdk/tasks/main.yml @@ -61,10 +61,3 @@ become: true become_user: "{{ virtualenv is none | ternary(omit, podman_sdk_virtualenv_owner) }}" when: not (ansible_facts.distribution_release == "bookworm" and virtualenv is none) - -- name: Start podman.socket - become: true - service: - name: podman.socket - state: started - enabled: yes