2019-06-09 00:11:06 -04:00
|
|
|
---
|
|
|
|
- name: install zookeeper packages
|
|
|
|
apt:
|
|
|
|
name:
|
2019-08-26 10:05:31 -04:00
|
|
|
- zookeeper
|
2019-06-09 00:11:06 -04:00
|
|
|
- zookeeper-bin
|
|
|
|
state: latest
|
|
|
|
|
|
|
|
- name: install zookeeper configuration
|
|
|
|
template:
|
|
|
|
src: zookeeper/{{ item }}.j2
|
|
|
|
dest: /etc/zookeeper/conf/{{ item }}
|
|
|
|
with_items:
|
|
|
|
- configuration.xsl
|
|
|
|
- environment
|
|
|
|
- log4j.properties
|
|
|
|
- myid
|
|
|
|
- zoo.cfg
|
|
|
|
notify: restart zookeeper
|
|
|
|
|
2019-08-26 11:09:23 -04:00
|
|
|
- name: install daily vacuum script
|
|
|
|
template:
|
|
|
|
src: zookeeper/zookeeper-vacuum.j2
|
|
|
|
dest: /etc/cron.daily/zookeeper-vacuum
|
|
|
|
mode: 0755
|
|
|
|
|
2021-08-21 15:41:44 -04:00
|
|
|
- name: install check_mk agent check
|
|
|
|
template:
|
|
|
|
src: zookeeper/zk_status.j2
|
|
|
|
dest: /usr/lib/check_mk_agent/plugins/zk_status
|
|
|
|
mode: 0755
|
|
|
|
|
2019-08-26 10:05:31 -04:00
|
|
|
- name: install systemd unit file
|
|
|
|
template:
|
|
|
|
src: zookeeper/zookeeper.service.j2
|
|
|
|
dest: /etc/systemd/system/zookeeper.service
|
|
|
|
register: systemd
|
|
|
|
|
|
|
|
- name: reload systemd to apply changes
|
|
|
|
command: systemctl daemon-reload
|
|
|
|
when: systemd.changed
|
|
|
|
|
|
|
|
- name: start but disable services (managed by PVC)
|
2019-06-09 00:11:06 -04:00
|
|
|
service:
|
|
|
|
name: "{{ item }}"
|
2019-06-16 13:57:12 -04:00
|
|
|
state: started
|
2019-06-17 21:58:57 -04:00
|
|
|
enabled: no
|
2019-06-09 00:11:06 -04:00
|
|
|
with_items:
|
|
|
|
- zookeeper
|
2019-06-12 21:06:06 -04:00
|
|
|
|
2021-01-28 13:31:58 -05:00
|
|
|
- include: zookeeper/bootstrap.yml
|
2023-01-16 14:39:43 -05:00
|
|
|
when: do_bootstrap is defined and do_bootstrap
|
2021-01-28 13:31:58 -05:00
|
|
|
|
2019-06-12 21:06:06 -04:00
|
|
|
- meta: flush_handlers
|