mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-11-03 19:58:14 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			28e25f0232
			...
			d1d19830b0
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| d1d19830b0 | |||
| 61ad100ef1 | 
@@ -234,7 +234,7 @@ defaults_applications:
 | 
				
			|||||||
    network:
 | 
					    network:
 | 
				
			||||||
      local:                        True                                        # Activates local network to allow other docker containers to connect
 | 
					      local:                        True                                        # Activates local network to allow other docker containers to connect
 | 
				
			||||||
      public:                       False                                       # Set to true in inventory file if you want to expose the LDAP port to the internet
 | 
					      public:                       False                                       # Set to true in inventory file if you want to expose the LDAP port to the internet
 | 
				
			||||||
    hostname:                       "openldap"                                  # Hostname of the LDAP Server in the central_ldap network
 | 
					    hostname:                       "ldap"                                      # Hostname of the LDAP Server in the central_ldap network
 | 
				
			||||||
    webinterface:                   "lam"                                       # The webinterface which should be used. Possible: lam and phpldapadmin
 | 
					    webinterface:                   "lam"                                       # The webinterface which should be used. Possible: lam and phpldapadmin
 | 
				
			||||||
    users:  
 | 
					    users:  
 | 
				
			||||||
      administrator:
 | 
					      administrator:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@ defaults_oidc:
 | 
				
			|||||||
    logout_url:           "{{_oidc_client_issuer_url}}/protocol/openid-connect/logout"      # Endpoint to log out the user
 | 
					    logout_url:           "{{_oidc_client_issuer_url}}/protocol/openid-connect/logout"      # Endpoint to log out the user
 | 
				
			||||||
    change_credentials:   "{{_oidc_client_issuer_url}}account/account-security/signing-in"  # URL for managing or changing user credentials
 | 
					    change_credentials:   "{{_oidc_client_issuer_url}}account/account-security/signing-in"  # URL for managing or changing user credentials
 | 
				
			||||||
    certs:                "{{_oidc_client_issuer_url}}/protocol/openid-connect/certs"       # JSON Web Key Set (JWKS)
 | 
					    certs:                "{{_oidc_client_issuer_url}}/protocol/openid-connect/certs"       # JSON Web Key Set (JWKS)
 | 
				
			||||||
  button_text:            "SSO Login({{primary_domain | upper}})"                           # Default button text
 | 
					  button_text:            "SSO Login ({{primary_domain | upper}})"                           # Default button text
 | 
				
			||||||
  attributes:
 | 
					  attributes:
 | 
				
			||||||
    # Attribut to identify the user
 | 
					    # Attribut to identify the user
 | 
				
			||||||
    username:             "preferred_username"
 | 
					    username:             "preferred_username"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,6 +38,7 @@
 | 
				
			|||||||
    src:    "{{ bbb_env_file_origine }}"
 | 
					    src:    "{{ bbb_env_file_origine }}"
 | 
				
			||||||
    dest:   "{{ bbb_env_file_link }}"
 | 
					    dest:   "{{ bbb_env_file_link }}"
 | 
				
			||||||
    state:  link
 | 
					    state:  link
 | 
				
			||||||
 | 
					  notify: setup bigbluebutton
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: flush docker service
 | 
					- name: flush docker service
 | 
				
			||||||
  meta: flush_handlers
 | 
					  meta: flush_handlers
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,4 +10,10 @@ docker compose down -v
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
watch -n 2 "docker compose ps -a"
 | 
					watch -n 2 "docker compose ps -a"
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Health Logs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					docker inspect --format='{{json .State.Health}}' <container_id>
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
@@ -1,8 +1,17 @@
 | 
				
			|||||||
# Administration
 | 
					# Administration Notes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Check configuration
 | 
					## Check configuration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
./launcher enter application
 | 
					./launcher enter application
 | 
				
			||||||
