From 1de850826f7dcf02e7318289338324c73ac337ad Mon Sep 17 00:00:00 2001 From: Alexander Dahl Date: Tue, 20 Dec 2022 17:29:14 +0100 Subject: [PATCH] :ok_hand: pottwal: Add handler for prosody restart The XMPP server should be restarted after the config has changed. Suggested-by: Stefan Haun --- host-pottwal.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/host-pottwal.yml b/host-pottwal.yml index cb91aa0..8803cff 100644 --- a/host-pottwal.yml +++ b/host-pottwal.yml @@ -130,18 +130,24 @@ src: "templates/prosody/prosody.cfg.lua.j2" dest: "{{ prosody_data_dir }}/etc/prosody/prosody.cfg.lua" mode: 0644 + notify: + - Restart prosody - name: "Ensure prosody config file is in place: {{ prosody_domain_name }}" ansible.builtin.copy: src: "files/prosody/{{ prosody_domain_name }}.cfg.lua" dest: "{{ prosody_data_dir }}/etc/prosody/conf.avail/{{ prosody_domain_name }}.cfg.lua" mode: 0644 + notify: + - Restart prosody - name: "Ensure prosody config symlink exists: {{ prosody_domain_name }}" ansible.builtin.file: src: "../conf.avail/{{ prosody_domain_name }}.cfg.lua" dest: "{{ prosody_data_dir }}/etc/prosody/conf.d/{{ prosody_domain_name }}.cfg.lua" state: link + notify: + - Restart prosody - name: Ensure container for prosody XMPP server is running docker_container: @@ -442,3 +448,8 @@ proxy_preserve_host: "On" handlers: + - name: Restart prosody + community.docker.docker_container: + name: prosody + state: started + restart: yes