pvc-ansible/roles/pvc/tasks/zookeeper/main.yml

49 lines
1.0 KiB
YAML
Raw Normal View History

2019-06-09 00:11:06 -04:00
---
- name: install zookeeper packages
apt:
name:
- 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
- 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
enabled: no
2019-06-09 00:11:06 -04:00
with_items:
- zookeeper
2019-06-12 21:06:06 -04:00
- include: zookeeper/bootstrap.yml
when: bootstrap is defined and bootstrap
2019-06-12 21:06:06 -04:00
- meta: flush_handlers