Update to 2024-07-22 10:00

This commit is contained in:
Daniel Berteaud
2024-07-22 10:00:12 +02:00
parent 457d41ccf9
commit f5421b17f0
10 changed files with 770 additions and 86 deletions

View File

@@ -1,18 +1,22 @@
---
- name: Install prosody
yum:
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 modules
- 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
@@ -20,11 +24,14 @@
notify: restart prosody
tags: prosody
- name: Install Participan Metadata module
- name: Install additional modules
copy:
src: mod_participant_metadata.lua
src: "{{ item }}"
dest: /opt/prosody/modules/
notify: restart prosody
loop:
- mod_participant_metadata.lua
- token
tags: prosody
- name: Remove useless unit override

View File

@@ -9,6 +9,10 @@
- include_tasks: facts.yml
tags: always
- include_tasks: selinux.yml
when: ansible_selinux.status == 'enabled'
tags: always
- include_tasks: conf.yml
tags: always

View File

@@ -0,0 +1,28 @@
---
- name: Set correct SELinux context
sefcontext:
target: "/opt/prosody(/.*)?"
setype: lib_t
seuser: system_u
state: present
tags: prosody
- name: Restore SELinux context
command: restorecon -R /opt/prosody/modules
changed_when: false
tags: prosody
- name: Copy SELinux policy
copy: src=prosody-ansible.te dest=/etc/selinux/targeted/local/
register: prosody_selinux_policy
tags: prosody
- name: Compile and load SELinux policy
shell: |
cd /etc/selinux/targeted/local/
checkmodule -M -m -o prosody-ansible.mod prosody-ansible.te
semodule_package -o prosody-ansible.pp -m prosody-ansible.mod
semodule -i /etc/selinux/targeted/local/prosody-ansible.pp
when: prosody_selinux_policy.changed
tags: prosody