Add custom systemd unit for Zookeeper

We're 100% systemd here, and the lack of control/information that the
old-school ZK initscript provides is frustrating. Replace it with our
own simple unit file.
This commit is contained in:
2023-09-01 15:42:21 -04:00
parent 7e74ce2ede
commit 15a2bf1418
2 changed files with 35 additions and 2 deletions

View File

@ -2,7 +2,7 @@
- name: install zookeeper packages
apt:
name:
- zookeeperd
- zookeeper
- zookeeper-bin
state: latest
@ -18,7 +18,17 @@
- zoo.cfg
notify: restart zookeeper
- name: start but disable services
- 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)
service:
name: "{{ item }}"
state: started