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

Commit

Permalink
Now it's possible to define own clickhouse_repo variable to
Browse files Browse the repository at this point in the history
prove an apt configuration string to use.

Also it's possible to define own key id and/or keyserver to download
the apt key, and/or to provide the apt key within a variable
`clickhouse_repo_key_data`.

Closes: #15
  • Loading branch information
amarao committed Sep 6, 2018
1 parent b2a0d2c commit 09d9f5c
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 55 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,37 @@ F: Flag for remove clickhouse from host(disabled by default)
clickhouse_remove: no
```
Private mirror
--------------
To use a private APT mirror you need to define your own repository 'string' and
the repo key. Key may be provided as key name to download from a keyserver or
as armored GPG public key (the key itself). To use a key from a keyring,
variables `clickhouse_repo_key` and `clickhouse_repo_keyserver` should be provided.
To use a key in verbatim form, `clickhouse_repo_key_data` should be provided.
Custom mirror may be provided with `clickhouse_repo` variable.
Examples:
```
clickhouse_repo: 'deb http://apt.example.com/aptly/clickhouse xenial main'
clickhouse_repo_key: AABBCCDD
clickhouse_repo_keyserver: keyserver.example.com
```
or
```
clickhouse_repo: 'deb http://apt.example.com/aptly/clickhouse xenial main'
clickhouse_repo_key_data: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQANBFGspxsACADWgH5qqQtEa+Bjqd33X0PiRNcUf/Vt9m828uUuF5uRCEKruUG0
(few lines skipped)
LU/GfPzkCXlOt3Ud4L2EdvgQp/38VCNKmWi568soZnTwpjUt9AuN7iK3fm4=
=4dWC
-----END PGP PUBLIC KEY BLOCK-----
```
Please note, you need to create your mirror to be able to use it, and how to do
this is outside of the scope of this document. You may want to try to use reprepro
or aptly for this.
Example Playbook
----------------
Expand Down
14 changes: 14 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
---
# defaults file for clickhouse

# 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"
clickhouse_repo_keyserver: keyserver.ubuntu.com
clickhouse_repo_key: E0C56BD4
clickhouse_package:
- clickhouse-client
- clickhouse-server-base
- clickhouse-server-common
clickhouse_path_configdir: "/etc/clickhouse-server"
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)
Expand Down
5 changes: 0 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
# tasks file for clickhouse
- include_vars: "{{ item }}"
with_first_found:
- "../vars/{{ ansible_distribution }}_{{ ansible_distribution_release }}.yml"
- "../vars/empty.yml"
tags: [always]

- include: precheck.yml
tags: [precheck,install]
Expand Down
12 changes: 0 additions & 12 deletions vars/Debian_jessie.yml

This file was deleted.

12 changes: 0 additions & 12 deletions vars/Debian_stretch.yml

This file was deleted.

13 changes: 0 additions & 13 deletions vars/Ubuntu_trusty.yml

This file was deleted.

13 changes: 0 additions & 13 deletions vars/Ubuntu_xenial.yml

This file was deleted.

0 comments on commit 09d9f5c

Please sign in to comment.