diff --git a/matrix.yml b/matrix.yml index 634f063..b25fc0d 100755 --- a/matrix.yml +++ b/matrix.yml @@ -9,7 +9,6 @@ - debian-backports - nodejs - matrix-synapse - - matrix-mxisd - matrix-appservice-irc - matrix-appservice-webhooks diff --git a/roles/matrix-mxisd/handlers/main.yml b/roles/matrix-mxisd/handlers/main.yml deleted file mode 100644 index 73933ed..0000000 --- a/roles/matrix-mxisd/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# Restart mxisd when configuration changes -- name: Restart mxisd service - service: - name: mxisd - state: restarted diff --git a/roles/matrix-mxisd/tasks/main.yml b/roles/matrix-mxisd/tasks/main.yml deleted file mode 100644 index ad40117..0000000 --- a/roles/matrix-mxisd/tasks/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: Install mxisd - apt: - deb: "{{ mxisd_deb }}" - state: present - register: apt_result - retries: 3 - until: apt_result is succeeded - -- name: Configure mxisd - template: - src: mxisd/mxisd.yaml.j2 - dest: /etc/mxisd/mxisd.yaml - mode: 0600 - owner: mxisd - notify: Restart mxisd service diff --git a/roles/matrix-mxisd/templates/mxisd/mxisd.yaml.j2 b/roles/matrix-mxisd/templates/mxisd/mxisd.yaml.j2 deleted file mode 100644 index be427c1..0000000 --- a/roles/matrix-mxisd/templates/mxisd/mxisd.yaml.j2 +++ /dev/null @@ -1,89 +0,0 @@ -# {{ ansible_managed }} - -####################### -# Matrix config items # -####################### -# Matrix domain, same as 'server_name' in synapse configuration. -matrix: - domain: 'auro.re' - - -################ -# Signing keys # -################ -# Absolute path for the Identity Server signing keys database. -# /!\ THIS MUST **NOT** BE YOUR HOMESERVER KEYS FILE /!\ -# If this path does not exist, it will be auto-generated. -key: - path: '/var/lib/mxisd/keys' - - -# Path to the SQLite DB file for mxisd internal storage -# /!\ THIS MUST **NOT** BE YOUR HOMESERVER DATABASE /!\ -storage: - provider: - sqlite: - database: '/var/lib/mxisd/store.db' - - -################### -# Identity Stores # -################### -ldap: - enabled: true - connection: - host: '{{ ldap_master_ipv4 }}' - port: 389 - bindDn: '{{ ldap_matrix_bind_dn }}' - bindPassword: '{{ ldap_matrix_password }}' - baseDNs: - - '{{ ldap_user_tree }}' - attribute: - uid: - type: 'uid' - value: 'uid' - name: 'uid' - - -################################################# -# Notifications for invites/addition to profile # -################################################# -# This is mandatory to deal with anything e-mail related. -# -# For an introduction to sessions, invites and 3PIDs in general, -# see https://github.com/kamax-matrix/mxisd/blob/master/docs/threepids/session/session.md#3pid-sessions -# -# If you would like to change the content of the notifications, -# see https://github.com/kamax-matrix/mxisd/blob/master/docs/threepids/notification/template-generator.md -# -#### E-mail connector -threepid: - medium: - email: - identity: - # The e-mail to send as. - from: "matrix@auro.re" - - connectors: - smtp: - # SMTP host - host: "smtp.crans.org" - - # SMTP port - port: 587 - - # STARTLS mode for the connection. - # SSL/TLS is currently not supported. See https://github.com/kamax-matrix/mxisd/issues/125 - # - # Possible values: - # 0 Disable any kind of TLS entirely - # 1 Enable STARTLS if supported by server (default) - # 2 Force STARTLS and fail if not available - # - tls: 1 - - # Login for SMTP - login: "matrix@auro.re" - - # Password for the account - password: "" diff --git a/roles/matrix-synapse/tasks/main.yml b/roles/matrix-synapse/tasks/main.yml index 4ac864e..f5339b9 100644 --- a/roles/matrix-synapse/tasks/main.yml +++ b/roles/matrix-synapse/tasks/main.yml @@ -2,7 +2,9 @@ - name: Install matrix-synapse apt: update_cache: true - name: matrix-synapse-py3 + name: + - matrix-synapse-py3 + - matrix-synapse-ldap3 state: present default_release: stretch-backports register: apt_result @@ -24,10 +26,3 @@ - server_name.yaml - trusted_third_party_id_servers.yaml notify: Restart matrix-synapse service - -- name: Install rest auth provider - copy: - src: rest_auth_provider.py - dest: /opt/venvs/matrix-synapse/lib/python3.7/site-packages/rest_auth_provider.py - mode: 0755 - notify: Restart matrix-synapse service diff --git a/roles/matrix-synapse/templates/matrix-synapse/conf.d/password_providers.yaml.j2 b/roles/matrix-synapse/templates/matrix-synapse/conf.d/password_providers.yaml.j2 index 8281be3..4f84014 100644 --- a/roles/matrix-synapse/templates/matrix-synapse/conf.d/password_providers.yaml.j2 +++ b/roles/matrix-synapse/templates/matrix-synapse/conf.d/password_providers.yaml.j2 @@ -1,5 +1,13 @@ # {{ ansible_managed }} password_providers: - - module: "rest_auth_provider.RestAuthProvider" - config: - endpoint: "http://127.0.0.1:8090" + - module: "ldap_auth_provider.LdapAuthProvider" + config: + enabled: true + uri: "ldap://{{ ldap_master_ipv4 }}:389" + base: "{{ ldap_user_tree }}" + attributes: + uid: "uid" + mail: "mail" + name: "uid" + bind_dn: "{{ ldap_matrix_bind_dn }}" + bind_password: "{{ ldap_matrix_password }}"