Changeset - 1b76d272e529
[Not reviewed]
5 3 5
Branko Majic (branko) - 9 years ago 2015-08-25 22:58:45
branko@majic.rs
MAR-34: Renamed the role prosody to xmpp_server. Updated all parameters for the role to be prefixed with xmpp_ instead of prosody_. Updated documentation.
8 files changed with 50 insertions and 50 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -524,10 +524,10 @@ Here is an example configuration for setting-up LDAP server:
 
      sn: Doe
 

	
 

	
 
Prosody
 
-------
 
XMPP Server
 
-----------
 

	
 
The ``prosody`` role can be used for setting-up Prosody, an XMPP server, on
 
The ``xmpp_server`` role can be used for setting-up Prosody, an XMPP server, on
 
destination machine.
 

	
 
The role implements the following:
 
@@ -557,50 +557,50 @@ Prosody is configured as follows:
 
Parameters
 
~~~~~~~~~~
 

	
 
**prosody_administrators** (list, mandatory)
 
**xmpp_administrators** (list, mandatory)
 
  List of Prosody users that should be granted administrator privileges over
 
  Prosody. Each item is a string with value equal to XMPP user ID
 
  (i.e. ``john.doe@example.com``).
 

	
 
**prosody_tls_key** (string, mandatory)
 
**xmpp_tls_key** (string, mandatory)
 
  Path to file on Ansible host that contains the private key used for TLS for
 
  XMPP service. The file will be copied to directory ``/etc/ssl/private/``.
 

	
 
**prosody_tls_certificate** (string, mandatory)
 
**xmpp_tls_certificate** (string, mandatory)
 
  Path to file on Ansible host that contains the X.509 certificate used for TLS
 
  for SMTP service. The file will be copied to directory ``/etc/ssl/certs/``.
 

	
 
**prosody_domains** (list, mandatory)
 
**xmpp_domains** (list, mandatory)
 
  List of domains that are served by this Prosody instance. Each item is a
 
  string specifying a domain.
 

	
 
**prosody_ldap_server** (string, mandatory)
 
**xmpp_ldap_server** (string, mandatory)
 
  Fully qualified domain name, hostname, or IP address of the LDAP server used
 
  for user authentication and listing.
 

	
 
**prosody_ldap_bind_dn** (string, mandatory)
 
**xmpp_ldap_bind_dn** (string, mandatory)
 
  Distinguished name of LDAP user used for authenticating to the LDAP
 
  server. This user is used for looking-up the users available on the
 
  server. Users themselves authenticate via their own account.
 

	
 
**prosody_ldap_password** (string, mandatory)
 
**xmpp_ldap_password** (string, mandatory)
 
  Password used for authenticating to the LDAP server.
 

	
 
**prosody_ldap_filter** (string, mandatory)
 
**xmpp_ldap_filter** (string, mandatory)
 
  LDAP filter used for obtaining a list of users available on the Prosody
 
  server. Two special strings can be used for specifying the user and domain,
 
  ``$user``, and ``$host`` within. These will be replaced with real values in
 
  the filter every time a user is looked-up.
 

	
 
**prosody_ldap_scope** (string, mandatory)
 
**xmpp_ldap_scope** (string, mandatory)
 
  Scope for performing the LDAP search for obtaining a list of users available
 
  on the Prosody server.
 

	
 
**prosody_ldap_tls** (boolean, mandatory)
 
**xmpp_ldap_tls** (boolean, mandatory)
 
  Specifies whether to use STARTTLS extension when connecting to the LDAP server
 
  or not.
 

	
 
**prosody_ldap_base** (string, mandatory)
 
**xmpp_ldap_base** (string, mandatory)
 
  Base DN under which the lists of users available on the Prosody should be
 
  looked-up.
 

	
 
