This repository was archived by the owner on Feb 6, 2024. It is now read-only.
File tree 2 files changed +15
-3
lines changed 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,12 @@ clickhouse_dbs_custom:
101
101
- { name: testu2 }
102
102
- { name: testu3 }
103
103
- { name: testu4, state: absent }
104
- - { name: testu4, state: present }
104
+ - { name: testu5, state: present }
105
+ - { name: testu6, state: absent, cluster: testu6 }
106
+ - { name: testu7, state: present, cluster: testu7 }
107
+ - { name: testu8, state: absent, cluster: testu8, engine: Lazy(3600) }
108
+ - { name: testu9, state: present, cluster: testu9, engine: Lazy(3600) }
109
+
105
110
```
106
111
107
112
F: You can create dictionary via odbc
Original file line number Diff line number Diff line change 6
6
tags : [config_db]
7
7
8
8
- name : Config | Delete database config
9
- command : " clickhouse-client -h 127.0.0.1 --port {{ clickhouse_tcp_port }} -q 'DROP DATABASE IF EXISTS `{{ item.name }}`'"
9
+ command : |
10
+ clickhouse-client -h 127.0.0.1 --port {{ clickhouse_tcp_port }}
11
+ -q 'DROP DATABASE IF EXISTS `{{ item.name }}`
12
+ {% if item.cluster is defined %}ON CLUSTER `{{ item.cluster }}`{% endif %}'
10
13
with_items : " {{ clickhouse_dbs }}"
11
14
when : item.state is defined and item.state == 'absent' and item.name in existing_databases.stdout_lines
12
15
tags : [config_db]
13
16
14
17
- name : Config | Create database config
15
- command : " clickhouse-client -h 127.0.0.1 --port {{ clickhouse_tcp_port }} -q 'CREATE DATABASE IF NOT EXISTS `{{ item.name }}`'"
18
+ command : |
19
+ clickhouse-client -h 127.0.0.1 --port {{ clickhouse_tcp_port }}
20
+ -q 'CREATE DATABASE IF NOT EXISTS `{{ item.name }}`
21
+ {% if item.cluster is defined %}ON CLUSTER `{{ item.cluster }}`{% endif %}
22
+ {% if item.engine is defined %}ENGINE = {{ item.engine }}{% endif %}'
16
23
with_items : " {{ clickhouse_dbs }}"
17
24
when : (item.state is undefined or item.state == 'present') and item.name not in existing_databases.stdout_lines
18
25
tags : [config_db]
You can’t perform that action at this time.
0 commit comments