Re: Ansible/vaultwarden restart after upgrade

From: Paul Procacci <pprocacci_at_gmail.com>
Date: Tue, 19 Sep 2023 22:59:27 UTC
On Tue, Sep 19, 2023 at 6:40 PM Erwan David <erwan@rail.eu.org> wrote:

> 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)
>
>
>
>
>
This problem may or may not depend on ansible.builtin.service.
You need to 1) add debugging to ansible via '-vvv' and then attempt to
duplicate this via the command line circumventing ansible to really see
where the problem lies.

Without the above it's all guesses.

Thanks,
Paul Procacci
-- 
__________________

:(){ :|:& };: