2024-07-22 10:00:12 +02:00

54 lines
1.3 KiB
YAML

---
- name: Install prosody
package:
name:
- prosody
- lua-ldap
- lua-cyrussasl
- lua-cjson
- lua-basexx
- lua-luaossl
- libjwt
tags: prosody
- name: Create systemd unit snippet dir
file: path=/etc/systemd/system/prosody.service.d state=directory
tags: prosody
- name: Install remote modules
get_url:
url: "{{ item.url | default('https://raw.githubusercontent.com/prosody-modules/' ~ item.name ~ '/master/' ~ item.name ~ '.lua') }}"
dest: /opt/prosody/modules/{{ item.name }}.lua
loop: "{{ prosody_modules }}"
notify: restart prosody
tags: prosody
- name: Install additional modules
copy:
src: "{{ item }}"
dest: /opt/prosody/modules/
notify: restart prosody
loop:
- mod_participant_metadata.lua
- token
tags: prosody
- name: Remove useless unit override
file: path=/etc/systemd/system/prosody.service.d/99-ansible.conf state=absent
register: prosody_unit
notify: restart prosody
tags: prosody
- name: Reload systemd
systemd: daemon_reload=True
when: prosody_unit.changed
tags: prosody
- name: Allow prosody to query LDAP servers
seboolean: name={{ item }} state=True persistent=True
loop:
- authlogin_nsswitch_use_ldap
when: ansible_selinux.status == 'enabled'
tags: prosody