mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Solved multiple bugs and propably produced 100 more.... Usual Nightshift...
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
- name: "Import users, groups, etc. to LDAP"
|
||||
shell: >
|
||||
docker exec -i openldap ldapadd -x -D "{{ldap.dn.bind}}" -w "{{ldap.bind_credential}}" -c -f "{{ldif_docker_path}}/import/{{ item | basename | regex_replace('\\.j2$', '') }}"
|
||||
docker exec -i openldap ldapadd -x -D "{{ldap.dn.bind}}" -w "{{ldap.bind_credential}}" -c -f "{{ldif_docker_path}}import/{{ item | basename | regex_replace(r'\.j2$', '') }}"
|
||||
register: ldapadd_result
|
||||
changed_when: "'adding new entry' in ldapadd_result.stdout"
|
||||
# Allow return code 0 (all entries added) or 68 (entry already exists)
|
||||
|
@@ -27,9 +27,6 @@
|
||||
ipam_config:
|
||||
- subnet: "{{ networks.local.central_ldap.subnet }}"
|
||||
|
||||
- name: "copy docker-compose.yml and env file"
|
||||
include_tasks: copy-docker-compose-and-env.yml
|
||||
|
||||
- name: "create {{docker_compose.directories.env}}phpldapadmin.env"
|
||||
template:
|
||||
src: "phpldapadmin.env.j2"
|
||||
@@ -48,8 +45,8 @@
|
||||
notify: docker compose project setup
|
||||
when: applications.ldap.webinterface == 'lam'
|
||||
|
||||
- name: flush docker service
|
||||
meta: flush_handlers
|
||||
- name: "copy docker-compose.yml and env file"
|
||||
include_tasks: copy-docker-compose-and-env.yml
|
||||
|
||||
- name: "create directory {{ldif_host_path}}{{item}}"
|
||||
file:
|
||||
|
@@ -10,14 +10,14 @@ services:
|
||||
{% if applications.ldap.webinterface == 'lam' %}
|
||||
image: ghcr.io/ldapaccountmanager/lam:{{applications.ldap.lam.version}} # Dies ist das Docker-Image für LAM
|
||||
ports:
|
||||
- 127.0.0.1:{{http_port}}:80
|
||||
- 127.0.0.1:{{ports.localhost.http.ldap}}:80
|
||||
env_file:
|
||||
- "{{docker_compose.directories.env}}lam.env"
|
||||
|
||||
{% elif applications.ldap.webinterface == 'phpldapadmin' %}
|
||||
image: leenooks/phpldapadmin:{{applications.ldap.phpldapadmin.version}}
|
||||
ports:
|
||||
- 127.0.0.1:{{http_port}}:8080
|
||||
- 127.0.0.1:{{ports.localhost.http.ldap}}:8080
|
||||
env_file:
|
||||
- "{{docker_compose.directories.env}}phpldapadmin.env"
|
||||
{% endif %}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
# Mailu main configuration file
|
||||
#
|
||||
# This file is autogenerated by the configuration management wizard for compose flavor.
|
||||
# For a detailed list of configuration variables, see the documentation at
|
||||
# https://mailu.io
|
||||
|
||||
@@ -145,6 +144,7 @@ LOG_LEVEL=WARNING
|
||||
SQLALCHEMY_DATABASE_URI_ROUNDCUBE=mysql://{{database_username}}:{{database_password}}@{{database_host}}/{{database_name}}?collation=utf8mb4_unicode_ci
|
||||
SQLALCHEMY_DATABASE_URI=mysql+mysqlconnector://{{database_username}}:{{database_password}}@{{database_host}}/{{database_name}}?collation=utf8mb4_unicode_ci
|
||||
|
||||
# Configures the authentication token. The minimum length is 3 characters. This token must be passed as request header to the API as authentication token. This is a mandatory setting for using the RESTful API.
|
||||
API_TOKEN={{applications.mailu.credentials.api_token}}
|
||||
|
||||
# Activated https://mailu.io/master/configuration.html#advanced-settings
|
||||
|
@@ -1,20 +1,4 @@
|
||||
---
|
||||
- name: check if matomo is up
|
||||
uri:
|
||||
url: "https://{{ domains.matomo }}/"
|
||||
method: GET
|
||||
return_content: yes
|
||||
status_code: 200
|
||||
validate_certs: yes
|
||||
register: site_check
|
||||
ignore_errors: yes
|
||||
when: run_once_docker_matomo is not defined
|
||||
|
||||
- name: "Determine global_matomo_tracking_enabled based on current value and site reachability"
|
||||
set_fact:
|
||||
global_matomo_tracking_enabled: "{{ (global_matomo_tracking_enabled | bool) and (site_check is defined and site_check.status == 200) }}"
|
||||
when: run_once_docker_matomo is not defined
|
||||
|
||||
- name: "include docker-central-database"
|
||||
include_role:
|
||||
name: docker-central-database
|
||||
|
@@ -6,7 +6,7 @@ services:
|
||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
||||
image: matomo:{{applications.matomo.version}}
|
||||
ports:
|
||||
- "127.0.0.1:{{http_port}}:80"
|
||||
- "127.0.0.1:{{ports.localhost.http.matomo}}:80"
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
||||
|
@@ -2,7 +2,10 @@
|
||||
application_id: "matomo"
|
||||
database_type: "mariadb"
|
||||
database_password: "{{applications.matomo.database_password}}"
|
||||
domain: "{{domains.matomo}}" # Don't know if this is still necessary
|
||||
|
||||
# Disable matomo tracking for matomo, because otherwise recursiv loading technics would be neccessary
|
||||
# I don't know if this is still necessary
|
||||
domain: "{{domains.matomo}}"
|
||||
|
||||
# Disable matomo tracking, because otherwise recursiv loading technics would be neccessary
|
||||
# This is the default value and it will be overwritten by set fact in main.yml
|
||||
global_matomo_tracking_enabled: false
|
@@ -21,8 +21,9 @@ docker volume rm $(docker volume ls -q -f "dangling=true")
|
||||
docker stop $(docker ps -a -q)
|
||||
docker rm $(docker ps -a -q)
|
||||
docker network prune -f
|
||||
sudo iptables -t nat -F DOCKER
|
||||
sudo iptables -t nat -F DOCKER-USER
|
||||
systemctl stop docker
|
||||
rm -fv /var/lib/docker/network/files/local-kv.db
|
||||
systemctl start docker
|
||||
```
|
||||
|
||||
---
|
||||
|
Reference in New Issue
Block a user