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
|
|
|
|
|
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
|
|
|
|
when: bootstrap is defined and bootstrap
|
|
|
|
|
2019-06-12 21:06:06 -04:00
|
|
|
- meta: flush_handlers
|