diff --git a/roles/docker-ldap/TODO.md b/roles/docker-ldap/TODO.md index 6bf44d8e..aa52e29d 100644 --- a/roles/docker-ldap/TODO.md +++ b/roles/docker-ldap/TODO.md @@ -1,4 +1,4 @@ # Todos -- Implement auto password hash - Implement auto memberof setup -- Create a Dockerfile (may in an own repository) with memberOf \ No newline at end of file +- Create a Dockerfile (may in an own repository) with memberOf +- Find a better decoupling solution for nextcloud \ No newline at end of file diff --git a/roles/docker-ldap/tasks/main.yml b/roles/docker-ldap/tasks/main.yml index 4010ad40..731662e7 100644 --- a/roles/docker-ldap/tasks/main.yml +++ b/roles/docker-ldap/tasks/main.yml @@ -37,7 +37,6 @@ include_tasks: create_ldif_files.yml loop: - configuration - - schema loop_control: loop_var: folder @@ -50,6 +49,37 @@ - python-ldap state: present +- name: Create Nextcloud Schema + ldap_entry: + dn: "cn=nextcloud,cn=schema,cn=config" + objectClass: + - top + - olcSchemaConfig + attributes: + cn: nextcloud + olcAttributeTypes: + - >- + ( 1.3.6.1.4.1.99999.1 + NAME 'nextcloudQuota' + DESC 'Quota for Nextcloud' + EQUALITY integerMatch + ORDERING integerOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE + ) + olcObjectClasses: + - >- + ( 1.3.6.1.4.1.99999.2 + NAME 'nextcloudUser' + DESC 'Auxiliary class for Nextcloud attributes' + AUXILIARY + MAY ( nextcloudQuota ) + ) + server_uri: "ldap://127.0.0.1:{{ ports.localhost.ldap.ldap }}" + bind_dn: "cn={{ applications.ldap.users.administrator.username }},cn=config" + bind_pw: "{{ applications.ldap.administrator_password }}" + state: present + ############################################################################### # 1) Create the LDAP entry if it does not yet exist ############################################################################### diff --git a/roles/docker-ldap/templates/ldif/schema/01_nextcloud.schema.ldif.j2 b/roles/docker-ldap/templates/ldif/schema/01_nextcloud.schema.ldif.j2 deleted file mode 100644 index ba3eac99..00000000 --- a/roles/docker-ldap/templates/ldif/schema/01_nextcloud.schema.ldif.j2 +++ /dev/null @@ -1,19 +0,0 @@ -# nextcloud.schema - -dn: cn=nextcloud,cn=schema,cn=config -objectClass: olcSchemaConfig -cn: nextcloud -olcAttributeTypes: ( 1.3.6.1.4.1.99999.1 - NAME 'nextcloudQuota' - DESC 'Quota for Nextcloud' - EQUALITY integerMatch - ORDERING integerOrderingMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 - SINGLE-VALUE -) -olcObjectClasses: ( 1.3.6.1.4.1.99999.2 - NAME 'nextcloudUser' - DESC 'Auxiliary class for Nextcloud attributes' - AUXILIARY - MAY ( nextcloudQuota ) -) diff --git a/roles/docker-ldap/templates/ldif/schema/README.md b/roles/docker-ldap/templates/ldif/schema/README.md deleted file mode 100644 index 619f3207..00000000 --- a/roles/docker-ldap/templates/ldif/schema/README.md +++ /dev/null @@ -1 +0,0 @@ -This folder contains schemas for the different applications to import \ No newline at end of file