👌 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:
parent
55204a1b21
commit
1de850826f
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue