From 53af17b2ab3d926cd97e6dd194783d6a6c6ca279 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 5 Feb 2025 12:53:06 +0100 Subject: [PATCH] Solved Snipe IT bug --- group_vars/all/00_general.yml | 7 +++++-- group_vars/all/01_modes.yml | 1 - roles/docker-matrix-ansible/tasks/main.yml | 2 +- roles/docker-moodle/templates/env.j2 | 2 +- roles/docker-pixelfed/templates/env.j2 | 2 +- roles/docker-snipe_it/README.md | 3 ++- roles/docker-snipe_it/templates/env.j2 | 2 +- roles/docker-snipe_it/vars/main.yml | 7 +------ roles/nginx-domain-redirect/tasks/main.yml | 2 +- roles/nginx-www-redirect/tasks/main.yml | 6 +++--- tasks/seed-database-to-backup.yml | 2 +- 11 files changed, 17 insertions(+), 19 deletions(-) diff --git a/group_vars/all/00_general.yml b/group_vars/all/00_general.yml index 935305d1..93621a5b 100644 --- a/group_vars/all/00_general.yml +++ b/group_vars/all/00_general.yml @@ -3,7 +3,7 @@ pause_duration: "120" # Database delay to wait for the central d backups_folder_path: "/Backups/" # Path to the backups folder timezone: "UTC" -locale: "locale" +locale: "en" ## Domain primary_domain_tld: "localhost" # Top Level Domain of the server @@ -43,4 +43,7 @@ nginx_matomo_tracking: false # Activates matomo tracking on all # To enable, update your inventory file. # For detailed setup instructions, visit: # https://github.com/kevinveenbirkenbach/cymais/tree/master/roles/nginx-docker-cert-deploy -enable_wildcard_certificate: false +enable_wildcard_certificate: false + +# This enables debugging in ansible and in the apps +enable_debug: false diff --git a/group_vars/all/01_modes.yml b/group_vars/all/01_modes.yml index aedbf74e..185c783d 100644 --- a/group_vars/all/01_modes.yml +++ b/group_vars/all/01_modes.yml @@ -2,7 +2,6 @@ # The following modes can be combined with each other mode_reset: false # Cleans up all CyMaIS files. It's necessary to run to whole playbook and not particial roles when using this function. -mode_debug: false # Prints well formated debug information mode_test: false # Executes test routines instead of productive routines mode_update: true # Executes updates mode_backup: true # Activates the backup before the update procedure diff --git a/roles/docker-matrix-ansible/tasks/main.yml b/roles/docker-matrix-ansible/tasks/main.yml index 879cc8b5..9390fec4 100644 --- a/roles/docker-matrix-ansible/tasks/main.yml +++ b/roles/docker-matrix-ansible/tasks/main.yml @@ -70,7 +70,7 @@ - name: show variable information debug: msg: "hosts_path: {{hosts_path}}\nmatrix_inventory_tmp_dir:{{ matrix_inventory_tmp_dir }}" - when: mode_debug | bool + when: enable_debug | bool - name: install requirements local_action: command just roles diff --git a/roles/docker-moodle/templates/env.j2 b/roles/docker-moodle/templates/env.j2 index 6afb2a48..e7aff866 100644 --- a/roles/docker-moodle/templates/env.j2 +++ b/roles/docker-moodle/templates/env.j2 @@ -10,4 +10,4 @@ MOODLE_REVERSE_PROXY=yes MOODLE_USERNAME={{applications.moodle.administrator_name}} MOODLE_PASSWORD={{moodle_user_password}} MOODLE_EMAIL={{applications.moodle.administrator_email}} -BITNAMI_DEBUG={% if mode_debug | bool %}true{% else %}false{% endif %} \ No newline at end of file +BITNAMI_DEBUG={% if enable_debug | bool %}true{% else %}false{% endif %} \ No newline at end of file diff --git a/roles/docker-pixelfed/templates/env.j2 b/roles/docker-pixelfed/templates/env.j2 index 71d6e719..f894977e 100644 --- a/roles/docker-pixelfed/templates/env.j2 +++ b/roles/docker-pixelfed/templates/env.j2 @@ -4,7 +4,7 @@ APP_KEY={{pixelfed_app_key}} ## General Settings APP_NAME="{{applications.pixelfed.titel}}" APP_ENV=production -APP_DEBUG={{mode_debug | string | lower }} +APP_DEBUG={{enable_debug | string | lower }} APP_URL=https://{{domain}} APP_DOMAIN="{{domain}}" ADMIN_DOMAIN="{{domain}}" diff --git a/roles/docker-snipe_it/README.md b/roles/docker-snipe_it/README.md index bea4fbf4..e113431a 100644 --- a/roles/docker-snipe_it/README.md +++ b/roles/docker-snipe_it/README.md @@ -2,4 +2,5 @@ ## more - https://github.com/snipe/snipe-it - https://snipeitapp.com/ -- https://snipe-it.readme.io/docs/ldap-sync-login \ No newline at end of file +- https://snipe-it.readme.io/docs/ldap-sync-login +- https://snipe-it.readme.io/docs/saml \ No newline at end of file diff --git a/roles/docker-snipe_it/templates/env.j2 b/roles/docker-snipe_it/templates/env.j2 index 5b2fb1cb..dde8ca23 100644 --- a/roles/docker-snipe_it/templates/env.j2 +++ b/roles/docker-snipe_it/templates/env.j2 @@ -2,7 +2,7 @@ # REQUIRED: BASIC APP SETTINGS # -------------------------------------------- APP_ENV=production -APP_DEBUG={{mode_debug | string | lower }} +APP_DEBUG={{enable_debug | string | lower }} # Please regenerate the APP_KEY value by calling `docker compose run --rm app php artisan key:generate --show`. Copy paste the value here APP_KEY={{applications.snipe_it.app_key}} APP_URL=http://{{domain}} diff --git a/roles/docker-snipe_it/vars/main.yml b/roles/docker-snipe_it/vars/main.yml index f26e75ef..c6155b31 100644 --- a/roles/docker-snipe_it/vars/main.yml +++ b/roles/docker-snipe_it/vars/main.yml @@ -1,8 +1,3 @@ application_id: "snipe_it" database_password: "{{applications.snipe_it.database_password}}" -database_type: "mariadb" - -# deactivated due to error -# SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'locale' -# alter table `users` add `locale` varchar(5) null default 'locale' -enable_central_database: false \ No newline at end of file +database_type: "mariadb" \ No newline at end of file diff --git a/roles/nginx-domain-redirect/tasks/main.yml b/roles/nginx-domain-redirect/tasks/main.yml index 9fd9a6c3..5073389f 100644 --- a/roles/nginx-domain-redirect/tasks/main.yml +++ b/roles/nginx-domain-redirect/tasks/main.yml @@ -8,7 +8,7 @@ - name: The domains for which a www. redirect will be implemented debug: var: domain_mappings - when: mode_debug | bool + when: enable_debug | bool - name: configure nginx redirect configurations vars: diff --git a/roles/nginx-www-redirect/tasks/main.yml b/roles/nginx-www-redirect/tasks/main.yml index a571142d..1bdb700d 100644 --- a/roles/nginx-www-redirect/tasks/main.yml +++ b/roles/nginx-www-redirect/tasks/main.yml @@ -17,7 +17,7 @@ - name: The domains for which a www. redirect will be implemented debug: var: filtered_domains - when: mode_debug | bool + when: enable_debug | bool # Routine for domains with primary domain included @@ -28,7 +28,7 @@ - name: Debug with primary domain debug: var: filtered_domains_with_primary_domain - when: mode_debug | bool + when: enable_debug | bool - name: Include nginx-domain-redirect role with dynamic domain mappings for domains with {{primary_domain}} included include_role: @@ -55,7 +55,7 @@ - name: Debug domains without primary domain debug: var: filtered_domains_without_primary_domain - when: mode_debug | bool + when: enable_debug | bool - name: Include nginx-domain-redirect role with dynamic domain mappings for domains without primary domain include_role: diff --git a/tasks/seed-database-to-backup.yml b/tasks/seed-database-to-backup.yml index f348f307..4c883909 100644 --- a/tasks/seed-database-to-backup.yml +++ b/tasks/seed-database-to-backup.yml @@ -5,7 +5,7 @@ database_name: "{{ database_name | default('undefined') }}" database_username: "{{ database_username | default('undefined') }}" database_password: "{{ database_password | default('undefined') }}" - when: mode_debug | bool + when: enable_debug | bool - name: seed database values command: