mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-02-22 20:39:40 +01:00
More optimation of domain bugs
This commit is contained in:
parent
c4b622ccdb
commit
10b2ead705
@ -153,6 +153,7 @@ defaults_applications:
|
|||||||
# secret_key: # Set to a randomly generated 16 bytes string
|
# secret_key: # Set to a randomly generated 16 bytes string
|
||||||
# database_password: # Needs to be set in inventory file
|
# database_password: # Needs to be set in inventory file
|
||||||
# api_token: # Configures the authentication token. The minimum length is 3 characters. This is a mandatory setting for using the RESTful API.
|
# api_token: # Configures the authentication token. The minimum length is 3 characters. This is a mandatory setting for using the RESTful API.
|
||||||
|
# initial_administrator_password: # Initial administrator password for setup
|
||||||
|
|
||||||
## MariaDB
|
## MariaDB
|
||||||
mariadb:
|
mariadb:
|
||||||
@ -280,6 +281,10 @@ defaults_applications:
|
|||||||
postgres:
|
postgres:
|
||||||
database.version: "latest"
|
database.version: "latest"
|
||||||
|
|
||||||
|
portfolio:
|
||||||
|
database:
|
||||||
|
central_storage: False # Portfolio doesn't use any database
|
||||||
|
|
||||||
# Snipe-IT
|
# Snipe-IT
|
||||||
snipe_it:
|
snipe_it:
|
||||||
version: "latest"
|
version: "latest"
|
||||||
|
@ -21,11 +21,9 @@
|
|||||||
|
|
||||||
- name: flush docker service
|
- name: flush docker service
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
when: applications.mailu.setup |bool
|
|
||||||
|
|
||||||
- name: execute database migration
|
- name: execute database migration
|
||||||
command:
|
command:
|
||||||
cmd: "docker compose -p mailu exec admin flask mailu admin admin {{primary_domain}} {{mailu_initial_root_password}}"
|
cmd: "docker compose -p mailu exec admin flask mailu admin admin {{primary_domain}} {{applications.mailu.initial_administrator_password}}"
|
||||||
chdir: "{{docker_compose.directories.instance}}"
|
chdir: "{{docker_compose.directories.instance}}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: applications.mailu.setup |bool
|
|
@ -7,3 +7,6 @@ enable_wildcard_certificate: false
|
|||||||
# Use dedicated source for oidc if activated
|
# Use dedicated source for oidc if activated
|
||||||
# @see https://github.com/heviat/Mailu-OIDC/tree/2024.06
|
# @see https://github.com/heviat/Mailu-OIDC/tree/2024.06
|
||||||
docker_source: "{{ 'ghcr.io/heviat' if applications[application_id].oidc.enabled | bool else 'ghcr.io/mailu' }}"
|
docker_source: "{{ 'ghcr.io/heviat' if applications[application_id].oidc.enabled | bool else 'ghcr.io/mailu' }}"
|
||||||
|
|
||||||
|
domain: "{{ domains[application_id] }}"
|
||||||
|
http_port: "{{ ports.localhost.http[application_id] }}"
|
@ -84,11 +84,6 @@ docker-compose exec -it database mysql -u nextcloud -D nextcloud -p
|
|||||||
docker-compose run --detach --name database --env MYSQL_USER="nextcloud" --env MYSQL_PASSWORD=PASSWORD --env MYSQL_ROOT_PASSWORD=PASSWORD --env MYSQL_DATABASE="nextcloud" -v nextcloud_database:/var/lib/mysql
|
docker-compose run --detach --name database --env MYSQL_USER="nextcloud" --env MYSQL_PASSWORD=PASSWORD --env MYSQL_ROOT_PASSWORD=PASSWORD --env MYSQL_DATABASE="nextcloud" -v nextcloud_database:/var/lib/mysql
|
||||||
```
|
```
|
||||||
|
|
||||||
Check the process with:
|
|
||||||
```sql
|
|
||||||
show processlist;
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## OCC (Nextcloud Command Line) 🔧
|
## OCC (Nextcloud Command Line) 🔧
|
||||||
@ -125,6 +120,12 @@ docker-compose exec -it -u www-data application /var/www/html/occ maintenance:mo
|
|||||||
|
|
||||||
OIDC is supported in this role—for example, via **Keycloak**. OIDC-specific tasks are included when enabled, allowing integration of external authentication providers seamlessly.
|
OIDC is supported in this role—for example, via **Keycloak**. OIDC-specific tasks are included when enabled, allowing integration of external authentication providers seamlessly.
|
||||||
|
|
||||||
|
### Verify OIDC Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose exec -u www-data application /var/www/html/occ config:app:get sociallogin custom_providers
|
||||||
|
```
|
||||||
|
|
||||||
## LDAP
|
## LDAP
|
||||||
|
|
||||||
More information: https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/user_auth_ldap.html
|
More information: https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/user_auth_ldap.html
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
src: "proxy-nginx.conf.j2"
|
src: "proxy-nginx.conf.j2"
|
||||||
dest: "{{nginx.directories.http.servers}}{{domains[application_id]}}.conf"
|
dest: "{{nginx.directories.http.servers}}{{domains[application_id]}}.conf"
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
vars:
|
||||||
|
domain: "{{domains[application_id]}}"
|
||||||
|
http_port: "{{ports.localhost.http[application_id]}}"
|
||||||
|
|
||||||
- name: create internal nextcloud nginx configuration
|
- name: create internal nextcloud nginx configuration
|
||||||
template:
|
template:
|
||||||
|
@ -14,6 +14,13 @@
|
|||||||
# This configuration allows users to connect multiple accounts to their Nextcloud profile
|
# This configuration allows users to connect multiple accounts to their Nextcloud profile
|
||||||
# using the sociallogin app.
|
# using the sociallogin app.
|
||||||
|
|
||||||
|
- name: install sociallogin plugin
|
||||||
|
command: "docker exec -u www-data {{nextcloud_application_container_name}} /var/www/html/occ app:install sociallogin"
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: enable sociallogin plugin
|
||||||
|
command: "docker exec -u www-data {{nextcloud_application_container_name}} /var/www/html/occ app:enable sociallogin"
|
||||||
|
|
||||||
- name: Set custom_providers
|
- name: Set custom_providers
|
||||||
command: >
|
command: >
|
||||||
docker exec -u www-data {{nextcloud_application_container_name}} /var/www/html/occ
|
docker exec -u www-data {{nextcloud_application_container_name}} /var/www/html/occ
|
||||||
|
@ -2,17 +2,20 @@
|
|||||||
include_role:
|
include_role:
|
||||||
name: nginx-modifier-all
|
name: nginx-modifier-all
|
||||||
|
|
||||||
- name: "include role nginx-https-recieve-certificate for {{domain}}"
|
|
||||||
include_role:
|
|
||||||
name: nginx-https-recieve-certificate
|
|
||||||
|
|
||||||
- name: "Relevant variables for role: {{ role_path | basename }}"
|
- name: "Relevant variables for role: {{ role_path | basename }}"
|
||||||
debug:
|
debug:
|
||||||
msg:
|
msg:
|
||||||
|
domain: "{{domain}}"
|
||||||
domains: "{{domains}}"
|
domains: "{{domains}}"
|
||||||
applications: "{{applications}}"
|
applications: "{{applications}}"
|
||||||
when: enable_debug | bool
|
when: enable_debug | bool
|
||||||
|
|
||||||
|
- name: "include role nginx-https-recieve-certificate for {{domain}}"
|
||||||
|
include_role:
|
||||||
|
name: nginx-https-recieve-certificate
|
||||||
|
vars:
|
||||||
|
domain: "{{domain}}"
|
||||||
|
|
||||||
- name: "copy nginx domain configuration to {{configuration_destination}}"
|
- name: "copy nginx domain configuration to {{configuration_destination}}"
|
||||||
template:
|
template:
|
||||||
src: "roles/nginx-docker-reverse-proxy/templates/domain.conf.j2"
|
src: "roles/nginx-docker-reverse-proxy/templates/domain.conf.j2"
|
||||||
|
@ -4,3 +4,10 @@
|
|||||||
dest: "{{ '/root/.bashrc' if user_name == 'root' else '/home/' ~ user_name ~ '/.bashrc' }}"
|
dest: "{{ '/root/.bashrc' if user_name == 'root' else '/home/' ~ user_name ~ '/.bashrc' }}"
|
||||||
owner: "{{user_name}}"
|
owner: "{{user_name}}"
|
||||||
group: "{{user_name}}"
|
group: "{{user_name}}"
|
||||||
|
|
||||||
|
- name: create .bash_profile
|
||||||
|
template:
|
||||||
|
src: "bash_profile.j2"
|
||||||
|
dest: "{{ '/root/.bash_profile' if user_name == 'root' else '/home/' ~ user_name ~ '/.bash_profile' }}"
|
||||||
|
owner: "{{user_name}}"
|
||||||
|
group: "{{user_name}}"
|
5
roles/user/templates/bash_profile.j2
Normal file
5
roles/user/templates/bash_profile.j2
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#
|
||||||
|
# ~/.bash_profile
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
Loading…
x
Reference in New Issue
Block a user