From e74d1bd401dbfb71c88a0b0576d06f26e5b4739f Mon Sep 17 00:00:00 2001 From: "Alexey V. Bobrov" Date: Mon, 7 May 2018 22:52:21 +0300 Subject: [PATCH 1/6] Add ansible version testing --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0969070..ab9902d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,9 +23,15 @@ addons: packages: - python-pip +env: + - ANSIBLE_VERSION='ansible>=2.4,<2.5' + - ANSIBLE_VERSION='ansible>=2.3,<2.4' + - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION='ansible>=2.2,<2.3' + install: # Install ansible - - sudo pip install ansible + - if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install $ANSIBLE_VERSION; fi # Check ansible version - ansible --version From 3e9666ba205d39779c8996e8161ded061e3c4052 Mon Sep 17 00:00:00 2001 From: "Alexey V. Bobrov" Date: Mon, 7 May 2018 23:43:58 +0300 Subject: [PATCH 2/6] Add ansible version testing --- .travis.yml | 4 ++-- tasks/config_db.yml | 2 +- tasks/config_sys.yml | 4 ++++ tests/test.yml | 2 -- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab9902d..d30f4ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,8 +26,8 @@ addons: env: - ANSIBLE_VERSION='ansible>=2.4,<2.5' - ANSIBLE_VERSION='ansible>=2.3,<2.4' - - ANSIBLE_VERSION=latest - ANSIBLE_VERSION='ansible>=2.2,<2.3' + - ANSIBLE_VERSION='latest' install: # Install ansible @@ -37,7 +37,7 @@ install: - ansible --version # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg + - printf '[defaults]\nroles_path=../' >ansible.cfgq script: # Basic role syntax check diff --git a/tasks/config_db.yml b/tasks/config_db.yml index 5d8c866..df73277 100644 --- a/tasks/config_db.yml +++ b/tasks/config_db.yml @@ -8,7 +8,7 @@ - name: Config | Delete database config command: "clickhouse-client -h localhost -q 'DROP DATABASE IF EXISTS `{{ item.name }}`'" with_items: "{{ clickhouse_dbs }}" - when: item.state is defined and item.state == 'absent' and item.name in existing_databases.stdout.lines_lines + when: item.state is defined and item.state == 'absent' and item.name in existing_databases.stdout_lines tags: [config_db] - name: Config | Create database config diff --git a/tasks/config_sys.yml b/tasks/config_sys.yml index 974b4c2..6cea193 100644 --- a/tasks/config_sys.yml +++ b/tasks/config_sys.yml @@ -16,6 +16,8 @@ template: src: config.j2 dest: "{{ clickhouse_path_configdir }}/config.xml" + owner: clickhouse + group: clickhouse notify: restart-ch become: true @@ -23,6 +25,8 @@ template: src: users.j2 dest: "{{ clickhouse_path_configdir }}/users.xml" + owner: clickhouse + group: clickhouse notify: restart-ch become: true diff --git a/tests/test.yml b/tests/test.yml index 77150c8..75bba8f 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -2,8 +2,6 @@ - hosts: localhost remote_user: root vars: - clickhouse_listen_host_default: - - "127.0.0.1" clickhouse_users_custom: - { name: "testuser", password_sha256_hex: "f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2", From 9179d36781065926e33cbf6905e809ce1be5e18e Mon Sep 17 00:00:00 2001 From: "Alexey V. Bobrov" Date: Mon, 7 May 2018 23:47:11 +0300 Subject: [PATCH 3/6] Add ansible version testing --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d30f4ed..9b950a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,6 @@ addons: env: - ANSIBLE_VERSION='ansible>=2.4,<2.5' - ANSIBLE_VERSION='ansible>=2.3,<2.4' - - ANSIBLE_VERSION='ansible>=2.2,<2.3' - ANSIBLE_VERSION='latest' install: From d3520e7fa159d0ba36f44ead0f3167c466cc006b Mon Sep 17 00:00:00 2001 From: "Alexey V. Bobrov" Date: Tue, 8 May 2018 00:07:36 +0300 Subject: [PATCH 4/6] Add ansible version testing Bugfixes --- .travis.yml | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b950a0..7ff8de3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,39 @@ matrix: - os: linux dist: trusty sudo: true + env: ANSIBLE_VERSION='ansible>=2.4,<2.5' + - os: linux + dist: trusty + sudo: true + env: ANSIBLE_VERSION='ansible>=2.4,<2.5' + - os: linux + dist: trusty + sudo: true + env: ANSIBLE_VERSION='latest' - os: linux dist: xenial sudo: true + env: ANSIBLE_VERSION='ansible>=2.4,<2.5' + - os: linux + dist: xenial + sudo: true + env: ANSIBLE_VERSION='ansible>=2.4,<2.5' + - os: linux + dist: xenial + sudo: true + env: ANSIBLE_VERSION='latest' + - os: linux + dist: precise + sudo: true + env: ANSIBLE_VERSION='ansible>=2.4,<2.5' - os: linux dist: precise sudo: true + env: ANSIBLE_VERSION='ansible>=2.4,<2.5' + - os: linux + dist: precise + sudo: true + env: ANSIBLE_VERSION='latest' # Use the new container infrastructure sudo: true @@ -23,11 +50,6 @@ addons: packages: - python-pip -env: - - ANSIBLE_VERSION='ansible>=2.4,<2.5' - - ANSIBLE_VERSION='ansible>=2.3,<2.4' - - ANSIBLE_VERSION='latest' - install: # Install ansible - if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install $ANSIBLE_VERSION; fi @@ -36,7 +58,7 @@ install: - ansible --version # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfgq + - printf '[defaults]\nroles_path=../' >ansible.cfg script: # Basic role syntax check From 6398d7543cd315341bc2841a6bc37c400ae3798f Mon Sep 17 00:00:00 2001 From: "Alexey V. Bobrov" Date: Tue, 8 May 2018 00:12:52 +0300 Subject: [PATCH 5/6] Add ansible version testing Bugfixes travis ipv6 fix --- .travis.yml | 6 +++--- tests/test.yml | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ff8de3..7666b3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ matrix: - os: linux dist: trusty sudo: true - env: ANSIBLE_VERSION='ansible>=2.4,<2.5' + env: ANSIBLE_VERSION='ansible>=2.3,<2.4' - os: linux dist: trusty sudo: true @@ -23,7 +23,7 @@ matrix: - os: linux dist: xenial sudo: true - env: ANSIBLE_VERSION='ansible>=2.4,<2.5' + env: ANSIBLE_VERSION='ansible>=2.3,<2.4' - os: linux dist: xenial sudo: true @@ -35,7 +35,7 @@ matrix: - os: linux dist: precise sudo: true - env: ANSIBLE_VERSION='ansible>=2.4,<2.5' + env: ANSIBLE_VERSION='ansible>=2.3,<2.4' - os: linux dist: precise sudo: true diff --git a/tests/test.yml b/tests/test.yml index 75bba8f..77150c8 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -2,6 +2,8 @@ - hosts: localhost remote_user: root vars: + clickhouse_listen_host_default: + - "127.0.0.1" clickhouse_users_custom: - { name: "testuser", password_sha256_hex: "f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2", From 44e76c0cc99a65c6e4927830c10d0b5cee9bae7e Mon Sep 17 00:00:00 2001 From: "Alexey V. Bobrov" Date: Tue, 8 May 2018 00:31:15 +0300 Subject: [PATCH 6/6] Add ansible version testing Bugfixes travis ipv6 fix --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d5e8c13..a732f8a 100644 --- a/README.md +++ b/README.md @@ -226,3 +226,5 @@ Author Information [ClickHouse](https://clickhouse.yandex/docs/en/index.html) by [Yandex LLC](https://yandex.ru/company/). Role by [AlexeySetevoi](https://github.com/AlexeySetevoi). + +Dear contributors, thank you.