You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
---
|
|
|
|
- name: Install prosody
|
|
yum:
|
|
name:
|
|
- prosody
|
|
- lua-ldap
|
|
- lua-cyrussasl
|
|
tags: prosody
|
|
|
|
- name: Create systemd unit snippet dir
|
|
file: path=/etc/systemd/system/prosody.service.d state=directory
|
|
tags: prosody
|
|
|
|
- name: Install 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: Customize prosody service unit
|
|
copy:
|
|
content: |
|
|
[Service]
|
|
Type=simple
|
|
User=prosody
|
|
Group=prosody
|
|
dest: /etc/systemd/system/prosody.service.d/99-ansible.conf
|
|
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
|
|
|