From 6e02e094718a7857cd740e0ed2fbbdf6f612908e Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 20 Feb 2025 01:19:25 +0100 Subject: [PATCH] Optimized Mastodon, Discourse etc. for Flock.Town --- group_vars/all/07_applications.yml | 4 +- roles/docker-mastodon/templates/env.j2 | 14 +- roles/docker-mastodon/vars/main.yml | 2 +- roles/docker-matomo/README.md | 6 - roles/docker-matomo/vars/main.yml | 2 +- .../docker-portfolio/templates/config.yaml.j2 | 166 ++++++++++++++---- roles/nginx-modifier-matomo/tasks/main.yml | 2 +- roles/nginx-modifier-matomo/vars/main.yml | 2 +- 8 files changed, 147 insertions(+), 51 deletions(-) diff --git a/group_vars/all/07_applications.yml b/group_vars/all/07_applications.yml index 6586d2bd..d67c36fd 100644 --- a/group_vars/all/07_applications.yml +++ b/group_vars/all/07_applications.yml @@ -115,7 +115,9 @@ defaults_applications: matomo: version: "latest" oauth2_proxy: - enabled: false # Deactivated atm. @todo implement + enabled: false # Deactivated atm. @todo implement +# database_password: Null # Needs to be set in inventory file +# auth_token: Null # Needs to be set in inventory file ## Mastodon mastodon: diff --git a/roles/docker-mastodon/templates/env.j2 b/roles/docker-mastodon/templates/env.j2 index da8684b3..80683a8a 100644 --- a/roles/docker-mastodon/templates/env.j2 +++ b/roles/docker-mastodon/templates/env.j2 @@ -13,15 +13,15 @@ SINGLE_USER_MODE={{applications.mastodon.single_user_mode}} # ------- # Make sure to use `bundle exec rails secret` to generate secrets # ------- -SECRET_KEY_BASE= {{mastodon.credentials.secret_key_base}} -OTP_SECRET= {{mastodon.credentials.otp_secret}} +SECRET_KEY_BASE= {{applications.mastodon.credentials.secret_key_base}} +OTP_SECRET= {{applications.mastodon.credentials.otp_secret}} # Web Push # -------- # Generate with `bundle exec rails mastodon:webpush:generate_vapid_key` # -------- -VAPID_PRIVATE_KEY= {{mastodon.credentials.vapid.private_key}} -VAPID_PUBLIC_KEY= {{mastodon.credentials.vapid.public_key}} +VAPID_PRIVATE_KEY= {{applications.mastodon.credentials.vapid.private_key}} +VAPID_PUBLIC_KEY= {{applications.mastodon.credentials.vapid.public_key}} # Encryption secrets # ------------------ @@ -29,9 +29,9 @@ VAPID_PUBLIC_KEY= {{mastodon.credentials.vapid.public_key}} # These are private/secret values, do not share outside hosting environment # Use `bin/rails db:encryption:init` to generate fresh secrets # Do NOT change these secrets once in use, as this would cause data loss and other issues -ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= {{mastodon.credentials.active_record_encryption.deterministic_key}} -ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT= {{mastodon.credentials.active_record_encryption.key_derivation_salt}} -ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY= {{mastodon.credentials.active_record_encryption.primary_key}} +ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= {{applications.mastodon.credentials.active_record_encryption.deterministic_key}} +ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT= {{applications.mastodon.credentials.active_record_encryption.key_derivation_salt}} +ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY= {{applications.mastodon.credentials.active_record_encryption.primary_key}} DB_HOST={{database_host}} DB_PORT={{database_port}} diff --git a/roles/docker-mastodon/vars/main.yml b/roles/docker-mastodon/vars/main.yml index 2d5b18a0..5ec3d6d5 100644 --- a/roles/docker-mastodon/vars/main.yml +++ b/roles/docker-mastodon/vars/main.yml @@ -1,3 +1,3 @@ application_id: "mastodon" -database_password: "{{mastodon.credentials.database_password}}" +database_password: "{{applications.mastodon.credentials.database_password}}" database_type: "postgres" \ No newline at end of file diff --git a/roles/docker-matomo/README.md b/roles/docker-matomo/README.md index 84ea8be5..51a9d52d 100644 --- a/roles/docker-matomo/README.md +++ b/roles/docker-matomo/README.md @@ -2,12 +2,6 @@ This Ansible role deploys a [Matomo](https://matomo.org/) analytics platform instance using Docker. -## Requirements - -- Docker and Docker-Compose installed on the host machine. -- Nginx installed for reverse proxy configuration. -- Certbot installed for SSL certificate generation. - ## AI Generated This script was created with the help of ChatGPT. The full conversation is [here](https://chat.openai.com/share/49e0c7e4-a2af-4a04-adad-7a735bdd85c4) available. diff --git a/roles/docker-matomo/vars/main.yml b/roles/docker-matomo/vars/main.yml index 1a6b407c..c43197f9 100644 --- a/roles/docker-matomo/vars/main.yml +++ b/roles/docker-matomo/vars/main.yml @@ -1,7 +1,7 @@ --- application_id: "matomo" database_type: "mariadb" -database_password: "{{matomo_database_password}}" +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 diff --git a/roles/docker-portfolio/templates/config.yaml.j2 b/roles/docker-portfolio/templates/config.yaml.j2 index 1fb19dae..a76e4423 100644 --- a/roles/docker-portfolio/templates/config.yaml.j2 +++ b/roles/docker-portfolio/templates/config.yaml.j2 @@ -1,3 +1,4 @@ +{# The Linebreak here are intentional due to tab bugs #} --- accounts: name: Online Presence @@ -16,14 +17,17 @@ accounts: class: fa-solid fa-pen-nib children: {% if service_provider.contact.mastodon is defined %} + - name: Mastodon description: Follow {{ 'our' if service_provider.type == 'legal' else 'my' }} updates on Mastodon. icon: class: fa-brands fa-mastodon url: "https://{{ service_provider.contact.mastodon.split('@')[2] }}/@{{ service_provider.contact.mastodon.split('@')[1] }}" identifier: "{{service_provider.contact.mastodon}}" + {% endif %} {% if service_provider.contact.bluesky is defined %} + - name: Bluesky description: Follow {{ 'our' if service_provider.type == 'legal' else 'my' }} on Bluesky. icon: @@ -31,328 +35,373 @@ accounts: alternatives: - link: accounts.publishingchannels.microblogs.mastodon identifier: "{{service_provider.contact.bluesky}}" + {% endif %} {% if service_provider.contact.pixelfed is defined %} + - name: Pictures description: Explore {{ 'our' if service_provider.type == 'legal' else 'my' }} photo gallery on Pixelfed. icon: class: fa-solid fa-camera identifier: "{{service_provider.contact.pixelfed}}" url: "https://{{ service_provider.contact.pixelfed.split('@')[2] }}/@{{ service_provider.contact.pixelfed.split('@')[1] }}" + {% endif %} {% if service_provider.contact.peertube is defined %} + - name: Peertube description: Discover {{ 'our' if service_provider.type == 'legal' else 'my' }} videos on Peertube. icon: class: fa-solid fa-video identifier: "{{service_provider.contact.peertube}}" url: "https://{{ service_provider.contact.peertube.split('@')[2] }}/@{{ service_provider.contact.peertube.split('@')[1] }}" + {% endif %} {% if service_provider.contact.wordpress is defined %} + - name: Blog description: Read {{ 'our' if service_provider.type == 'legal' else 'my' }} articles and stories. icon: class: fa-solid fa-blog identifier: "{{service_provider.contact.wordpress}}" url: "https://{{ service_provider.contact.wordpress.split('@')[2] }}/@{{ service_provider.contact.wordpress.split('@')[1] }}" + {% endif %} {% if service_provider.legal.source_code is defined %} + - name: Our Code description: Explore {{ 'our' if service_provider.type == 'legal' else 'my' }} code. icon: class: fa-solid fa-code url: "{{service_provider.legal.source_code}}" + {% endif %} {% if service_provider.contact.friendica is defined %} + - name: Social Network description: Visit {{ 'our' if service_provider.type == 'legal' else 'my' }} friendica profile icon: class: fas fa-network-wired identifier: "{{service_provider.contact.friendica}}" url: "https://{{ service_provider.contact.friendica.split('@')[2] }}/@{{ service_provider.contact.friendica.split('@')[1] }}" + {% endif %} + - link: navigation.header.contact cards: {% if "matomo" in group_names %} + - icon: class: "fa-solid fa-chart-line" title: "Matomo Analytics" text: "Experience the power of Matomo, an innovative open-source analytics platform that delivers real-time insights, robust visitor tracking, and privacy-first features to elevate your website performance. Dive into actionable data with unmatched precision and clarity!" url: https://{{domains.matomo}} link_text: "Discover Matomo Now!" -{% endif %} +{% endif %} {% if "ldap" in group_names %} + - icon: class: "fa-solid fa-users" title: "LDAP Directory" text: "Unleash the potential of centralized identity management with our vibrant LDAP solution. Enjoy seamless authentication, efficient user management, and enhanced security that empowers your organization to stay connected, agile, and ahead of the curve in digital transformation." url: https://{{domains.ldap}} link_text: "Empower Your Network!" -{% endif %} +{% endif %} {% if "keycloak" in group_names %} + - icon: class: "fa-solid fa-lock" title: "Keycloak Identity" text: "Step into a secure future with Keycloak! Our dynamic identity and access management solution offers streamlined SSO capabilities, robust security measures, and an intuitive user experience that propels your applications to unprecedented heights of performance and reliability." url: https://{{domains.keycloak}} link_text: "Secure Your Future Now!" -{% endif %} +{% endif %} {% if "nextcloud" in group_names %} + - icon: class: "fa-solid fa-cloud" title: "Nextcloud" text: "Elevate your collaboration with Nextcloud, a vibrant self-hosted cloud solution designed for dynamic file sharing, seamless communication, and effortless teamwork. Embrace unparalleled control, flexibility, and a boosted digital workspace that adapts to your every need." url: https://{{domains.nextcloud}} link_text: "Experience Nextcloud Today!" -{% endif %} +{% endif %} {% if "gitea" in group_names %} + - icon: class: "fa-solid fa-code" title: "Gitea" text: "Boost your development journey with Gitea, a lightweight and energetic self-hosted Git service that offers efficient code collaboration, intuitive version control, and an agile environment for your projects. Ignite your coding spirit, innovate faster, and code with confidence!" url: https://{{domains.gitea}} link_text: "Ignite Your Code Now!" -{% endif %} +{% endif %} {% if "wordpress" in group_names %} + - icon: class: "fa-solid fa-blog" title: "WordPress" text: "Unleash your creative potential with WordPress, a dynamic platform that empowers you to build, manage, and scale stunning websites and blogs effortlessly. Experience an ever-evolving ecosystem that inspires innovation and drives digital success with every click." url: https://{{domains.wordpress}} link_text: "Launch Your Site Today!" -{% endif %} +{% endif %} {% if "mediawiki" in group_names %} + - icon: class: "fa-solid fa-book" title: "MediaWiki" text: "Empower your knowledge base with MediaWiki, a versatile and collaborative platform designed to build comprehensive, user-driven documentation. Embrace an energetic community and innovative tools that turn information into a vibrant, living resource." url: https://{{domains.mediawiki}} link_text: "Explore MediaWiki Now!" -{% endif %} +{% endif %} {% if "mybb" in group_names %} + - icon: class: "fa-solid fa-comments" title: "MyBB Forum" text: "Transform your community engagement with MyBB, a feature-rich forum solution that combines modern design with robust functionality. Enjoy dynamic discussions, intuitive moderation, and an energetic user interface that brings people together like never before." url: https://{{domains.mybb}} link_text: "Join the Conversation!" -{% endif %} +{% endif %} {% if "yourls" in group_names %} + - icon: class: "fa-solid fa-link" title: "YOURLS URL Shortener" text: "Streamline your online presence with YOURLS, a nimble URL shortening solution that makes sharing links faster, easier, and more engaging. Enjoy the benefits of enhanced tracking and a user-friendly interface that energizes your digital strategy." url: https://{{domains.yourls}} link_text: "Shorten Links Instantly!" -{% endif %} +{% endif %} {% if "mailu" in group_names %} + - icon: class: "fa-solid fa-envelope" title: "Mailu Mail Server" text: "Revolutionize your email communications with Mailu, a secure and flexible mail server solution that integrates seamlessly into your workflow. Experience enhanced reliability, robust security, and an energetic approach to managing your digital correspondence." url: https://{{domains.mailu}} link_text: "Elevate Your Email Now!" -{% endif %} +{% endif %} {% if "mastodon" in group_names %} + - icon: class: "fa-solid fa-bullhorn" title: "Mastodon Social" text: "Dive into a decentralized social experience with Mastodon, a vibrant platform that redefines online communication with its community-driven approach. Enjoy a refreshing burst of innovation, freedom, and energetic interaction every time you connect." url: https://{{domains.mastodon}} link_text: "Join the Social Revolution!" -{% endif %} +{% endif %} {% if "pixelfed" in group_names %} + - icon: class: "fa-solid fa-camera" title: "Pixelfed" text: "Showcase your visual story with Pixelfed, an inspiring self-hosted image sharing platform that champions creativity and privacy. Revel in a dynamic, artistic environment where every photo is a window to endless possibilities and vibrant expression." url: https://{{domains.pixelfed}} link_text: "Share Your Vision Now!" -{% endif %} +{% endif %} {% if "peertube" in group_names %} + - icon: class: "fa-solid fa-video" title: "PeerTube" text: "Embrace a new era of video hosting with PeerTube, a decentralized platform that empowers creators with freedom, innovation, and a community-focused approach. Experience seamless streaming and dynamic sharing that fuels your creative ambitions." url: https://{{domains.peertube}} link_text: "Stream with Freedom!" -{% endif %} +{% endif %} {% if "bigbluebutton" in group_names %} + - icon: class: "fa-solid fa-chalkboard-teacher" title: "BigBlueButton" text: "Transform online learning and collaboration with BigBlueButton, an interactive web conferencing solution designed to energize virtual classrooms and meetings. Enjoy dynamic tools and an engaging environment that makes every session a powerful learning experience." url: https://{{domains.bigbluebutton}} link_text: "Start Your Virtual Session!" -{% endif %} +{% endif %} {% if "funkwhale" in group_names %} + - icon: class: "fa-solid fa-music" title: "Funkwhale" text: "Dive into a world of rhythm and sound with Funkwhale, an innovative self-hosted music sharing platform that celebrates creativity and community. Experience an energetic soundscape and seamless music streaming that amplifies your passion for tunes." url: https://{{domains.funkwhale}} link_text: "Jam Out Now!" -{% endif %} +{% endif %} {% if "joomla" in group_names %} + - icon: class: "fa-solid fa-sitemap" title: "Joomla CMS" text: "Elevate your website management with Joomla, a powerful content management system that fuses versatility with dynamic design. Experience a vibrant platform that inspires creativity and drives your digital presence to new, energetic heights." url: https://{{domains.joomla}} link_text: "Build with Joomla Today!" -{% endif %} +{% endif %} {% if "attendize" in group_names %} + - icon: class: "fa-solid fa-calendar-check" title: "Attendize" text: "Revolutionize your event management with Attendize, an energetic and intuitive platform designed to streamline ticketing and event planning. Enjoy a feature-rich, user-friendly solution that transforms every event into an unforgettable experience." url: https://{{domains.attendize}} link_text: "Plan Your Event Now!" -{% endif %} +{% endif %} {% if "baserow" in group_names %} + - icon: class: "fa-solid fa-table" title: "Baserow" text: "Empower your data management with Baserow, an innovative platform that makes building and managing databases both fun and efficient. Enjoy a dynamic interface, seamless collaboration, and energetic tools that supercharge your workflow." url: https://{{domains.baserow}} link_text: "Manage Data with Ease!" -{% endif %} +{% endif %} {% if "listmonk" in group_names %} + - icon: class: "fa-solid fa-list" title: "Listmonk" text: "Elevate your email marketing with Listmonk, a high-energy, self-hosted solution that offers powerful newsletter management and analytics. Enjoy an intuitive design, robust features, and a spirited approach that takes your campaigns to the next level." url: https://{{domains.listmonk}} link_text: "Boost Your Campaigns Now!" -{% endif %} +{% endif %} {% if "discourse" in group_names %} + - icon: class: "fa-solid fa-comment-dots" title: "Discourse Forum" text: "Ignite community conversations with Discourse, an innovative forum platform that redefines online discussions with its modern, engaging interface. Experience an energetic, user-friendly environment that brings people together and fuels vibrant exchanges." url: https://{{domains.discourse}} link_text: "Join the Discussion!" -{% endif %} +{% endif %} {% if "matrix" in group_names %} + - icon: class: "fa-solid fa-satellite-dish" title: "Matrix" text: "Step into the future of communication with Matrix, a dynamic and decentralized platform that delivers secure, real-time messaging and collaboration. Enjoy an innovative ecosystem that energizes your digital interactions and connects you globally." url: https://{{domains.matrix}} link_text: "Connect on Matrix Now!" -{% endif %} +{% endif %} {% if "openproject" in group_names %} + - icon: class: "fa-solid fa-project-diagram" title: "OpenProject" text: "Transform your project management with OpenProject, a vibrant and collaborative tool that brings clarity and energy to your planning, tracking, and team communication. Experience streamlined workflows and an innovative platform that propels your projects forward." url: https://{{domains.openproject}} link_text: "Manage Projects Dynamically!" -{% endif %} +{% endif %} {% if "gitlab" in group_names %} + - icon: class: "fa-solid fa-code-branch" title: "GitLab" text: "Accelerate your software development with GitLab, an energetic, all-in-one platform for source code management and continuous integration. Experience a robust, collaborative environment that empowers teams to innovate and deliver exceptional results." url: https://{{domains.gitlab}} link_text: "Revolutionize Your DevOps!" -{% endif %} +{% endif %} {% if "akaunting" in group_names %} + - icon: class: "fa-solid fa-file-invoice-dollar" title: "Akaunting" text: "Empower your financial management with Akaunting, a dynamic and feature-rich accounting platform designed to simplify your bookkeeping and boost your business growth. Enjoy intuitive tools, real-time insights, and an energetic approach to your finances." url: https://{{domains.akaunting}} link_text: "Transform Your Finances Today!" -{% endif %} +{% endif %} {% if "moodle" in group_names %} + - icon: class: "fa-solid fa-graduation-cap" title: "Moodle" text: "Ignite the learning experience with Moodle, a powerful and versatile platform for online education that energizes classrooms and fosters interactive learning. Embrace innovative tools, engaging content, and a dynamic community of educators and learners." url: https://{{domains.moodle}} link_text: "Start Learning Now!" -{% endif %} +{% endif %} {% if "taiga" in group_names %} + - icon: class: "fa-solid fa-tasks" title: "Taiga" text: "Supercharge your project management with Taiga, a dynamic and agile tool designed for teams that thrive on creativity and collaboration. Experience a vibrant interface, robust task tracking, and an energetic platform that drives your projects to success." url: https://{{domains.taiga}} link_text: "Boost Your Projects Now!" -{% endif %} +{% endif %} {% if "friendica" in group_names %} + - icon: class: "fa-solid fa-user-friends" title: "Friendica" text: "Connect and share like never before with Friendica, an innovative social networking platform that celebrates community, freedom, and dynamic interactions. Enjoy a spirited and open environment where every connection is a step toward a more engaging digital world." url: https://{{domains.friendica}} link_text: "Join the Social Movement!" -{% endif %} +{% endif %} {% if "portfolio" in group_names %} + - icon: class: "fa-solid fa-briefcase" title: "Portfolio" text: "Showcase your professional journey with Portfolio, a dynamic platform that combines creativity and functionality to highlight your achievements. Experience an energetic design, intuitive features, and a compelling way to present your work to the world." url: https://{{domains.portfolio}} link_text: "Elevate Your Profile Now!" -{% endif %} +{% endif %} {% if "bluesky" in group_names %} + - icon: class: "fa-solid fa-sun" title: "Bluesky" text: "Soar to new digital heights with Bluesky, an innovative platform that reimagines social networking with its forward-thinking, community-driven approach. Experience a burst of energy, creativity, and the freedom to connect in a truly inspiring way." url: https://{{domains.bluesky}} link_text: "Soar with Bluesky Today!" -{% endif %} +{% endif %} {% if "phpmyadmin" in group_names %} + - icon: class: "fa-solid fa-database" title: "PHPMyAdmin" text: "Manage your databases with confidence using PHPMyAdmin, a robust and dynamic tool designed to simplify administration and enhance productivity. Enjoy an intuitive interface, powerful features, and an energetic approach that makes database management a breeze." url: https://{{domains.phpmyadmin}} link_text: "Optimize Your Database Now!" -{% endif %} +{% endif %} {% if "snipe_it" in group_names %} + - icon: class: "fa-solid fa-box" title: "SNIPE-IT" text: "Streamline your asset management with SNIPE-IT, a cutting-edge solution that brings efficiency, clarity, and energy to tracking your hardware and software inventory. Experience a user-friendly design and dynamic features that make asset management simple and engaging." url: https://{{domains.snipe_it}} link_text: "Manage Assets Effortlessly!" + {% endif %} + platform: titel: {{service_provider.platform.titel}} subtitel: {{service_provider.platform.subtitel}} @@ -377,15 +426,19 @@ navigation: icon: class: fa-solid fa-envelope children: + {% if service_provider.contact.email is defined %} + - name: Email description: Send {{ 'us' if service_provider.type == 'legal' else 'me' }} an email icon: class: fa-solid fa-envelope url: mailto:{{service_provider.contact.email}} identifier: {{service_provider.contact.email}} + {% endif %} {% if service_provider.contact.phone is defined %} + - name: Mobile description: Call {{ 'us' if service_provider.type == 'legal' else 'me' }} icon: @@ -393,166 +446,214 @@ navigation: url: "tel:{{service_provider.contact.phone}}" identifier: "{{service_provider.contact.phone}}" target: _top + {% endif %} {% if service_provider.contact.matrix is defined %} + - name: Matrix description: Chat with {{ 'us' if service_provider.type == 'legal' else 'me' }} on Matrix icon: class: fa-solid fa-cubes identifier: "{{service_provider.contact.matrix}}" + {% endif %} + footer: children: - link: accounts + {% if ["discourse","moodle","listmonk","openproject","taiga","snipe_it","matrix","bigbluebutton","mailu", "matomo","phpadmin","keycloak", "ldap", "baserow","yourls","nextcloud"] | any_in(group_names) %} + - name: Solution Hub description: Curated collection of self hosted tools icon: class: fa-solid fa-network-wired - url: children: + {% if ["discourse","moodle","listmonk"] | any_in(group_names) %} + - name: Community description: Tools to manage the community icon: class: fa-solid fa-users children: + {% if "discourse" in group_names %} + - name: Forum description: Join the discussion icon: class: fa-brands fa-discourse url: https://{{domains.discourse}}/ + {% endif %} {% if "moodle" in group_names %} + - name: Learning Platform description: Learn with {{ 'our' if service_provider.type == 'legal' else 'my' }} academy icon: class: fa-solid fa-graduation-cap url: https://{{domains.moodle}}/ + {% endif %} {% if "listmonk" in group_names %} + - name: Newsletter description: Subscribe to {{ 'our' if service_provider.type == 'legal' else 'my' }} newsletter icon: class: fa-solid fa-envelope-open-text url: https://{{domains.listmonk}}/subscription/form + {% endif %} {% endif %} {% if ["openproject","taiga","snipe_it"] | any_in(group_names) %} + - name: Project Management description: Project Management Tools icon: class: fa-solid fa-chart-line children: + {% if "openproject" in group_names %} + - name: Open Project description: Explore {{ 'our' if service_provider.type == 'legal' else 'my' }} projects icon: class: fa-solid fa-tasks url: https://{{domains.openproject}}/ + {% endif %} {% if "taiga" in group_names %} + - name: Taiga description: View {{ 'our' if service_provider.type == 'legal' else 'my' }} Kanban board icon: class: bi bi-clipboard2-check-fill url: https://{{domains.taiga}}/ + {% endif %} {% if "snipe_it" in group_names %} + - name: Snipe IT description: Manage {{ 'our' if service_provider.type == 'legal' else 'my' }} inventory icon: class: fas fa-box-open url: https://{{domains.snipe_it}}/ + {% endif %} {% endif %} {% if ["matrix","bigbluebutton","mailu"] | any_in(group_names) %} + - name: Communication icon: class: fa-solid fa-comments children: + {% if "matrix" in group_names %} + - name: Elements description: Chat with the world icon: class: fa-solid fa-comment url: https://{{domains.matrix_element}}/ + {% endif %} {% if "bigbluebutton" in group_names %} + - name: Big Blue Button description: Join live events icon: class: fa-solid fa-video url: https://{{domains.bigbluebutton}}/ + {% endif %} {% if "mailu" in group_names %} + - name: Mailu description: Send{{ 'our' if service_provider.type == 'legal' else 'my' }}a mail icon: class: fa-solid fa-envelope url: https://{{domains.mailu}}/ + {% endif %} {% endif %} {% if ["matomo","phpadmin","keycloak", "ldap"] | any_in(group_names) %} + - name: Administration icon: class: fas fa-building children: + {% if "matomo" in group_names %} + - name: Matomo description: Analyze with Matomo icon: class: fa-solid fa-chart-simple url: https://{{domains.matomo}}/ + {% endif %} {% if "phpmyadmin" in group_names %} + - name: phpMyAdmin description: Administrate MySQL and MariaDB databases icon: class: fas fa-database url: https://{{domains.phpmyadmin}}/ + {% endif %} {% if "keycloak" in group_names %} + - name: Keycloak description: Manage User via Keycloak icon: class: fas fa-user-shield url: https://{{domains.keycloak}}/admin + {% endif %} {% if "ldap" in group_names %} + - name: LDAP description: Manage LDAP icon: class: fas fa-key url: https://{{domains.ldap}}/ + {% endif %} {% endif %} {% if ["baserow","yourls","nextcloud"] | any_in(group_names) %} + - name: Tools icon: class: fas fa-tools children: + {% if "baserow" in group_names %} + - name: Baserow description: Organize with Baserow icon: class: fa-solid fa-table url: https://{{domains.baserow}}/ + {% endif %} {% if "yourls" in group_names %} + - name: Yourls description: Create Shortlinks icon: class: bi bi-link url: https://{{domains.yourls}}/admin/ + {% endif %} {% if "nextcloud" in group_names %} + - name: Nextcloud description: Access your cloud storage icon: class: fa-solid fa-cloud url: https://{{domains.nextcloud}}/ + {% endif %} {% endif %} {% endif %} @@ -561,5 +662,4 @@ navigation: description: Check out the imprint information icon: class: fa-solid fa-scale-balanced - url: "{{service_provider.legal.imprint}}" - \ No newline at end of file + url: "{{service_provider.legal.imprint}}" \ No newline at end of file diff --git a/roles/nginx-modifier-matomo/tasks/main.yml b/roles/nginx-modifier-matomo/tasks/main.yml index 74a6b9ee..8fcd6077 100644 --- a/roles/nginx-modifier-matomo/tasks/main.yml +++ b/roles/nginx-modifier-matomo/tasks/main.yml @@ -30,7 +30,7 @@ uri: url: "https://{{ domains.matomo }}/index.php" method: POST - body: "module=API&method=SitesManager.addSite&siteName={{ base_domain }}&urls=https://{{ base_domain }}&token_auth={{ matomo_auth_token }}&format=json" + body: "module=API&method=SitesManager.addSite&siteName={{ base_domain }}&urls=https://{{ base_domain }}&token_auth={{ applications.matomo.auth_token }}&format=json" body_format: form-urlencoded status_code: 200 return_content: yes diff --git a/roles/nginx-modifier-matomo/vars/main.yml b/roles/nginx-modifier-matomo/vars/main.yml index 60ac38e5..4be16dbd 100644 --- a/roles/nginx-modifier-matomo/vars/main.yml +++ b/roles/nginx-modifier-matomo/vars/main.yml @@ -1,2 +1,2 @@ base_domain: "{{ domain | regex_replace('^(?:.*\\.)?(.+\\..+)$', '\\1') }}" -verification_url: "https://{{domains.matomo}}/index.php?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=https://{{base_domain}}&format=json&token_auth={{matomo_auth_token}}" \ No newline at end of file +verification_url: "https://{{domains.matomo}}/index.php?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=https://{{base_domain}}&format=json&token_auth={{applications.matomo.auth_token}}" \ No newline at end of file