No description
  • Jinja 63.3%
  • Lua 36.7%
Find a file
2026-04-16 00:15:36 -07:00
defaults add sql support 2026-04-15 22:52:50 -07:00
files use another handler, disable localhost 2026-04-15 13:19:04 -07:00
handlers expand handlers, start main.yml, fix vhost 2026-04-10 12:19:28 -07:00
meta init role 2026-04-05 20:44:32 -07:00
tasks add sql support 2026-04-15 22:52:50 -07:00
templates add storage option, show vhost examples 2026-04-16 00:09:17 -07:00
tests init role 2026-04-05 20:44:32 -07:00
vars init role 2026-04-05 20:44:32 -07:00
.gitignore add preliminary bools and templates 2026-04-09 19:44:59 -07:00
README.md extend readme 2026-04-16 00:15:36 -07:00
requirements.yml init role 2026-04-05 20:44:32 -07:00

prosody

Deploys prosody for Fedora and Enterprise Linux systems

Notes

You MUST have EPEL enabled first on EL systems. This role will not do this for you. If you are using Oracle Linux, do NOT use their so-called "EPEL".

This role uses COPR to install prosody-community-modules. Without this package, ldap2 will not work. It is also very likely you may want to extend your prosody experience. There is no harm installing this package.

Ensure you read ALL defaults in defaults/main.yml.

Supported Operating Systems

  • AlmaLinux 9+
  • Oracle Linux 9+
  • Red Hat Enterprise Linux 9+
  • Fedora Linux 43+

Required packages

  • epel-release (EL systems only)
  • lua-expat
  • lua-libs
  • lua-posix
  • lua-sec

Optional

  • lua-dbi - installed when prosody_storage is set to sql
  • lua-event
  • lua-ldap - installed when prosody_ldap_enable is true

Tags

These are the tags used on the tasks.

  • checks
  • configure
  • install
  • sql
  • ldap

Example vars configuration

The below enables two vhosts, example.com and example.net. The example.com vhost is a standard vhost with registration enabled and no extra configuration. The example.net domain is connected to an IPA domain which uses LDAP. The vcard storage ie set to LDAP and the vcard mapping is set to ensure users vcard data appears.

prosody_ldap_enable: true
prosody_tls_enable: true
prosody_ssl_key: "/etc/pki/prosody/cert.pem"
prosody_ssl_cert: "/etc/pki/prosody/cert.pem"
prosody_admins:
  - admin@example.com
prosody_vhosts:
  # example.com domain, registration module is enabled
  - example.com
    enabled: true
    authentication: "internal_hashed"
    ssl:
      key: "/etc/pki/prosody/cert.pem"
      cert: "/etc/pki/prosody/cert.pem"
      cafile: "/etc/pki/prosody/ca.pem"
    modules_enabled:
      - register

  # example.net domain, using IPA (LDAP)
  # ldap2 module is used, requiring the use of prosody-community-modules
  - example.net
    enabled: true
    authentication: "ldap2"
    ssl:
      key: "/etc/pki/prosody/cert.pem"
      cert: "/etc/pki/prosody/cert.pem"
      cafile: "/etc/pki/prosody/ca.pem"
    modules_disabled:
      - register
    storage:
      vcard = "ldap"
    ldap_config:
      ldap_server: "ipa1.example.net:389"
      bind_dn: "uid=xmpp,cn=sysaccounts,cn=etc,dc=example,dc=net"
      bind_password: "password"
      tls: true
      base_dn: "cn=users,cn=accounts,dc=example,dc=net"
      filter: "(&(objectClass=posixAccount)(memberOf=cn=xmppusers,cn=groups,cn=accounts,dc=example,dc=net))"
      usernamefield: "uid"
      namefield: "cn"
      vcard_map:
        displayname: "cn"
        nickname: "cn"
        title: "title"
        uid: "uid"
        mail: "mail"
        telephone:
          number: "telephoneNumber"
        name:
          family: "sn"
          given: "givenName"
        photo:
          type: "image/jpeg"
          binval: "jpegPhoto"