Whitelisted Server IP's and implemented deactivation option for ldap user directory in nextcloud

This commit is contained in:
2025-07-01 02:25:05 +02:00
parent b83d596789
commit 15121fd905
9 changed files with 36 additions and 18 deletions

View File

@@ -5,12 +5,12 @@
msg:
domain: "{{ domain }}"
base_domain: "{{ base_domain }}"
verification_url: "{{ verification_url }}"
matomo_verification_url: "{{ matomo_verification_url }}"
when: enable_debug | bool
- name: "Check if site {{ domain }} is allready registered at Matomo"
uri:
url: "{{verification_url}}"
url: "{{ matomo_verification_url }}"
method: GET
return_content: yes
status_code: 200
@@ -29,9 +29,9 @@
- name: Add site to Matomo and get ID if not exists
uri:
url: "{{ web_protocol }}://{{ domains.matomo }}/index.php"
url: "{{ matomo_index_php_url }}"
method: POST
body: "module=API&method=SitesManager.addSite&siteName={{ base_domain }}&urls=https://{{ base_domain }}&token_auth={{ applications.matomo.credentials.auth_token }}&format=json"
body: "module=API&method=SitesManager.addSite&siteName={{ base_domain }}&urls=https://{{ base_domain }}&token_auth={{ matomo_auth_token }}&format=json"
body_format: form-urlencoded
status_code: 200
return_content: yes

View File

@@ -1,2 +1,4 @@
base_domain: "{{ domain | regex_replace('^(?:.*\\.)?(.+\\..+)$', '\\1') }}"
verification_url: "{{ web_protocol }}://{{domains | get_domain('matomo')}}/index.php?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=https://{{base_domain}}&format=json&token_auth={{applications.matomo.credentials.auth_token}}"
base_domain: "{{ domain | regex_replace('^(?:.*\\.)?(.+\\..+)$', '\\1') }}"
matomo_index_php_url: "{{ web_protocol }}://{{ domains | get_domain('matomo') }}/index.php"
matomo_auth_token: "{{ applications.matomo.credentials.auth_token }}"
matomo_verification_url: "{{ matomo_index_php_url }}?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=https://{{ base_domain }}&format=json&token_auth={{ matomo_auth_token }}"