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

Commit

Permalink
EL works
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySetevoi committed Sep 15, 2019
1 parent 1e78b65 commit 7026a5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions tasks/install_yum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
rpm_key:
state: present
key: "{{ clickhouse_repo_key }}"
tags: [install]
become: true

- name: Install by YUM | Ensure clickhouse repo installed
Expand All @@ -16,17 +17,17 @@
enabled: yes
gpgcheck: 1
gpgkey: "{{ clickhouse_repo_key }}"
become: true
tags: [install]
become: true

- name: Install by YUM | Ensure clickhouse package installed (latest)
yum:
name: "{{ item }}"
state: latest
with_items: "{{ clickhouse_package }}"
become: true
when: clickhouse_version == "*"
tags: [install]
when: clickhouse_version == "*"

- name: Install by YUM | Ensure clickhouse package installed (version {{ clickhouse_version }})
yum:
Expand All @@ -35,22 +36,24 @@
disable_gpg_check: yes # Because Package clickhouse-server-base-19.4.0-2.x86_64.rpm is not signed
with_items: "{{ clickhouse_package }}"
become: true
tags: [install]
when: clickhouse_version != "*"
tags: [install]

- name: Install by YUM | Ensure clickhouse enabled and started by Systemd
systemd:
name: clickhouse-server
state: started
enabled: yes
daemon_reload: yes
when: ansible_service_mgr == 'systemd'
tags: [install]
become: yes
when: ansible_service_mgr == 'systemd'

- name: Install by YUM | Ensure clickhouse enabled and started by generic service
service:
name: clickhouse-server
state: started
enabled: yes
when: ansible_service_mgr != 'systemd'
tags: [install]
tags: [install]
become: yes
when: ansible_service_mgr != 'systemd'
2 changes: 1 addition & 1 deletion tasks/precheck_yum.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Requirements check | Check if Clickhouse is installed
shell: rpm -qa --queryformat '%{NAME}\n' | sort | grep clickhouse | tr '\n' ' ' |grep -q "{{ clickhouse_package| join(" ")}}"
register: "{{ clickhouse_rt_is_installed_dict.yum }}"
register: clickhouse_rt_is_installed
ignore_errors: yes
when: ansible_pkg_mgr == 'yum' and clickhouse_setup == 'package'
changed_when: False
Expand Down

0 comments on commit 7026a5b

Please sign in to comment.