From ab6e94eb82c9b6671718bb8af053f0fa3afeea2f Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Mon, 25 Nov 2019 09:39:50 +0100
Subject: [PATCH] Fix the installation of matomo third party plugin LoginOIDC

---
 tasks/install.yml        | 11 ++++++++++-
 templates/config.ini.php |  3 ---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/tasks/install.yml b/tasks/install.yml
index 336389c..160867d 100644
--- a/tasks/install.yml
+++ b/tasks/install.yml
@@ -76,7 +76,7 @@
     dest: '{{ webRoot }}/plugins'
     remote_src: yes
   with_items:
-    - https://github.com/dominik-th/matomo-plugin-LoginOIDC/archive/0.1.4.tar.gz
+    - https://plugins.matomo.org/api/2.0/plugins/LoginOIDC/download/0.1.4
   tags:
     - deploy
 
@@ -113,6 +113,15 @@
   tags:
     - always
 
+- name: Enable Plugins
+  command: '{{ webRoot }}/console plugin:activate {{ item }}'
+  become_user: '{{ apacheUser }}'
+  ignore_errors: yes
+  with_items:
+    - LoginOIDC
+  tags:
+    - deploy
+
 - name: File Modes and Ownership
   file:
     path: '{{ webRoot }}'
diff --git a/templates/config.ini.php b/templates/config.ini.php
index 52397f5..36f2845 100644
--- a/templates/config.ini.php
+++ b/templates/config.ini.php
@@ -80,7 +80,6 @@ Plugins[] = "Intl"
 Plugins[] = "Marketplace"
 Plugins[] = "Provider"
 Plugins[] = "DoNotTrack"
-Plugins[] = "LoginOIDC"
 Plugins[] = "SecurityInfo"
 
 [PluginsInstalled]
@@ -141,5 +140,3 @@ PluginsInstalled[] = "Diagnostics"
 PluginsInstalled[] = "Intl"
 PluginsInstalled[] = "Marketplace"
 PluginsInstalled[] = "SecurityInfo"
-PluginsInstalled[] = "LoginOIDC"
-PluginsInstalled[] = "TwoFactorAuth"
-- 
GitLab