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

Commit 4c9cd02

Browse files
committed
Change the way distro support is checked, added bionic support.
Add tests for Debian (stretch&jessie) and for Ubuntu Bionic. Now there is a clickhouse_supported_distros list with list of supported versions in form of string: '{{ ansible_distribution }}_{{ ansible_distribution_release }}'
1 parent 09d9f5c commit 4c9cd02

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ matrix:
2424
dist: xenial
2525
sudo: true
2626
env: ANSIBLE_VERSION='ansible>=2.3,<2.4'
27+
- os: linux
28+
dist: bionic
29+
sudo: true
30+
env: ANSIBLE_VERSION='ansible>=2.3,<2.4'
31+
- os: linux
32+
dist: jessie
33+
sudo: true
34+
env: ANSIBLE_VERSION='ansible>=2.4,<2.5'
35+
- os: linux
36+
dist: stretch
37+
sudo: true
38+
env: ANSIBLE_VERSION='ansible>=2.4,<2.5'
2739
- os: linux
2840
dist: xenial
2941
sudo: true

defaults/main.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
---
22
# defaults file for clickhouse
33

4+
# List of distors supported by this playbook
5+
clickhouse_supported_distros:
6+
- 'Debian_jessie'
7+
- 'Debian_stretch'
8+
- 'Ubuntu_precise'
9+
- 'Ubuntu_trusty'
10+
- 'Ubuntu_xenial'
11+
- 'Ubuntu_bionic'
12+
413
# Settings for apt repo
514
clickhouse_repo: "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/"
615
clickhouse_repo_old: "deb http://repo.yandex.ru/clickhouse/xenial stable main"
@@ -15,8 +24,6 @@ clickhouse_path_logdir: "/var/log/clickhouse-server"
1524
clickhouse_path_data: "/var/lib/clickhouse/"
1625
clickhouse_path_tmp: "/var/lib/clickhouse/tmp/"
1726

18-
#Flag for using with requirements check
19-
clickhouse_supported: no
2027
#Type of installation (package,source)
2128
clickhouse_setup: package
2229
#Flag for remove clickhouse from host(disabled by default)

tasks/precheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- name: Requirements check | Not supported distribution && release
88
fail:
99
msg: "Your distribution {{ ansible_distribution }}_{{ ansible_distribution_release }} not supported by this role,sorry."
10-
when: clickhouse_supported|bool != True
10+
when: ('{{ ansible_distribution }}_{{ ansible_distribution_release }}' not in clickhouse_supported_distros)
1111

1212
- name: Requirements check | Check if Clickhouse is installed
1313
shell: dpkg-query -f '${Package} ' -W |grep -q "{{ clickhouse_package| join(" ")}}"

0 commit comments

Comments
 (0)