--- - name: Ensure synapse is restarted listen: synapse-restart community.docker.docker_container: name: "{{ synapse_container_name }}" state: started restart: true when: synapse_deployment_method == 'docker' - name: Ensure synapse is restarted listen: synapse-restart containers.podman.podman_container: name: "{{ synapse_container_name }}" state: "{{ synapse_container_state }}" force_restart: true when: synapse_deployment_method == 'podman' - name: Ensure synapse is restarted listen: synapse-restart ansible.builtin.systemd_service: name: "{{ synapse_systemd_service_name }}" state: restarted when: - synapse_deployment_method == 'virtualenv' - ansible_facts['service_mgr'] == systemd - synapse_systemd_state == 'started' - name: Ensure systemd units are reloaded listen: systemd-daemon-reload ansible.builtin.systemd: daemon_reload: true