58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
---
|
|
- name: install zookeeper packages
|
|
apt:
|
|
name:
|
|
- zookeeper
|
|
- zookeeper-bin
|
|
state: latest
|
|
register: apt_res
|
|
retries: 5
|
|
until: apt_res is success
|
|
|
|
- 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 check_mk agent check
|
|
template:
|
|
src: zookeeper/zk_status.j2
|
|
dest: /usr/lib/check_mk_agent/plugins/zk_status
|
|
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: do_bootstrap is defined and do_bootstrap
|
|
|
|
- meta: flush_handlers
|