1234567891011121314151617181920212223242526272829 |
- - name: Ensure repository key for Prosody is in place
- apt_key: url=https://prosody.im/files/prosody-debian-packages.key state=present
-
- # 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"
-
- - name: Install Prosody from official repository
- apt: pkg=prosody update_cache=yes
-
- - 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
|