--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/provision/roles/prosody/handlers/main.yml Sat Mar 19 00:40:00 2016 +0800
+ service: name=prosody state=restarted
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/provision/roles/prosody/tasks/extra-modules.yml Sat Mar 19 00:40:00 2016 +0800
+- name: Fetch extra Prosody modules
+ hg: repo=https://hg.prosody.im/prosody-modules/ dest=/var/lib/prosody/extra-modules
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/provision/roles/prosody/tasks/main.yml Sat Mar 19 00:40:00 2016 +0800
+- name: Install server packages
+ apt: pkg={{ item }} state=present
+ - mercurial # for extra modules
+- include: extra-modules.yml
+- name: Generate a Diffie-Hellman key exchange parameters file
+ {% if ansible_virtualization_type == "virtualbox" %}-dsaparam{% endif %}
+ -out /etc/prosody/dh-2048.pem
+ creates: /etc/prosody/dh-2048.pem
+- name: Work around default config bug
+ file: src=../../ssl/certs/ssl-cert-snakeoil.pem dest=/etc/prosody/certs/localhost.crt state=link
+- name: Disable localhost VirtualHost
+ file: path=/etc/prosody/conf.d/localhost.cfg.lua state=absent
+ ufw: rule=allow port=xmpp-client proto=tcp
+ when: ansible_virtualization_type == "virtualbox"