This repository was archived by the owner on Feb 6, 2024. It is now read-only.
File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Gather list of existing databases
3
- command : " clickhouse-client -h 127.0.0.1 -q 'show databases'"
3
+ command : " clickhouse-client -h 127.0.0.1 --port {{ clickhouse_tcp_port }} - q 'show databases'"
4
4
changed_when : False
5
5
register : existing_databases
6
6
tags : [config_db]
7
7
8
8
- name : Config | Delete database config
9
- command : " clickhouse-client -h 127.0.0.1 -q 'DROP DATABASE IF EXISTS `{{ item.name }}`'"
9
+ command : " clickhouse-client -h 127.0.0.1 --port {{ clickhouse_tcp_port }} - q 'DROP DATABASE IF EXISTS `{{ item.name }}`'"
10
10
with_items : " {{ clickhouse_dbs }}"
11
11
when : item.state is defined and item.state == 'absent' and item.name in existing_databases.stdout_lines
12
12
tags : [config_db]
13
13
14
14
- name : Config | Create database config
15
- command : " clickhouse-client -h 127.0.0.1 -q 'CREATE DATABASE IF NOT EXISTS `{{ item.name }}`'"
15
+ command : " clickhouse-client -h 127.0.0.1 --port {{ clickhouse_tcp_port }} - q 'CREATE DATABASE IF NOT EXISTS `{{ item.name }}`'"
16
16
with_items : " {{ clickhouse_dbs }}"
17
17
when : (item.state is undefined or item.state == 'present') and item.name not in existing_databases.stdout_lines
18
18
tags : [config_db]
You can’t perform that action at this time.
0 commit comments