👌 pottwal: Add handler for prosody restart

The XMPP server should be restarted after the config has changed.

Suggested-by: Stefan Haun <tux@netz39.de>
This commit is contained in:
Alexander Dahl 2022-12-20 17:29:14 +01:00
parent 55204a1b21
commit 1de850826f

View file

@ -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