Files @ 298c0dbe1698
Branch filter:

Location: majic-ansible-roles/roles/prosody/tasks/main.yml

branko
MAR-4: Updated documentation for the mail server role, adding information about rsync installation, set-up of chroot for Postfix, and the smtp_allow_relay_from option. Updated mail_server role implementation, fixing rsync command for deploying the truststore to preserve truststore permissions and adding support for specifying networks from which unauthenticated relaying should be allowed.
---

- name: Install Python apt bindings
  apt: name=python-apt

- name: Add Prosody repository apt key
  apt_key:
    data: "{{ lookup('file', 'prosody-debian-packages.gpg') }}"
    state: present

- name: Add Prosody repository
  apt_repository: repo="deb http://packages.prosody.im/debian wheezy main" state=present

- name: Install Lua LDAP library
  apt: name=lua-ldap state=installed

- name: Install Prosody
  apt: name=prosody state=installed

- name: Set-up directory for storing additional Prosody modules
  file: path=/usr/local/lib/prosody/modules/ state=directory mode=755 owner=root group=root

- name: Deploy the Prosody mod_auth_ldap module
  get_url: url=https://prosody-modules.googlecode.com/hg/mod_auth_ldap/mod_auth_ldap.lua
           dest=/usr/local/lib/prosody/modules/mod_auth_ldap.lua

- name: Set-up file permissions for the Prosody mod_auth_ldap module
  file: dest=/usr/local/lib/prosody/modules/mod_auth_ldap.lua owner=root group=root mode=644

- name: Deploy Prosody configuration file
  template: src=prosody.cfg.lua.j2 dest=/etc/prosody/prosody.cfg.lua
  notify:
    - Restart Prosody

- name: Enable and start Prosody service
  service: name=prosody state=started