40 lines
804 B
YAML
40 lines
804 B
YAML
---
|
|
- name: install zookeeper packages
|
|
apt:
|
|
name:
|
|
- zookeeper
|
|
- 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
|
|
|
|
- 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
|
|
enabled: no
|
|
with_items:
|
|
- zookeeper
|
|
|
|
- meta: flush_handlers
|