diff --git a/ansible/roles/plausible/files/clickhouse-docker.xml b/ansible/roles/plausible/files/clickhouse-config.xml
similarity index 61%
rename from ansible/roles/plausible/files/clickhouse-docker.xml
rename to ansible/roles/plausible/files/clickhouse-config.xml
index 4530dba..88fedf9 100644
--- a/ansible/roles/plausible/files/clickhouse-docker.xml
+++ b/ansible/roles/plausible/files/clickhouse-config.xml
@@ -5,5 +5,13 @@
1
warning
+ true
+
+ warning
+
+
+ warning>
+
+
diff --git a/ansible/roles/plausible/files/clickhouse-user-config.xml b/ansible/roles/plausible/files/clickhouse-user-config.xml
new file mode 100644
index 0000000..de336a2
--- /dev/null
+++ b/ansible/roles/plausible/files/clickhouse-user-config.xml
@@ -0,0 +1,7 @@
+
+
+
+ 0
+
+
+
diff --git a/ansible/roles/plausible/files/docker-compose.yml b/ansible/roles/plausible/files/docker-compose.yml
index 9d64482..dbfd529 100644
--- a/ansible/roles/plausible/files/docker-compose.yml
+++ b/ansible/roles/plausible/files/docker-compose.yml
@@ -32,8 +32,9 @@ services:
image: yandex/clickhouse-server:latest
restart: unless-stopped
volumes:
- - ./clickhouse:/var/lib/clickhouse
+ - /mnt/tank/dbs/clickhouse/plausible:/var/lib/clickhouse
- /mnt/tank/dbs/clickhouse/docker_related_config.xml:/etc/clickhouse-server/config.d/docker_related_config.xml:ro
+ - /mnt/tank/dbs/clickhouse/docker_related_user_config.xml:/etc/clickhouse-server/users.d/docker_related_user_config.xml:ro
tmpfs:
- /var/log/clickhouse-server
ulimits:
diff --git a/ansible/roles/plausible/tasks/main.yml b/ansible/roles/plausible/tasks/main.yml
index 64c9530..2f6996d 100644
--- a/ansible/roles/plausible/tasks/main.yml
+++ b/ansible/roles/plausible/tasks/main.yml
@@ -8,8 +8,15 @@
- name: Install clickhouse config
template:
- src: files/clickhouse-docker.xml
- dest: /mnt/tank/dbs/clickhouse/docker_related_config.xml
+ src: files/clickhouse-config.xml
+ dest: /mnt/tank/dbs/clickhouse/docker_related_user_config.xml
+ notify: restart plausible
+ become: true
+
+- name: Install clickhouse user config
+ template:
+ src: files/clickhouse-user-config.xml
+ dest: /mnt/tank/dbs/clickhouse/docker_related_user_config.xml
notify: restart plausible
become: true