123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- - name: Ensure repository key for Prosody is in place
- apt_key: url=https://prosody.im/files/prosody-debian-packages.key state=present
- tags:
- - dependencies
-
- # Prosody supplies repo for sid, squeeze, wheezy, jessie, trusty, saucy, raring, quantal, precise and lucid
- - name: Add Prosody Debian/Ubuntu repository
- apt_repository: repo="deb http://packages.prosody.im/debian {{ ansible_distribution_release }} main"
- tags:
- - dependencies
-
- - name: Install Prosody from official repository
- apt: pkg=prosody update_cache=yes
- tags:
- - dependencies
-
- - name: Install lua-sec-prosody on Debian Wheezy and Ubuntu Precise
- apt: pkg=lua-sec-prosody update_cache=yes
- when: ansible_distribution_release == 'wheezy' or ansible_distribution_release == 'precise'
- tags:
- - dependencies
-
-
- - name: Install lua-sec 0.5+
- apt: pkg=lua-sec update_cache=yes
- when: ansible_distribution_release == 'trusty' or ansible_distribution_release == 'jessie'
- tags:
- - dependencies
-
- - name: Add prosody user to ssl-cert group
- user: name=prosody groups=ssl-cert append=yes
-
- - name: Create Prosody data directory
- file: state=directory path=/decrypted/prosody owner=prosody group=prosody
-
- - name: Configure Prosody
- template: src=prosody.cfg.lua.j2 dest=/etc/prosody/prosody.cfg.lua group=root owner=root
- notify: restart prosody
-
- - name: Create Prosody accounts
- command: prosodyctl register {{ item.name }} {{ prosody_virtual_domain }} "{{ item.password }}"
- with_items: prosody_accounts
-
- - name: Set firewall rules for Prosody
- ufw: rule=allow port={{ item }} proto=tcp
- with_items:
- - 5222 # xmpp c2s
- - 5269 # xmpp s2s
|