@@ -614,23 +614,23 @@ Here is an example configuration for setting-up XMPP server using Prosody:
 

	
 
  ---
 

	
 
  prosody_administrators:
 
  xmpp_administrators:
 
    - john.doe@example.com
 
  # These are default key and certificate that generated during Prosody
 
  # installation.
 
  prosody_tls_key: /etc/prosody/certs/localhost.key
 
  prosody_tls_certificate: /etc/prosody/certs/localhost.crt
 
  prosody_domains:
 
  xmpp_tls_key: /etc/prosody/certs/localhost.key
 
  xmpp_tls_certificate: /etc/prosody/certs/localhost.crt
 
  xmpp_domains:
 
    - example.com
 
  prosody_ldap_server: ldap.example.com
 
  prosody_ldap_bind_dn: cn=xmpp,ou=services,dc=example,dc=com
 
  prosody_ldap_password: xmpp
 
  xmpp_ldap_server: ldap.example.com
 
  xmpp_ldap_bind_dn: cn=xmpp,ou=services,dc=example,dc=com
 
  xmpp_ldap_password: xmpp
 
  # This would require that the memberof overlay is available on LDAP server
 
  # side.
 
  prosody_ldap_filter: '(&(memberOf=cn=xmpp,ou=groups,dc=example,dc=com)(mail=$user@$host))'
 
  prosody_ldap_scope: "onelevel"
 
  prosody_ldap_tls: "true"
 
  prosody_ldap_base: "ou=people,dc=example,dc=com"
 
  xmpp_ldap_filter: '(&(memberOf=cn=xmpp,ou=groups,dc=example,dc=com)(mail=$user@$host))'
 
  xmpp_ldap_scope: "onelevel"
 
  xmpp_ldap_tls: "true"
 
  xmpp_ldap_base: "ou=people,dc=example,dc=com"
 

	
 

	
 
Mail Server
roles/xmpp_server/files/ferm_xmpp.conf
Show inline comments
 
file renamed from roles/prosody/files/ferm_xmpp.conf to roles/xmpp_server/files/ferm_xmpp.conf
roles/xmpp_server/files/prosody-debian-packages.gpg
Show inline comments
 
file renamed from roles/prosody/files/prosody-debian-packages.gpg to roles/xmpp_server/files/prosody-debian-packages.gpg
roles/xmpp_server/handlers/main.yml
Show inline comments
 
file renamed from roles/prosody/handlers/main.yml to roles/xmpp_server/handlers/main.yml
roles/xmpp_server/tasks/main.yml
Show inline comments
 
file renamed from roles/prosody/tasks/main.yml to roles/xmpp_server/tasks/main.yml
 
@@ -24,13 +24,13 @@
 
  user: name=prosody append=yes groups=ssl-cert
 

	
 
- name: Deploy XMPP TLS private key
 
  copy: dest="/etc/ssl/private/{{ prosody_tls_key | basename }}" src="{{ prosody_tls_key }}"
 
  copy: dest="/etc/ssl/private/{{ xmpp_tls_key | basename }}" src="{{ xmpp_tls_key }}"
 
        mode=640 owner=root group=prosody
 
  notify:
 
    - Restart Prosody
 

	
 
- name: Deploy XMPP TLS certificate
 
  copy: dest="/etc/ssl/certs/{{ prosody_tls_certificate | basename }}" src="{{ prosody_tls_certificate }}"
 
  copy: dest="/etc/ssl/certs/{{ xmpp_tls_certificate | basename }}" src="{{ xmpp_tls_certificate }}"
 
        mode=644 owner=root group=root
 
  notify:
 
    - Restart Prosody
roles/xmpp_server/templates/prosody.cfg.lua.j2
Show inline comments
 
file renamed from roles/prosody/templates/prosody.cfg.lua.j2 to roles/xmpp_server/templates/prosody.cfg.lua.j2
 
@@ -2,7 +2,7 @@
 
plugin_paths = { "/usr/local/lib/prosody/modules/" }
 

	
 
-- List of server administrators.
 
admins = { {% for admin in prosody_administrators %}"{{ admin }}", {% endfor %} }
 
admins = { {% for admin in xmpp_administrators %}"{{ admin }}", {% endfor %} }
 

	
 
-- List of modules to load on startup.
 
