Skip to content

Commit

Permalink
Allow to override clickhouse_repo, add to use alternative apt key
Browse files Browse the repository at this point in the history
Now it's possible to define own clickhouse_repo variable to
prove apt source line to use.

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

Closes: AlexeySetevoi#15
  • Loading branch information
amarao committed May 15, 2018
1 parent 2701eb7 commit 0e8862b
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 37 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 mirror you need to provide your own repository string and
the 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,
`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-----
```
Example Playbook
----------------
Expand Down
15 changes: 15 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
---
# 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
14 changes: 1 addition & 13 deletions vars/Ubuntu_precise.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,2 @@
---
clickhouse_supported: yes
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/"

13 changes: 1 addition & 12 deletions vars/Ubuntu_trusty.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
---
clickhouse_supported: yes
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/"
13 changes: 1 addition & 12 deletions vars/Ubuntu_xenial.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
---
clickhouse_supported: yes
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/"

0 comments on commit 0e8862b

Please sign in to comment.