mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
Implemented more detailed configuration for landing_page, css and matomo and restructured code
This commit is contained in:
@@ -6,4 +6,4 @@
|
||||
- name: "Activate Global Matomo Tracking for {{domain}}"
|
||||
include_role:
|
||||
name: nginx-modifier-matomo
|
||||
when: global_matomo_tracking_enabled | bool
|
||||
when: matomo_tracking_enabled | bool
|
@@ -2,16 +2,16 @@
|
||||
sub_filter_once off;
|
||||
sub_filter_types text/html;
|
||||
|
||||
{% if global_matomo_tracking_enabled | bool %}
|
||||
{% if matomo_tracking_enabled | bool %}
|
||||
{# Include Global Matomo Tracking #}
|
||||
{% include 'roles/nginx-modifier-matomo/templates/matomo-tracking.conf.j2' %}
|
||||
{% endif %}
|
||||
|
||||
{% if applications | get_css_enabled(application_id) or global_matomo_tracking_enabled | bool%}
|
||||
sub_filter '</head>' '{% if global_matomo_tracking_enabled | bool %}{% include 'roles/nginx-modifier-matomo/templates/script.j2' %}{% endif %}{% if applications | get_css_enabled(application_id) %}{% include 'roles/nginx-modifier-css/templates/link.j2' %}{% endif %}</head>';
|
||||
{% if css_enabled | bool or matomo_tracking_enabled | bool %}
|
||||
sub_filter '</head>' '{% if matomo_tracking_enabled | bool %}{% include 'roles/nginx-modifier-matomo/templates/script.j2' %}{% endif %}{% if css_enabled | bool %}{% include 'roles/nginx-modifier-css/templates/link.j2' %}{% endif %}</head>';
|
||||
{% endif %}
|
||||
|
||||
{% if applications | get_css_enabled(application_id) %}
|
||||
{% if css_enabled | bool %}
|
||||
{# Include Global CSS Location #}
|
||||
{% include 'roles/nginx-modifier-css/templates/location.conf.j2' %}
|
||||
{% endif %}
|
||||
|
3
roles/nginx-modifier-all/vars/main.yml
Normal file
3
roles/nginx-modifier-all/vars/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
matomo_tracking_enabled: "{{ matomo_tracking_enabled | default(applications | get_matomo_tracking_enabled(application_id)) }}"
|
||||
css_enabled: "{{ css_enabled | default (applications | get_css_enabled(application_id)) }}"
|
||||
landingpage_iframe_enabled: "{{ landingpage_iframe_enabled | default (applications | get_landingpage_iframe_enabled(application_id)) }}"
|
Reference in New Issue
Block a user