pry(main)> SiteSetting.all.each { |setting| puts "#{setting.name}: #{setting.value}" }
 | 
					pry(main)> SiteSetting.all.each { |setting| puts "#{setting.name}: #{setting.value}" }
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Reinitialize Container
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					To reinitialize the container execute:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					docker network connect discourse_default central-postgres && ./launcher rebuild discourse_application
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
							
								
								
									
										2
									
								
								roles/docker-gitea/TODO.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								roles/docker-gitea/TODO.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					# Todos
 | 
				
			||||||
 | 
					- Implement [OIDC](https://www.talkingquickly.co.uk/gitea-sso-with-keycloak-openldap-openid-connect), see [Chat GPT Conversation](https://chatgpt.com/share/67f61a49-a790-800f-81b3-439181dbf555)
 | 
				
			||||||
@@ -1,6 +1,3 @@
 | 
				
			|||||||
Here is the full content in English with all instructions, formatted as a markdown (`CHANGE_DN.md`) file:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
```md
 | 
					 | 
				
			||||||
# Change Distinguished Name (DN) in OpenLDAP Docker
 | 
					# Change Distinguished Name (DN) in OpenLDAP Docker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This document provides a step-by-step guide on how to rename the Distinguished Name (DN) from `cn=administrator,dc=flock,dc=town` to `cn=administrator,dc=cymais,dc=cloud` in an **OpenLDAP Docker** environment.
 | 
					This document provides a step-by-step guide on how to rename the Distinguished Name (DN) from `cn=administrator,dc=flock,dc=town` to `cn=administrator,dc=cymais,dc=cloud` in an **OpenLDAP Docker** environment.
 | 
				
			||||||
@@ -133,7 +130,4 @@ Restart the OpenLDAP container if necessary:
 | 
				
			|||||||
docker restart openldap
 | 
					docker restart openldap
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Now, `cn=administrator,dc=cymais,dc=cloud` should be active as the new administrator account.
 | 
					Now, `cn=administrator,dc=cymais,dc=cloud` should be active as the new administrator account.
 | 
				
			||||||
```
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
This file contains the complete set of instructions in English, properly formatted, and ready to be used in OpenLDAP Docker. Let me know if you need any adjustments! 🚀
 | 
					 | 
				
			||||||
@@ -30,6 +30,6 @@ EOF
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Verifiy that MemberOf is activated and loaded
 | 
					### Verifiy that MemberOf is activated and loaded
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
docker exec -it openldap sh -c 'ls -l /opt/bitnami/openldap/lib/openldap/memberof.*'
 | 
					docker exec -it ldap sh -c 'ls -l /opt/bitnami/openldap/lib/openldap/memberof.*'
 | 
				
			||||||
docker exec -it openldap ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config '(&(objectClass=olcOverlayConfig)(olcOverlay=memberof))'
 | 
					docker exec -it openldap ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config '(&(objectClass=olcOverlayConfig)(olcOverlay=memberof))'
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								roles/docker-ldap/TODO.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								roles/docker-ldap/TODO.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					# Todos
 | 
				
			||||||
 | 
					- Implement auto password hash
 | 
				
			||||||
 | 
					- Implement auto memberof setup
 | 
				
			||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
- name: Load memberof module from file in OpenLDAP container
 | 
					- name: Load memberof module from file in OpenLDAP container
 | 
				
			||||||
  shell: >
 | 
					  shell: >
 | 
				
			||||||
    docker exec -i openldap ldapmodify -Y EXTERNAL -H ldapi:/// -f {{ldif_docker_path}}01_member_of_configuration.ldif
 | 
					    docker exec -i {{ applications[application_id].hostname }} ldapmodify -Y EXTERNAL -H ldapi:/// -f {{ldif_docker_path}}01_member_of_configuration.ldif
 | 
				
			||||||
  listen: "Import LDIF files"
 | 
					  listen: "Import LDIF files"
 | 
				
			||||||
  # @todo Remove the following ignore errors when setting up a new server
 | 
					  # @todo Remove the following ignore errors when setting up a new server
 | 
				
			||||||
  # Just here because debugging would take to much time
 | 
					  # Just here because debugging would take to much time
 | 
				
			||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- name: Refint Module Activation for OpenLDAP
 | 
					- name: Refint Module Activation for OpenLDAP
 | 
				
			||||||
  shell: >
 | 
					  shell: >
 | 
				
			||||||
    docker exec -i openldap ldapadd -Y EXTERNAL -H ldapi:/// -f {{ldif_docker_path}}02_member_of_configuration.ldif
 | 
					    docker exec -i {{ applications[application_id].hostname }} ldapadd -Y EXTERNAL -H ldapi:/// -f {{ldif_docker_path}}02_member_of_configuration.ldif
 | 
				
			||||||
  listen: "Import LDIF files"
 | 
					  listen: "Import LDIF files"
 | 
				
			||||||
  register: ldapadd_result
 | 
					  register: ldapadd_result
 | 
				
			||||||
  failed_when: ldapadd_result.rc not in [0, 68]
 | 
					  failed_when: ldapadd_result.rc not in [0, 68]
 | 
				
			||||||
@@ -18,7 +18,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- name: Refint Overlay Configuration for OpenLDAP
 | 
					- name: Refint Overlay Configuration for OpenLDAP
 | 
				
			||||||
  shell: >
 | 
					  shell: >
 | 
				
			||||||
    docker exec -i openldap ldapmodify -Y EXTERNAL -H ldapi:/// -f {{ldif_docker_path}}03_member_of_configuration.ldif
 | 
					    docker exec -i {{ applications[application_id].hostname }} ldapmodify -Y EXTERNAL -H ldapi:/// -f {{ldif_docker_path}}03_member_of_configuration.ldif
 | 
				
			||||||
  listen: "Import LDIF files"
 | 
					  listen: "Import LDIF files"
 | 
				
			||||||
  register: ldapadd_result
 | 
					  register: ldapadd_result
 | 
				
			||||||
  failed_when: ldapadd_result.rc not in [0, 68]
 | 
					  failed_when: ldapadd_result.rc not in [0, 68]
 | 
				
			||||||
@@ -28,7 +28,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- name: "Import users, groups, etc. to LDAP"
 | 
					- name: "Import users, groups, etc. to LDAP"
 | 
				
			||||||
  shell: >
 | 
					  shell: >
 | 
				
			||||||
    docker exec -i openldap ldapadd -x -D "{{ldap.dn.administrator}}" -w "{{ldap.bind_credential}}" -c -f "{{ldif_docker_path}}data/{{ item | basename | regex_replace('\.j2$', '') }}"
 | 
					    docker exec -i {{ applications[application_id].hostname }} ldapadd -x -D "{{ldap.dn.administrator}}" -w "{{ldap.bind_credential}}" -c -f "{{ldif_docker_path}}data/{{ item | basename | regex_replace('\.j2$', '') }}"
 | 
				
			||||||
  register: ldapadd_result
 | 
					  register: ldapadd_result
 | 
				
			||||||
  changed_when: "'adding new entry' in ldapadd_result.stdout"
 | 
					  changed_when: "'adding new entry' in ldapadd_result.stdout"
 | 
				
			||||||
  failed_when: ldapadd_result.rc not in [0, 20, 68]
 | 
					  failed_when: ldapadd_result.rc not in [0, 20, 68]
 | 
				
			||||||
@@ -37,7 +37,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- name: "Import schemas"
 | 
					- name: "Import schemas"
 | 
				
			||||||
  shell: >
 | 
					  shell: >
 | 
				
			||||||
    docker exec -i openldap ldapadd -Y EXTERNAL -H ldapi:/// -f "{{ldif_docker_path}}schema/{{ item | basename | regex_replace('\.j2$', '') }}"
 | 
					    docker exec -i {{ applications[application_id].hostname }} ldapadd -Y EXTERNAL -H ldapi:/// -f "{{ldif_docker_path}}schema/{{ item | basename | regex_replace('\.j2$', '') }}"
 | 
				
			||||||
  register: ldapadd_result
 | 
					  register: ldapadd_result
 | 
				
			||||||
  changed_when: "'adding new entry' in ldapadd_result.stdout"
 | 
					  changed_when: "'adding new entry' in ldapadd_result.stdout"
 | 
				
			||||||
  failed_when: ldapadd_result.rc not in [0, 80]
 | 
					  failed_when: ldapadd_result.rc not in [0, 80]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ services:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  application:
 | 
					  application:
 | 
				
			||||||
    image: bitnami/openldap:{{ applications[application_id].version }}
 | 
					    image: bitnami/openldap:{{ applications[application_id].version }}
 | 
				
			||||||
    container_name: {{ application_id }}
 | 
					    container_name: {{ applications[application_id].hostname }}
 | 
				
			||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
 | 
					{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
 | 
				
			||||||
{% if applications[application_id].network.public | bool %}
 | 
					{% if applications[application_id].network.public | bool %}
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user