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

Commit

Permalink
Change the way distro support is checked, added bionic support.
Browse files Browse the repository at this point in the history
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 }}'
  • Loading branch information
amarao committed Sep 6, 2018
1 parent 09d9f5c commit 4c9cd02
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ matrix:
dist: xenial
sudo: true
env: ANSIBLE_VERSION='ansible>=2.3,<2.4'
- os: linux
dist: bionic
sudo: true
env: ANSIBLE_VERSION='ansible>=2.3,<2.4'
- os: linux
dist: jessie
sudo: true
env: ANSIBLE_VERSION='ansible>=2.4,<2.5'
- os: linux
dist: stretch
sudo: true
env: ANSIBLE_VERSION='ansible>=2.4,<2.5'
- os: linux
dist: xenial
sudo: true
Expand Down
11 changes: 9 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
# defaults file for clickhouse

# List of distors supported by this playbook
clickhouse_supported_distros:
- 'Debian_jessie'
- 'Debian_stretch'
- 'Ubuntu_precise'
- 'Ubuntu_trusty'
- 'Ubuntu_xenial'
- 'Ubuntu_bionic'

# Settings for apt repo
clickhouse_repo: "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/"
clickhouse_repo_old: "deb http://repo.yandex.ru/clickhouse/xenial stable main"
Expand All @@ -15,8 +24,6 @@ clickhouse_path_logdir: "/var/log/clickhouse-server"
clickhouse_path_data: "/var/lib/clickhouse/"
clickhouse_path_tmp: "/var/lib/clickhouse/tmp/"

#Flag for using with requirements check
clickhouse_supported: no
#Type of installation (package,source)
clickhouse_setup: package
#Flag for remove clickhouse from host(disabled by default)
Expand Down
2 changes: 1 addition & 1 deletion tasks/precheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- name: Requirements check | Not supported distribution && release
fail:
msg: "Your distribution {{ ansible_distribution }}_{{ ansible_distribution_release }} not supported by this role,sorry."
when: clickhouse_supported|bool != True
when: ('{{ ansible_distribution }}_{{ ansible_distribution_release }}' not in clickhouse_supported_distros)

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

0 comments on commit 4c9cd02

Please sign in to comment.