diff --git a/README.md b/README.md index a732f8a..4e3897f 100644 --- a/README.md +++ b/README.md @@ -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 ---------------- diff --git a/defaults/main.yml b/defaults/main.yml index 4691b55..be18b34 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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) diff --git a/tasks/main.yml b/tasks/main.yml index 84d0ba7..f503381 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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] diff --git a/vars/Debian_jessie.yml b/vars/Debian_jessie.yml deleted file mode 100644 index 5e6fb22..0000000 --- a/vars/Debian_jessie.yml +++ /dev/null @@ -1,12 +0,0 @@ -clickhouse_supported: yes -clickhouse_repo: "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/" -clickhouse_repo_keyserver: keyserver.ubuntu.com -clickhouse_repo_key: E0C56BD4 -clickhouse_package: - - clickhouse-client - - clickhouse-common-static - - clickhouse-server -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/" diff --git a/vars/Debian_stretch.yml b/vars/Debian_stretch.yml deleted file mode 100644 index 5e6fb22..0000000 --- a/vars/Debian_stretch.yml +++ /dev/null @@ -1,12 +0,0 @@ -clickhouse_supported: yes -clickhouse_repo: "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/" -clickhouse_repo_keyserver: keyserver.ubuntu.com -clickhouse_repo_key: E0C56BD4 -clickhouse_package: - - clickhouse-client - - clickhouse-common-static - - clickhouse-server -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/" diff --git a/vars/Ubuntu_trusty.yml b/vars/Ubuntu_trusty.yml deleted file mode 100644 index 35fa61a..0000000 --- a/vars/Ubuntu_trusty.yml +++ /dev/null @@ -1,13 +0,0 @@ -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-common-static - - clickhouse-server -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/" diff --git a/vars/Ubuntu_xenial.yml b/vars/Ubuntu_xenial.yml deleted file mode 100644 index 35fa61a..0000000 --- a/vars/Ubuntu_xenial.yml +++ /dev/null @@ -1,13 +0,0 @@ -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-common-static - - clickhouse-server -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/"