暫無描述
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

1234567891011121314151617181920212223242526272829303132333435363738394041
  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: pkg={{ item }} update_cache=yes
  11. with_items:
  12. - prosody
  13. - lua-sec
  14. tags:
  15. - dependencies
  16. - name: Add prosody user to ssl-cert group
  17. user: name=prosody group=ssl-cert
  18. - name: Add cert postrenew task
  19. copy: src=etc_letsencrypt_postrenew_prosody.sh dest=/etc/letsencrypt/postrenew/prosody.sh mode=0755
  20. - name: Create Prosody data directory
  21. file: state=directory path=/data/prosody owner=prosody group=prosody
  22. - name: Configure Prosody
  23. template: src=prosody.cfg.lua.j2 dest=/etc/prosody/prosody.cfg.lua group=prosody owner=prosody
  24. notify: restart prosody
  25. - name: Create Prosody accounts
  26. command: prosodyctl register {{ item.name }} {{ prosody_virtual_domain }} "{{ item.password }}"
  27. with_items: "{{ prosody_accounts }}"
  28. - name: Set firewall rules for Prosody
  29. ufw: rule=allow port={{ item }} proto=tcp
  30. with_items:
  31. - 5222 # xmpp c2s
  32. - 5269 # xmpp s2s
  33. tags: ufw