Geen omschrijving
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.

prosody.yml 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. - name: Ensure repository key for Prosody is in place
  2. apt_key: url=https://prosody.im/files/prosody-debian-packages.key state=present
  3. tags:
  4. - dependencies
  5. - name: Add Prosody repository
  6. apt_repository: repo="deb http://packages.prosody.im/debian {{ ansible_distribution_release }} main"
  7. tags:
  8. - dependencies
  9. - name: Install Prosody and dependencies from official repository
  10. apt:
  11. name: "{{ packages }}"
  12. state: present
  13. update_cache: yes
  14. vars:
  15. packages:
  16. - prosody
  17. - lua-sec
  18. tags:
  19. - dependencies
  20. - name: Add prosody user to ssl-cert group
  21. user: name=prosody group=ssl-cert
  22. - name: Add cert postrenew task
  23. copy: src=etc_letsencrypt_postrenew_prosody.sh dest=/etc/letsencrypt/postrenew/prosody.sh mode=0755
  24. - name: Create Prosody data directory
  25. file: state=directory path=/data/prosody owner=prosody group=prosody
  26. - name: Configure Prosody
  27. template: src=prosody.cfg.lua.j2 dest=/etc/prosody/prosody.cfg.lua group=prosody owner=root mode=0644
  28. notify: restart prosody
  29. - name: Create Prosody accounts
  30. command: prosodyctl register {{ item.name }} {{ item.domain }} "{{ item.password }}"
  31. with_items: "{{ prosody_accounts }}"
  32. - name: Set firewall rules for Prosody
  33. ufw: rule=allow port={{ item }} proto=tcp
  34. with_items:
  35. - 5222 # xmpp c2s
  36. - 5269 # xmpp s2s
  37. tags: ufw