Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 140cb8b

Browse files
Merge pull request #35 from vladget/master
Added argument "--port" with "clickhouse_tcp_port" variable to "confi…
2 parents 7026a5b + 7035d80 commit 140cb8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tasks/config_db.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
- 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'"
44
changed_when: False
55
register: existing_databases
66
tags: [config_db]
77

88
- 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 }}`'"
1010
with_items: "{{ clickhouse_dbs }}"
1111
when: item.state is defined and item.state == 'absent' and item.name in existing_databases.stdout_lines
1212
tags: [config_db]
1313

1414
- 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 }}`'"
1616
with_items: "{{ clickhouse_dbs }}"
1717
when: (item.state is undefined or item.state == 'present') and item.name not in existing_databases.stdout_lines
1818
tags: [config_db]

0 commit comments

Comments
 (0)