No Description
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.5KB

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