Nessuna descrizione
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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. # Prosody supplies repo for sid, squeeze, wheezy, jessie, trusty, saucy, raring, quantal, precise and lucid
  6. - name: Add Prosody Debian/Ubuntu repository
  7. apt_repository: repo="deb http://packages.prosody.im/debian {{ ansible_distribution_release }} main"
  8. tags:
  9. - dependencies
  10. - name: Install Prosody from official repository
  11. apt: pkg=prosody update_cache=yes
  12. tags:
  13. - dependencies
  14. - name: Install lua-sec-prosody on Debian Wheezy and Ubuntu Precise
  15. apt: pkg=lua-sec-prosody update_cache=yes
  16. when: ansible_distribution_release == 'wheezy' or ansible_distribution_release == 'precise'
  17. tags:
  18. - dependencies
  19. - name: Install lua-sec 0.5+
  20. apt: pkg=lua-sec update_cache=yes
  21. when: ansible_distribution_release == 'trusty' or ansible_distribution_release == 'jessie'
  22. tags:
  23. - dependencies
  24. - name: Add prosody user to ssl-cert group
  25. user: name=prosody groups=ssl-cert append=yes
  26. - name: Create Prosody data directory
  27. file: state=directory path=/decrypted/prosody owner=prosody group=prosody
  28. - name: Configure Prosody
  29. template: src=prosody.cfg.lua.j2 dest=/etc/prosody/prosody.cfg.lua group=root owner=root
  30. notify: restart prosody
  31. - name: Create Prosody accounts
  32. command: prosodyctl register {{ item.name }} {{ prosody_virtual_domain }} "{{ item.password }}"
  33. with_items: prosody_accounts
  34. - name: Set firewall rules for Prosody
  35. ufw: rule=allow port={{ item }} proto=tcp
  36. with_items:
  37. - 5222 # xmpp c2s
  38. - 5269 # xmpp s2s