Ansible/vaultwarden restart after upgrade

From: Erwan David <erwan_at_rail.eu.org>
Date: Tue, 19 Sep 2023 17:52:13 UTC
I have a some complicated problem.

I upgrade packages through an ansible playbook which restarts the needed 
service after upgrade.

it works, except for vaultwarden (from the ports), the task to restart is :

- name: restart
  ansible.builtin.service:
    name: "{{ item }}"
    state: restarted
  loop: "{{ services_to_restart | unique }}"

and it is run in a jail through the jail connector of ansible

When the service to restart is vaultwarden it hangs. When I kill the 
process I get error :

failed: [vaultwarden] (item=vaultwarden) => {"ansible_loop_var": "item", "changed": false, "item": "vaultwarden", "module_stderr": "Terminated\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 143}

which seems logical after a kill.

This is freebsd specific, and ansible specific so I do not know where to ask.

service vaultwarden restart works in the jail as well as service -j vaultwarden vaultwarden restart on the host (yes jail is caled vaultwarden)