49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
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 daily vacuum script
|
|
template:
|
|
src: zookeeper/zookeeper-vacuum.j2
|
|
dest: /etc/cron.daily/zookeeper-vacuum
|
|
mode: 0755
|
|
|
|
- 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
|
|
|
|
- include: zookeeper/bootstrap.yml
|
|
when: bootstrap is defined and bootstrap
|
|
|
|
- meta: flush_handlers
|