modules_enabled = {
 
@@ -42,8 +42,8 @@ allow_registration = false;
 
-- These are the SSL/TLS-related settings. If you don't want
 
-- to use SSL/TLS, you may comment or remove this
 
ssl = {
 
  key = "/etc/ssl/private/{{ prosody_tls_key | basename }}";
 
  certificate = "/etc/ssl/certs/{{ prosody_tls_certificate | basename }}";
 
  key = "/etc/ssl/private/{{ xmpp_tls_key | basename }}";
 
  certificate = "/etc/ssl/certs/{{ xmpp_tls_certificate | basename }}";
 
}
 

	
 
-- Ports on which to have direct TLS/SSL.
 
@@ -60,13 +60,13 @@ pidfile = "/var/run/prosody/prosody.pid"
 

	
 
-- Authentication backend.
 
authentication = "ldap"
 
ldap_server = "{{ prosody_ldap_server }}"
 
ldap_rootdn = "{{ prosody_ldap_bind_dn }}"
 
ldap_password = "{{ prosody_ldap_password }}"
 
ldap_filter = "{{ prosody_ldap_filter }}"
 
ldap_scope = "{{ prosody_ldap_scope }}"
 
ldap_tls = {{ prosody_ldap_tls }}
 
ldap_base = "{{ prosody_ldap_base }}"
 
ldap_server = "{{ xmpp_ldap_server }}"
 
ldap_rootdn = "{{ xmpp_ldap_bind_dn }}"
 
ldap_password = "{{ xmpp_ldap_password }}"
 
ldap_filter = "{{ xmpp_ldap_filter }}"
 
ldap_scope = "{{ xmpp_ldap_scope }}"
 
ldap_tls = {{ xmpp_ldap_tls }}
 
ldap_base = "{{ xmpp_ldap_base }}"
 

	
 
-- Storage backend.
 
storage = "internal"
 
@@ -80,7 +80,7 @@ log = {
 

	
 
-- Domains which should be handled by Prosody, with dedicated MUC and file
 
-- proxying components.
 
{% for domain in prosody_domains -%}
 
{% for domain in xmpp_domains -%}
 
VirtualHost "{{ domain }}"
 
Component "conference.{{ domain }}" "muc"
 
  restrict_room_creation = "local"
testsite/group_vars/xmpp.yml
Show inline comments
 
@@ -21,26 +21,26 @@ smtp_relay_host: mail.{{ testsite_domain }}
 

	
 
smtp_relay_truststore: /etc/ssl/certs/ca.pem
 

	
 
prosody_administrators:
 
xmpp_administrators:
 
  - john.doe@{{ testsite_domain }}
 

	
 
prosody_tls_key: "{{ inventory_dir }}/tls/xmpp.{{ testsite_domain }}_xmpp.key"
 
xmpp_tls_key: "{{ inventory_dir }}/tls/xmpp.{{ testsite_domain }}_xmpp.key"
 

	
 
prosody_tls_certificate: "{{ inventory_dir }}/tls/xmpp.{{ testsite_domain }}_xmpp.pem"
 
xmpp_tls_certificate: "{{ inventory_dir }}/tls/xmpp.{{ testsite_domain }}_xmpp.pem"
 

	
 
prosody_domains:
 
xmpp_domains:
 
  - "{{ testsite_domain }}"
 

	
 
prosody_ldap_server: ldap.{{ testsite_domain }}
 
xmpp_ldap_server: ldap.{{ testsite_domain }}
 

	
 
prosody_ldap_bind_dn: cn=xmpp,ou=services,{{ testsite_ldap_base }}
 
xmpp_ldap_bind_dn: cn=xmpp,ou=services,{{ testsite_ldap_base }}
 

	
 
prosody_ldap_password: xmpp
 
xmpp_ldap_password: xmpp
 

	
 
prosody_ldap_filter: '(&(memberOf=cn=xmpp,ou=groups,{{ testsite_ldap_base }})(mail=$user@$host))'
 
xmpp_ldap_filter: '(&(memberOf=cn=xmpp,ou=groups,{{ testsite_ldap_base }})(mail=$user@$host))'
 

	
 
prosody_ldap_scope: "onelevel"
 
xmpp_ldap_scope: "onelevel"
 

	
 
prosody_ldap_tls: "true"
 
xmpp_ldap_tls: "true"
 

	
 
prosody_ldap_base: "ou=people,{{ testsite_ldap_base }}"
 
xmpp_ldap_base: "ou=people,{{ testsite_ldap_base }}"
testsite/playbooks/xmpp.yml
Show inline comments
 
@@ -7,4 +7,4 @@
 
    - common
 
    - ldap_client
 
    - mail_forwarder
 
    - prosody
 
    - xmpp_server
0 comments (0 inline, 0 general)